Package org.apache.sling.repoinit.parser.operations

# Class EnsureNodes

java.lang.Object
org.apache.sling.repoinit.parser.operations.Operation
org.apache.sling.repoinit.parser.operations.EnsureNodes

@ProviderType public class EnsureNodes extends Operation

## Field Summary

### Fields inherited from class org.apache.sling.repoinit.parser.operations.Operation

`DQUOTE`

## Constructor Summary

Constructors
Constructor
Description
`EnsureNodes(String defaultPrimaryType)`

## Method Summary

Modifier and Type
Method
Description
`void`
`accept(OperationVisitor v)`
`void`
`addSegment(String path, String primaryType)`
`void`
`addSegment(String path, String primaryType, List<String> mixins)`
`@NotNull String`
`asRepoInitString()`
Converts this operation instance to a RepoInit string representation including the current operation parameters.
`List<PathSegmentDefinition>`
`getDefinitions()`
`protected String`
`getParametersDescription()`
`List<PropertyLine>`
`getPropertyLines()`
`void`
`setPropertyLines(@NotNull List<PropertyLine> lines)`
`String`
`toString()`

### Methods inherited from class org.apache.sling.repoinit.parser.operations.Operation

`cleanupQuotedString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### EnsureNodes

public EnsureNodes(String defaultPrimaryType)

## Method Details

### toString

public String toString()

Overrides:
  `toString` in class `Operation`

### getParametersDescription

protected String getParametersDescription()

Specified by:
  `getParametersDescription` in class `Operation`

### asRepoInitString

@NotNull public @NotNull String asRepoInitString()
Description copied from class: `Operation`
Converts this operation instance to a RepoInit string representation including the current operation parameters. The representation must be parsable back into an equivalent operation and must end with a OS-compatible line separator.

Specified by:
  `asRepoInitString` in class `Operation`
Returns:
  the repoinit string for the operation

### accept

public void accept(OperationVisitor v)

Specified by:
  `accept` in class `Operation`

### addSegment

public void addSegment(String path, String primaryType)

### addSegment

public void addSegment(String path, String primaryType, List<String> mixins)

### getDefinitions

public List<PathSegmentDefinition> getDefinitions()

### setPropertyLines

public void setPropertyLines(@NotNull @NotNull List<PropertyLine> lines)

### getPropertyLines

public List<PropertyLine> getPropertyLines()