/** * {@inheritDoc} * <p> * This method does not clone the results. * </p> * * @see org.modeshape.graph.request.ChangeRequest#clone() */ @Override public CreateNodeRequest clone() { CreateNodeRequest request = new CreateNodeRequest(under, workspaceName, childName, conflictBehavior, properties); request.setActualLocationOfNode(actualLocation); return request; }
/** * Add a request to create a node with the given properties under the supplied location. * * @param parentLocation the location of the existing parent node, under which the new child should be created * @param workspaceName the name of the workspace containing the parent * @param childName the name of the new child to create under the existing parent * @param properties the properties of the new node, which should include any {@link Location#getIdProperties() identification * properties} for the new node * @return this builder for method chaining; never null * @throws IllegalArgumentException if the location, workspace name, or child name is null */ public BatchRequestBuilder createNode( Location parentLocation, String workspaceName, Name childName, Iterator<Property> properties ) { return add(new CreateNodeRequest(parentLocation, workspaceName, childName, CreateNodeRequest.DEFAULT_CONFLICT_BEHAVIOR, properties)); }
/** * Add a request to create a node with the given properties under the supplied location. * * @param parentLocation the location of the existing parent node, under which the new child should be created * @param workspaceName the name of the workspace containing the parent * @param childName the name of the new child to create under the existing parent * @param properties the properties of the new node, which should include any {@link Location#getIdProperties() identification * properties} for the new node * @param conflictBehavior the expected behavior if an equivalently-named child already exists under the <code>into</code> * location * @return this builder for method chaining; never null * @throws IllegalArgumentException if the location, workspace name, or child name is null */ public BatchRequestBuilder createNode( Location parentLocation, String workspaceName, Name childName, Property[] properties, NodeConflictBehavior conflictBehavior ) { if (conflictBehavior == null) conflictBehavior = CreateNodeRequest.DEFAULT_CONFLICT_BEHAVIOR; return add(new CreateNodeRequest(parentLocation, workspaceName, childName, conflictBehavior, properties)); }
/** * Add a request to create a node with the given properties under the supplied location. * * @param parentLocation the location of the existing parent node, under which the new child should be created * @param workspaceName the name of the workspace containing the parent * @param childName the name of the new child to create under the existing parent * @param properties the properties of the new node, which should include any {@link Location#getIdProperties() identification * properties} for the new node * @return the request; never null * @throws IllegalArgumentException if the location, workspace name, or child name is null */ public CreateNodeRequest createNode( Location parentLocation, String workspaceName, Name childName, Property[] properties ) { return process(new CreateNodeRequest(parentLocation, workspaceName, childName, CreateNodeRequest.DEFAULT_CONFLICT_BEHAVIOR, properties)); }
/** * Add a request to create a node with the given properties under the supplied location. * * @param parentLocation the location of the existing parent node, under which the new child should be created * @param workspaceName the name of the workspace containing the parent * @param childName the name of the new child to create under the existing parent * @param properties the properties of the new node, which should include any {@link Location#getIdProperties() identification * properties} for the new node * @return this builder for method chaining; never null * @throws IllegalArgumentException if the location, workspace name, or child name is null */ public BatchRequestBuilder createNode( Location parentLocation, String workspaceName, Name childName, Property[] properties ) { return add(new CreateNodeRequest(parentLocation, workspaceName, childName, CreateNodeRequest.DEFAULT_CONFLICT_BEHAVIOR, properties)); }
/** * Add a request to create a node with the given properties under the supplied location. * * @param parentLocation the location of the existing parent node, under which the new child should be created * @param workspaceName the name of the workspace containing the parent * @param childName the name of the new child to create under the existing parent * @param properties the properties of the new node, which should include any {@link Location#getIdProperties() identification * properties} for the new node * @return the request; never null * @throws IllegalArgumentException if the location, workspace name, or child name is null */ public CreateNodeRequest createNode( Location parentLocation, String workspaceName, Name childName, Iterator<Property> properties ) { return process(new CreateNodeRequest(parentLocation, workspaceName, childName, CreateNodeRequest.DEFAULT_CONFLICT_BEHAVIOR, properties)); }
/** * Add a request to create a node with the given properties under the supplied location. * * @param parentLocation the location of the existing parent node, under which the new child should be created * @param workspaceName the name of the workspace containing the parent * @param childName the name of the new child to create under the existing parent * @param properties the properties of the new node, which should include any {@link Location#getIdProperties() identification * properties} for the new node * @param conflictBehavior the expected behavior if an equivalently-named child already exists under the <code>into</code> * location * @return the request; never null * @throws IllegalArgumentException if the location, workspace name, or child name is null */ public CreateNodeRequest createNode( Location parentLocation, String workspaceName, Name childName, Property[] properties, NodeConflictBehavior conflictBehavior ) { if (conflictBehavior == null) conflictBehavior = CreateNodeRequest.DEFAULT_CONFLICT_BEHAVIOR; return process(new CreateNodeRequest(parentLocation, workspaceName, childName, conflictBehavior, properties)); }
/** * Add a request to create a node with the given properties under the supplied location. * * @param parentLocation the location of the existing parent node, under which the new child should be created * @param workspaceName the name of the workspace containing the parent * @param childName the name of the new child to create under the existing parent * @param properties the properties of the new node, which should include any {@link Location#getIdProperties() identification * properties} for the new node * @param conflictBehavior the expected behavior if an equivalently-named child already exists under the <code>into</code> * location * @return the request; never null * @throws IllegalArgumentException if the location, workspace name, or child name is null */ public CreateNodeRequest createNode( Location parentLocation, String workspaceName, Name childName, Iterator<Property> properties, NodeConflictBehavior conflictBehavior ) { if (conflictBehavior == null) conflictBehavior = CreateNodeRequest.DEFAULT_CONFLICT_BEHAVIOR; return process(new CreateNodeRequest(parentLocation, workspaceName, childName, conflictBehavior, properties)); }
/** * Add a request to create a node with the given properties under the supplied location. * * @param parentLocation the location of the existing parent node, under which the new child should be created * @param workspaceName the name of the workspace containing the parent * @param childName the name of the new child to create under the existing parent * @param properties the properties of the new node, which should include any {@link Location#getIdProperties() identification * properties} for the new node * @param conflictBehavior the expected behavior if an equivalently-named child already exists under the <code>into</code> * location * @return this builder for method chaining; never null * @throws IllegalArgumentException if the location, workspace name, or child name is null */ public BatchRequestBuilder createNode( Location parentLocation, String workspaceName, Name childName, Iterator<Property> properties, NodeConflictBehavior conflictBehavior ) { if (conflictBehavior == null) conflictBehavior = CreateNodeRequest.DEFAULT_CONFLICT_BEHAVIOR; return add(new CreateNodeRequest(parentLocation, workspaceName, childName, conflictBehavior, properties)); }
Location location = Location.create(parent); if (firstProperty == null) { requests.add(new CreateNodeRequest(location, workspace, child)); } else { if (additionalProperties == null || additionalProperties.length == 0) { requests.add(new CreateNodeRequest(location, workspace, child, firstProperty)); } else { Iterator<Property> iter = new Iterator<Property>() { requests.add(new CreateNodeRequest(location, workspace, child, iter));
public void create( Path path, Iterable<Property> properties ) { assert path != null; Path parent = path.getParent(); Name child = path.getLastSegment().getName(); requests.add(new CreateNodeRequest(Location.create(parent), workspace, child, properties)); }
CreateNodeRequest create = new CreateNodeRequest(parent, workspaceName, childName, nodePoperties);
ProxyNode proxy = projectedNode.asProxy(); CreateNodeRequest pushDownRequest = new CreateNodeRequest(proxy.location(), proxy.workspaceName(), request.named(), request.conflictBehavior(), request.properties());