Index: dna-cnd/src/test/java/org/jboss/dna/cnd/CndImporterTest.java =================================================================== --- dna-cnd/src/test/java/org/jboss/dna/cnd/CndImporterTest.java (revision 1064) +++ dna-cnd/src/test/java/org/jboss/dna/cnd/CndImporterTest.java (working copy) @@ -82,7 +82,7 @@ // Set up the path where the content will go, and make sure that path exists in the repository ... rootPath = context.getValueFactories().getPathFactory().create("/a"); - graph.create(rootPath); + graph.create(rootPath).and(); // Now set up the destination ... destination = new GraphBatchDestination(graph.batch()); Index: dna-graph/src/main/java/org/jboss/dna/graph/connector/map/MapRequestProcessor.java =================================================================== --- dna-graph/src/main/java/org/jboss/dna/graph/connector/map/MapRequestProcessor.java (revision 1066) +++ dna-graph/src/main/java/org/jboss/dna/graph/connector/map/MapRequestProcessor.java (working copy) @@ -201,9 +201,19 @@ } switch (request.conflictBehavior()) { case APPEND: - case DO_NOT_REPLACE: node = workspace.createNode(getExecutionContext(), parentNode, request.named(), uuid); break; + case DO_NOT_REPLACE: + for (MapNode child : parentNode.getChildren()) { + if (request.named().equals(child.getName().getName())) { + node = child; + break; + } + } + if (node == null) { + node = workspace.createNode(getExecutionContext(), parentNode, request.named(), uuid); + } + break; case REPLACE: // See if the node already exists (this doesn't record an error on the request) ... node = getTargetNode(workspace, null, Location.create(pathFactory.create(parent, request.named()), uuid)); Index: dna-graph/src/main/java/org/jboss/dna/graph/Graph.java =================================================================== --- dna-graph/src/main/java/org/jboss/dna/graph/Graph.java (revision 1066) +++ dna-graph/src/main/java/org/jboss/dna/graph/Graph.java (working copy) @@ -1037,229 +1037,145 @@ } /** - * Begin the request to create a node located at the supplied path. This request is submitted to the repository immediately. + * Begin the request to create a node located at the supplied path. *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. + * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method + * is called. *

* * @param atPath the path to the node that is to be created. - * @return an object that may be used to start another request + * @return the object that can be used to specify addition properties for the new node to be copied or the location of the + * node where the node is to be created */ - public Conjunction create( String atPath ) { - Path at = createPath(atPath); - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, EMPTY_PROPERTIES); - return nextGraph; + public Create create( String atPath ) { + return create(createPath(atPath)); } /** - * Begin the request to create a node located at the supplied path. This request is submitted to the repository immediately. + * Begin the request to create a node located at the supplied path. *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. + * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method + * is called. *

* - * @param at the path to the node that is to be created. - * @return an object that may be used to start another request + * @param atPath the path to the node that is to be created. + * @param property a property for the new node + * @return the object that can be used to specify addition properties for the new node to be copied or the location of the + * node where the node is to be created */ - public Conjunction create( final Path at ) { - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, EMPTY_PROPERTIES); - return nextGraph; + public Create create( String atPath, + Property property ) { + return create(createPath(atPath)).with(property); } /** - * Begin the request to create a node located at the supplied path. This request is submitted to the repository immediately. + * Begin the request to create a node located at the supplied path. *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. + * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method + * is called. *

* * @param atPath the path to the node that is to be created. - * @param properties the properties for the new node - * @return an object that may be used to start another request + * @param firstProperty a property for the new node + * @param additionalProperties additional properties for the new node + * @return the object that can be used to specify addition properties for the new node to be copied or the location of the + * node where the node is to be created */ - public Conjunction create( String atPath, - Property... properties ) { - Path at = createPath(atPath); - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, properties); - return nextGraph; + public Create create( String atPath, + Property firstProperty, + Property... additionalProperties ) { + return create(createPath(atPath)).with(firstProperty, additionalProperties); } /** - * Begin the request to create a node located at the supplied path. This request is submitted to the repository immediately. + * Begin the request to create a node located at the supplied path. *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. + * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method + * is called. *

* * @param at the path to the node that is to be created. - * @param properties the properties for the new node - * @return an object that may be used to start another request + * @return the object that can be used to specify addition properties for the new node to be copied or the location of the + * node where the node is to be created */ - public Conjunction create( Path at, - Property... properties ) { + public final Create create( Path at ) { CheckArg.isNotNull(at, "at"); Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, properties); - return nextGraph; + Name name = at.getLastSegment().getName(); + return create(Location.create(parent), name); } - /** - * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to - * the repository immediately. - *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. - *

- * - * @param at the path to the node that is to be created. - * @param properties the properties for the new node - * @return an object that may be used to start another request - */ - public Conjunction create( Path at, - Iterable properties ) { - CheckArg.isNotNull(at, "at"); - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, properties.iterator()); - return nextGraph; - } + protected final CreateAction create( Location parent, + Name child ) { + return new CreateAction(this, parent, getCurrentWorkspaceName(), child) { + @Override + protected Graph submit( Location parent, + String workspaceName, + Name childName, + Collection properties, + NodeConflictBehavior behavior ) { + requests.createNode(parent, workspaceName, childName, properties.iterator(), behavior); + return Graph.this; + } - /** - * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to - * the repository immediately. - *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. - *

- * - * @param atPath the path to the node that is to be created. - * @return an object that may be used to start another request - */ - public GetNodeConjunction createIfMissing( String atPath ) { - Path at = createPath(atPath); - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - Location location = requests.createNode(Location.create(parent), - getCurrentWorkspaceName(), - child, - EMPTY_PROPERTIES, - NodeConflictBehavior.UPDATE).getActualLocationOfNode(); - return new GetNodeOrReturnGraph(location); + }; } /** - * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to - * the repository immediately. + * Begin the request to create a node located at the supplied path. *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. + * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method + * is called. *

* * @param at the path to the node that is to be created. - * @return an object that may be used to start another request + * @param properties the iterator over the properties for the new node + * @return the object that can be used to specify addition properties for the new node to be copied or the location of the + * node where the node is to be created */ - public GetNodeConjunction createIfMissing( final Path at ) { - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - Location location = requests.createNode(Location.create(parent), - getCurrentWorkspaceName(), - child, - EMPTY_PROPERTIES, - NodeConflictBehavior.UPDATE).getActualLocationOfNode(); - return new GetNodeOrReturnGraph(location); + public Create create( Path at, + Iterable properties ) { + Create action = create(at); + for (Property property : properties) { + action.and(property); + } + return action; } /** - * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to - * the repository immediately. + * Begin the request to create a node located at the supplied path. *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. + * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method + * is called. *

* - * @param atPath the path to the node that is to be created. - * @param properties the properties for the new node - * @return an object that may be used to start another request - */ - public GetNodeConjunction createIfMissing( String atPath, - Property... properties ) { - Path at = createPath(atPath); - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - Location location = requests.createNode(Location.create(parent), - getCurrentWorkspaceName(), - child, - properties, - NodeConflictBehavior.UPDATE).getActualLocationOfNode(); - return new GetNodeOrReturnGraph(location); - } - - /** - * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to - * the repository immediately. - *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. - *

- * * @param at the path to the node that is to be created. - * @param properties the properties for the new node - * @return an object that may be used to start another request + * @param property a property for the new node + * @return the object that can be used to specify addition properties for the new node to be copied or the location of the + * node where the node is to be created */ - public GetNodeConjunction createIfMissing( Path at, - Property... properties ) { - CheckArg.isNotNull(at, "at"); - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - Location location = requests.createNode(Location.create(parent), - getCurrentWorkspaceName(), - child, - properties, - NodeConflictBehavior.UPDATE).getActualLocationOfNode(); - return new GetNodeOrReturnGraph(location); + public Create create( Path at, + Property property ) { + return create(at).with(property); } /** - * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to - * the repository immediately. + * Begin the request to create a node located at the supplied path. *

- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient - * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the - * parent or new node. + * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method + * is called. *

* * @param at the path to the node that is to be created. - * @param properties the properties for the new node - * @return an object that may be used to start another request + * @param firstProperty a property for the new node + * @param additionalProperties additional properties for the new node + * @return the object that can be used to specify addition properties for the new node to be copied or the location of the + * node where the node is to be created */ - public GetNodeConjunction createIfMissing( Path at, - Iterable properties ) { - CheckArg.isNotNull(at, "at"); - Path parent = at.getParent(); - Name child = at.getLastSegment().getName(); - Location location = requests.createNode(Location.create(parent), - getCurrentWorkspaceName(), - child, - properties.iterator(), - NodeConflictBehavior.UPDATE).getActualLocationOfNode(); - return new GetNodeOrReturnGraph(location); + public Create create( Path at, + Property firstProperty, + Property... additionalProperties ) { + return create(at).with(firstProperty, additionalProperties); } /** @@ -3001,23 +2917,13 @@ requestQueue.createNode(parent, workspaceName, childName, properties.iterator(), behavior); return Batch.this; } - - /** - * {@inheritDoc} - * - * @see org.jboss.dna.graph.Graph.Executable#execute() - */ - public Results execute() { - and(); - return Batch.this.execute(); - } }; } /** * Begin the request to create a node located at the supplied path. *

- * Like all other methods on the {@link Batch}, the request will be performed when the {@link #execute()} method is + * Like all other methods on the {@link Batch}, the request will be performed when the {@link Batch#execute()} method is * called. *

* @@ -4389,7 +4295,7 @@ * @param The interface that is to be returned when this create request is completed * @author Randall Hauch */ - public interface Create extends Conjunction, Executable { + public interface Create extends Conjunction { /** * Create the node only if there is no existing node with the same {@link Path.Segment#getName() name} (ignoring * {@link Path.Segment#getIndex() same-name-sibling indexes}). @@ -5438,37 +5344,6 @@ public interface BatchConjunction extends Conjunction, Executable { } - public interface GetNodeConjunction extends Conjunction { - Node andReturn(); - } - - protected class GetNodeOrReturnGraph implements GetNodeConjunction { - private final Location location; - - GetNodeOrReturnGraph( Location location ) { - assert location != null; - this.location = location; - } - - /** - * {@inheritDoc} - * - * @see org.jboss.dna.graph.Graph.Conjunction#and() - */ - public Graph and() { - return Graph.this; - } - - /** - * {@inheritDoc} - * - * @see org.jboss.dna.graph.Graph.GetNodeConjunction#andReturn() - */ - public Node andReturn() { - return and().getNodeAt(location); - } - } - // ---------------------------------------------------------------------------------------------------------------- // Node Implementation // ---------------------------------------------------------------------------------------------------------------- @@ -6383,7 +6258,7 @@ * * @see org.jboss.dna.graph.Graph.Create#ifAbsent() */ - public Create ifAbsent() { + public CreateAction ifAbsent() { conflictBehavior = NodeConflictBehavior.DO_NOT_REPLACE; return this; } @@ -6393,7 +6268,7 @@ * * @see org.jboss.dna.graph.Graph.Create#orReplace() */ - public Create orReplace() { + public CreateAction orReplace() { conflictBehavior = NodeConflictBehavior.REPLACE; return this; } @@ -6403,7 +6278,7 @@ * * @see org.jboss.dna.graph.Graph.Create#orUpdate() */ - public Create orUpdate() { + public CreateAction orUpdate() { conflictBehavior = NodeConflictBehavior.UPDATE; return this; } @@ -6413,7 +6288,7 @@ * * @see org.jboss.dna.graph.Graph.Create#byAppending() */ - public Create byAppending() { + public CreateAction byAppending() { conflictBehavior = NodeConflictBehavior.APPEND; return this; } Index: dna-graph/src/main/java/org/jboss/dna/graph/property/basic/GraphNamespaceRegistry.java =================================================================== --- dna-graph/src/main/java/org/jboss/dna/graph/property/basic/GraphNamespaceRegistry.java (revision 1064) +++ dna-graph/src/main/java/org/jboss/dna/graph/property/basic/GraphNamespaceRegistry.java (working copy) @@ -88,7 +88,7 @@ this.store.getNodeAt(this.parentOfNamespaceNodes); } catch (PathNotFoundException pnfe) { // The node did not already exist - create it! - this.store.create(parentOfNamespaceNodes); + this.store.create(parentOfNamespaceNodes).and(); this.store.set(JcrLexicon.PRIMARY_TYPE).on(parentOfNamespaceNodes).to(DnaLexicon.NAMESPACES); } } @@ -314,9 +314,10 @@ Property uriProperty = store.getContext().getPropertyFactory().create(uriPropertyName, namespaceUri); List props = new ArrayList(namespaceProperties); props.add(uriProperty); - Location actualLocation = store.createIfMissing(pathToNamespaceNode, props).andReturn().getLocation(); + // Location actualLocation = store.createIfMissing(pathToNamespaceNode, props).andReturn().getLocation(); + store.create(pathToNamespaceNode, props).ifAbsent().and(); - return getPrefixFor(actualLocation.getPath()); + return getPrefixFor(pathToNamespaceNode); } } catch (PathNotFoundException e) { Index: dna-graph/src/test/java/org/jboss/dna/graph/connector/federation/AbstractFederatedRepositorySourceIntegrationTest.java =================================================================== --- dna-graph/src/test/java/org/jboss/dna/graph/connector/federation/AbstractFederatedRepositorySourceIntegrationTest.java (revision 1064) +++ dna-graph/src/test/java/org/jboss/dna/graph/connector/federation/AbstractFederatedRepositorySourceIntegrationTest.java (working copy) @@ -94,10 +94,10 @@ configRepositorySource.setName("Configuration Repository"); configRepositorySource.setDefaultWorkspaceName(configurationWorkspaceName); Graph config = Graph.create(configRepositorySource, context); - config.create("/a"); - config.create("/a/b"); - config.create("/a/b/Test Repository"); - config.create("/a/b/Test Repository/dna:workspaces"); + config.create("/a").and(); + config.create("/a/b").and(); + config.create("/a/b/Test Repository").and(); + config.create("/a/b/Test Repository/dna:workspaces").and(); repositoryContext = new RepositoryContext() { public ExecutionContext getExecutionContext() { @@ -178,8 +178,8 @@ String projectionPath = wsPath + "/dna:projections/" + projectionName; Graph config = Graph.create(configRepositorySource, context); config.useWorkspace(configurationWorkspaceName); - config.createIfMissing(wsPath); - config.createIfMissing(wsPath + "/dna:projections"); + config.create(wsPath).ifAbsent().and(); + config.create(wsPath + "/dna:projections").ifAbsent().and(); config.createAt(projectionPath) .with(DnaLexicon.PROJECTION_RULES, (Object[])projectionRules) .with(DnaLexicon.SOURCE_NAME, sourceName) Index: dna-graph/src/test/java/org/jboss/dna/graph/connector/test/NotWritableConnectorTest.java =================================================================== --- dna-graph/src/test/java/org/jboss/dna/graph/connector/test/NotWritableConnectorTest.java (revision 1064) +++ dna-graph/src/test/java/org/jboss/dna/graph/connector/test/NotWritableConnectorTest.java (working copy) @@ -75,7 +75,7 @@ @Test( expected = InvalidRequestException.class ) public void shouldNowAllowAddChildUnderRootNode() { - graph.batch().create("/a").with("propB", "valueB").and("propC", "valueC").execute(); + graph.batch().create("/a").with("propB", "valueB").and("propC", "valueC").and().execute(); } @Test( expected = InvalidRequestException.class ) @@ -84,7 +84,7 @@ for (int i = 0; i != 100; ++i) { create = create.with("property" + i, "value" + i); } - create.execute(); + create.and().execute(); } @Test( expected = InvalidRequestException.class ) Index: dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java =================================================================== --- dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java (revision 1066) +++ dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java (working copy) @@ -96,7 +96,7 @@ @Test public void shouldAddChildUnderRootNode() { - graph.batch().create("/a").with("propB", "valueB").and("propC", "valueC").execute(); + graph.batch().create("/a").with("propB", "valueB").and("propC", "valueC").and().execute(); // Now look up the root node ... Node root = graph.getNodeAt("/"); assertThat(root, is(notNullValue())); @@ -115,7 +115,7 @@ public void shouldAddChildrenAndSettingProperties() { graph.batch().set("propA").to("valueA").on("/").and().create("/a").with("propB", "valueB").and("propC", "valueC").and().create("/b").with("propD", "valueD").and("propE", - "valueE").execute(); + "valueE").and().execute(); // Now look up the root node ... Node root = graph.getNodeAt("/"); assertThat(root, is(notNullValue())); @@ -159,7 +159,7 @@ for (int i = 0; i != 100; ++i) { create = create.with("property" + i, "value" + i); } - create.execute(); + create.and().execute(); // Now look up all the properties ... Node nodeA = graph.getNodeAt("/a"); assertThat(nodeA, is(notNullValue())); @@ -176,7 +176,7 @@ for (int i = 0; i != 10; ++i) { create = create.with("property" + i, "value" + i); } - create.execute(); + create.and().execute(); // Now look up all the properties ... Node nodeA = graph.getNodeAt("/a"); @@ -217,7 +217,7 @@ } create = create.with("largeProperty1", validLargeValues[0]); create = create.with("largeProperty2", validLargeValues[1]); - create.execute(); + create.and().execute(); // Now look up all the properties ... Node nodeA = graph.getNodeAt("/a"); @@ -828,7 +828,7 @@ graph.useWorkspace(defaultWorkspaceName); - graph.create("/newUuids"); + graph.create("/newUuids").and(); graph.copy("/node1").fromWorkspace(workspaceName).to("/newUuids/node1"); /* @@ -865,7 +865,7 @@ graph.useWorkspace(defaultWorkspaceName); - graph.create("/newUuids"); + graph.create("/newUuids").and(); // Copy once to get the UUID into the default workspace //graph.copy("/node1/node1/node1").failingIfUuidsMatch().fromWorkspace(workspaceName).to("/newUuids/node1"); graph.clone("/node1/node1/node1").fromWorkspace(workspaceName).as(name("node1")).into("/newUuids").failingIfAnyUuidsMatch(); @@ -902,7 +902,7 @@ graph.useWorkspace(defaultWorkspaceName); - graph.create("/newUuids"); + graph.create("/newUuids").and(); // Copy once to get the UUID into the default workspace // graph.copy("/node1").replacingExistingNodesWithSameUuids().fromWorkspace(workspaceName).to("/newUuids/node1"); graph.clone("/node1").fromWorkspace(workspaceName).as(name("node1")).into("/newUuids").replacingExistingNodesWithSameUuids(); @@ -966,13 +966,13 @@ graph.useWorkspace(defaultWorkspaceName); - graph.create("/segmentTestUuids"); + graph.create("/segmentTestUuids").and(); // Copy once to get the UUID into the default workspace graph.clone("/node1").fromWorkspace(workspaceName).as(name("node1")).into("/segmentTestUuids").failingIfAnyUuidsMatch(); // Create a new child node that in the target workspace that has no corresponding node in the source workspace PropertyFactory propFactory = context.getPropertyFactory(); - graph.create("/segmentTestUuids/node1", propFactory.create(name("identifier"), "backup copy")); + graph.create("/segmentTestUuids/node1", propFactory.create(name("identifier"), "backup copy")).and(); // Copy again to test the behavior now that the UUIDs are already in the default workspace // This should remove /newUuids/node1/shouldBeRemoved Index: dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java =================================================================== --- dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java (revision 1066) +++ dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java (working copy) @@ -432,32 +432,32 @@ @Test public void shouldCreateNode() { - graph.create(validPath); + graph.create(validPath).and(); assertThat(numberOfExecutions, is(1)); assertNextRequestIsCreate(Location.create(validPath.getParent()), "c"); assertNoMoreRequests(); - graph.create(validPath, validIdProperty1); + graph.create(validPath, validIdProperty1).and(); assertThat(numberOfExecutions, is(1)); assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1); assertNoMoreRequests(); - graph.create(validPath, validIdProperty1, validIdProperty2); + graph.create(validPath, validIdProperty1, validIdProperty2).and(); assertThat(numberOfExecutions, is(1)); assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1, validIdProperty2); assertNoMoreRequests(); - graph.create(validPathString); + graph.create(validPathString).and(); assertThat(numberOfExecutions, is(1)); assertNextRequestIsCreate(Location.create(validPath.getParent()), "c"); assertNoMoreRequests(); - graph.create(validPathString, validIdProperty1); + graph.create(validPathString, validIdProperty1).and(); assertThat(numberOfExecutions, is(1)); assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1); assertNoMoreRequests(); - graph.create(validPathString, validIdProperty1, validIdProperty2); + graph.create(validPathString, validIdProperty1, validIdProperty2).and(); assertThat(numberOfExecutions, is(1)); assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1, validIdProperty2); assertNoMoreRequests(); @@ -522,7 +522,7 @@ @Test public void shouldCreateNodesWithBatch() { graph.batch().create(validPath, validIdProperty1).and().remove("prop").on(validPathString).execute(); - graph.batch().move(validPath).and(validPath).into(validPathString).and().create(validPath).execute(); + graph.batch().move(validPath).and(validPath).into(validPathString).and().create(validPath).and().execute(); graph.batch().createUnder(validLocation).nodeNamed("someName").and().delete(validLocation).execute(); } Index: dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java =================================================================== --- dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java (revision 1067) +++ dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java (working copy) @@ -159,7 +159,7 @@ Path root = pathFactory.createRootPath(); Path systemPath = pathFactory.create(root, JcrLexicon.SYSTEM); Property systemPrimaryType = context.getPropertyFactory().create(JcrLexicon.PRIMARY_TYPE, DnaLexicon.SYSTEM); - namespaceGraph.createIfMissing(systemPath, systemPrimaryType); + namespaceGraph.create(systemPath, systemPrimaryType).ifAbsent().and(); Name uriProperty = DnaLexicon.NAMESPACE_URI; Path namespacesPath = pathFactory.create(systemPath, DnaLexicon.NAMESPACES); Index: dna-jcr/src/main/java/org/jboss/dna/jcr/RepositoryNodeTypeManager.java =================================================================== --- dna-jcr/src/main/java/org/jboss/dna/jcr/RepositoryNodeTypeManager.java (revision 1064) +++ dna-jcr/src/main/java/org/jboss/dna/jcr/RepositoryNodeTypeManager.java (working copy) @@ -927,7 +927,7 @@ PropertyFactory propertyFactory = context.getPropertyFactory(); graph.create(parentOfTypeNodes, propertyFactory.create(JcrLexicon.PRIMARY_TYPE, - DnaLexicon.NODE_TYPES.getString(context.getNamespaceRegistry()))); + DnaLexicon.NODE_TYPES.getString(context.getNamespaceRegistry()))).and(); } Graph.Batch batch = graph.batch(); Index: dna-jcr/src/test/java/org/jboss/dna/jcr/AbstractJcrAccessTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/AbstractJcrAccessTest.java (revision 1064) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/AbstractJcrAccessTest.java (working copy) @@ -74,7 +74,7 @@ Graph graph = Graph.create(source, context); // Make sure the path to the namespaces exists ... - graph.create("/jcr:system"); // .and().create("/jcr:system/dna:namespaces"); + graph.create("/jcr:system").and(); // .and().create("/jcr:system/dna:namespaces"); graph.set("jcr:primaryType").on("/jcr:system").to(DnaLexicon.SYSTEM); // Stub out the connection factory ... Index: dna-jcr/src/test/java/org/jboss/dna/jcr/ImportExportTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/ImportExportTest.java (revision 1064) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/ImportExportTest.java (working copy) @@ -82,7 +82,7 @@ Graph graph = Graph.create(source, context); // Make sure the path to the namespaces exists ... - graph.create("/jcr:system"); // .and().create("/jcr:system/dna:namespaces"); + graph.create("/jcr:system").and(); // .and().create("/jcr:system/dna:namespaces"); graph.set("jcr:primaryType").on("/jcr:system").to(DnaLexicon.SYSTEM); // Stub out the connection factory ... Index: dna-jcr/src/test/java/org/jboss/dna/jcr/JcrSessionTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/JcrSessionTest.java (revision 1070) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/JcrSessionTest.java (working copy) @@ -79,7 +79,7 @@ @Override protected void initializeContent() { - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); graph.set("booleanProperty").on("/a/b").to(true); graph.set("stringProperty").on("/a/b/c").to("value"); graph.set("jcr:mixinTypes").on("/a").to("mix:lockable"); @@ -87,7 +87,7 @@ graph.set("multiLineProperty").on("/a/b/c").to(MULTI_LINE_VALUE); // Make sure the path to the namespaces exists ... - graph.create("/jcr:system").and().create("/jcr:system/dna:namespaces"); + graph.create("/jcr:system").and().create("/jcr:system/dna:namespaces").and(); } Index: dna-jcr/src/test/java/org/jboss/dna/jcr/JcrWorkspaceTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/JcrWorkspaceTest.java (revision 1070) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/JcrWorkspaceTest.java (working copy) @@ -64,13 +64,13 @@ @Override protected void initializeContent() { - graph.create("/a").and().create("/a/b").and().create("/a/b/c").and().create("/b"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and().create("/b").and(); graph.set("booleanProperty").on("/a/b").to(true); graph.set("jcr:primaryType").on("/a/b").to("nt:unstructured"); graph.set("stringProperty").on("/a/b/c").to("value"); // Make sure the path to the namespaces exists ... - graph.create("/jcr:system").and().create("/jcr:system/dna:namespaces"); + graph.create("/jcr:system").and().create("/jcr:system/dna:namespaces").ifAbsent().and(); } Index: dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java (revision 1070) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java (working copy) @@ -84,7 +84,7 @@ @Test( expected = IllegalArgumentException.class ) public void shouldNotAllowNullMixinTypeName() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set("jcr:primaryType").on("/a").to(PRIMARY_TYPE_A); Node rootNode = session.getRootNode(); @@ -95,7 +95,7 @@ @Test( expected = IllegalArgumentException.class ) public void shouldNotAllowEmptyMixinTypeName() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set("jcr:primaryType").on("/a").to(PRIMARY_TYPE_A); Node rootNode = session.getRootNode(); @@ -106,7 +106,7 @@ @Test( expected = NoSuchNodeTypeException.class ) public void shouldNotAllowInvalidMixinTypeName() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A); Node rootNode = session.getRootNode(); @@ -126,7 +126,7 @@ @Test public void shouldAllowAddingMixinIfNoConflict() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A); graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(JcrMixLexicon.REFERENCEABLE.getString(registry)); @@ -138,7 +138,7 @@ @Test public void shouldNotAllowAddingMixinIfPrimaryTypeConflicts() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A); graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(JcrMixLexicon.REFERENCEABLE.getString(registry)); @@ -150,7 +150,7 @@ @Test public void shouldNotAllowAddingMixinIfMixinTypeConflicts() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.BASE.getString(registry)); graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(MIXIN_TYPE_B); @@ -162,7 +162,7 @@ @Test public void shouldAutoCreateAutoCreatedPropertiesOnAddition() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.BASE.getString(registry)); Node rootNode = session.getRootNode(); @@ -178,7 +178,7 @@ @Test public void shouldAutoCreateAutoCreatedChildNodesOnAddition() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.BASE.getString(registry)); Node rootNode = session.getRootNode(); @@ -194,7 +194,7 @@ @Test( expected = ConstraintViolationException.class ) public void shouldNotAllowAdditionIfResidualPropertyConflicts() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED.getString(registry)); Node rootNode = session.getRootNode(); @@ -207,7 +207,7 @@ @Test public void shouldAllowAdditionIfResidualPropertyDoesNotConflict() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED.getString(registry)); Node rootNode = session.getRootNode(); @@ -220,7 +220,7 @@ @Test( expected = ConstraintViolationException.class ) public void shouldNotAllowAdditionIfResidualChildNodeConflicts() throws Exception { - graph.create("/a").and().create("/a/" + CHILD_NODE_B); + graph.create("/a").and().create("/a/" + CHILD_NODE_B).and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED.getString(registry)); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a/" + CHILD_NODE_B).to(JcrNtLexicon.BASE.getString(registry)); @@ -233,7 +233,7 @@ @Test public void shouldAllowAdditionIfResidualChildNodeDoesNotConflict() throws Exception { - graph.create("/a").and().create("/a/" + CHILD_NODE_B); + graph.create("/a").and().create("/a/" + CHILD_NODE_B).and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED.getString(registry)); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a/" + CHILD_NODE_B).to(JcrNtLexicon.UNSTRUCTURED.getString(registry)); @@ -260,7 +260,7 @@ @Test public void shouldAllowSettingNewPropertyAfterAddingMixin() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A); graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(JcrMixLexicon.REFERENCEABLE.getString(registry)); @@ -283,7 +283,7 @@ @Test public void shouldAllowAddingNewChildNodeAfterAddingMixin() throws Exception { - graph.create("/a"); + graph.create("/a").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A); graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(JcrMixLexicon.REFERENCEABLE.getString(registry)); @@ -370,7 +370,7 @@ @Test( expected = ConstraintViolationException.class ) public void shouldNotAllowRemovalIfExistingChildNodeWouldHaveNoDefinition() throws Exception { - graph.create("/a").and().create("/a/nodeB"); + graph.create("/a").and().create("/a/nodeB").and(); graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A); graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(MIXIN_TYPE_B); Index: dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java (revision 1070) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java (working copy) @@ -65,10 +65,10 @@ @Override protected void initializeContent() { // Make sure the path to the namespaces exists ... - graph.create("/jcr:system"); // .and().create("/jcr:system/dna:namespaces"); + graph.create("/jcr:system").and(); // .and().create("/jcr:system/dna:namespaces"); graph.set("jcr:primaryType").on("/jcr:system").to(DnaLexicon.SYSTEM); - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); graph.set("jcr:mixinTypes").on("/a").to(JcrMixLexicon.REFERENCEABLE); } Index: dna-repository/src/test/java/org/jboss/dna/repository/RepositoryServiceTest.java =================================================================== --- dna-repository/src/test/java/org/jboss/dna/repository/RepositoryServiceTest.java (revision 1064) +++ dna-repository/src/test/java/org/jboss/dna/repository/RepositoryServiceTest.java (working copy) @@ -119,7 +119,7 @@ @Test public void shouldStartUpUsingConfigurationRepositoryThatContainsNoSources() throws Exception { // Set up the configuration repository to contain NO sources ... - configRepository.create("/dna:sources"); + configRepository.create("/dna:sources").and(); // Now, start up the service ... service.getAdministrator().start(); @@ -132,8 +132,8 @@ public void shouldStartUpAndCreateRepositoryUsingConfigurationRepositoryThatContainsNoSources() { // Set up the configuration repository ... configRepository.useWorkspace("default"); - configRepository.create("/dna:sources"); - configRepository.create("/dna:sources/source A"); + configRepository.create("/dna:sources").and(); + configRepository.create("/dna:sources/source A").and(); final String className = InMemoryRepositorySource.class.getName(); configRepository.set(DnaLexicon.CLASSNAME).on("/dna:sources/source A").to(className); @@ -141,13 +141,13 @@ configRepository.set("retryLimit").on("/dna:sources/source A").to(3); String fedReposPath = "/dna:repositories/fed repos/"; - configRepository.create("/dna:repositories"); - configRepository.create("/dna:repositories/fed repos"); - configRepository.create("/dna:repositories/fed repos/dna:regions"); - configRepository.create("/dna:repositories/fed repos/dna:regions/source A"); - configRepository.create("/dna:repositories/fed repos/dna:regions/source B"); - configRepository.create("/dna:repositories/fed repos/dna:regions/source C"); - configRepository.create("/dna:repositories/fed repos/dna:regions/source D"); + configRepository.create("/dna:repositories").and(); + configRepository.create("/dna:repositories/fed repos").and(); + configRepository.create("/dna:repositories/fed repos/dna:regions").and(); + configRepository.create("/dna:repositories/fed repos/dna:regions/source A").and(); + configRepository.create("/dna:repositories/fed repos/dna:regions/source B").and(); + configRepository.create("/dna:repositories/fed repos/dna:regions/source C").and(); + configRepository.create("/dna:repositories/fed repos/dna:regions/source D").and(); configRepository.set(DnaLexicon.TIME_TO_EXPIRE).on(fedReposPath).to(20000); configRepository.set(DnaLexicon.PROJECTION_RULES).on(fedReposPath + "dna:regions/source A").to("/a/b/c => /sx/sy"); configRepository.set(DnaLexicon.PROJECTION_RULES).on(fedReposPath + "dna:regions/source B").to("/ => /"); @@ -193,9 +193,9 @@ // Set up the configuration repository ... configRepository.useWorkspace("default"); - configRepository.create("/dna:system"); - configRepository.create("/dna:system/dna:sources"); - configRepository.create("/dna:system/dna:sources/source A"); + configRepository.create("/dna:system").and(); + configRepository.create("/dna:system/dna:sources").and(); + configRepository.create("/dna:system/dna:sources/source A").and(); final String className = FakeRepositorySource.class.getName(); configRepository.set(DnaLexicon.CLASSNAME).on("/dna:system/dna:sources/source A").to(className); Index: dna-repository/src/test/java/org/jboss/dna/repository/sequencer/StreamSequencerAdapterTest.java =================================================================== --- dna-repository/src/test/java/org/jboss/dna/repository/sequencer/StreamSequencerAdapterTest.java (revision 1064) +++ dna-repository/src/test/java/org/jboss/dna/repository/sequencer/StreamSequencerAdapterTest.java (working copy) @@ -68,15 +68,15 @@ private StreamSequencer streamSequencer; private StreamSequencerAdapter sequencer; - private String[] validExpressions = {"/a/* => /output"}; - private SequencerConfig validConfig = new SequencerConfig("name", "desc", Collections.emptyMap(), + private final String[] validExpressions = {"/a/* => /output"}; + private final SequencerConfig validConfig = new SequencerConfig("name", "desc", Collections.emptyMap(), "something.class", null, validExpressions); private SequencerOutputMap sequencerOutput; - private String sampleData = "The little brown fox didn't something bad."; + private final String sampleData = "The little brown fox didn't something bad."; private ExecutionContext context; private SequencerContext seqContext; - private String repositorySourceName = "repository"; - private String repositoryWorkspaceName = ""; + private final String repositorySourceName = "repository"; + private final String repositoryWorkspaceName = ""; private Problems problems; private Graph graph; private Property sequencedProperty; @@ -124,8 +124,8 @@ }; StreamSequencerAdapter adapter = new StreamSequencerAdapter(streamSequencer); - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); - graph.create("/d").and().create("/d/e"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); + graph.create("/d").and().create("/d/e").and(); graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes())); Node inputNode = graph.getNodeAt("/a/b/c"); @@ -174,8 +174,8 @@ public void shouldExecuteSequencerOnExistingNodeAndOutputToExistingNode() throws Exception { // Set up the repository for the test ... - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); - graph.create("/d").and().create("/d/e"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); + graph.create("/d").and().create("/d/e").and(); graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes())); Node nodeC = graph.getNodeAt("/a/b/c"); Node nodeE = graph.getNodeAt("/d/e"); @@ -209,8 +209,8 @@ public void shouldExecuteSequencerOnExistingNodeWithMissingSequencedPropertyAndOutputToExistingNode() throws Exception { // Set up the repository for the test ... - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); - graph.create("/d").and().create("/d/e"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); + graph.create("/d").and().create("/d/e").and(); Node nodeC = graph.getNodeAt("/a/b/c"); Node nodeE = graph.getNodeAt("/d/e"); assertThat(nodeC, is(notNullValue())); @@ -245,8 +245,8 @@ public void shouldExecuteSequencerOnExistingNodeAndOutputToMultipleExistingNodes() throws Exception { // Set up the repository for the test ... - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); - graph.create("/d").and().create("/d/e"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); + graph.create("/d").and().create("/d/e").and(); // Set the property that will be sequenced ... graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes())); @@ -286,7 +286,7 @@ public void shouldExecuteSequencerOnExistingNodeAndOutputToNonExistingNode() throws Exception { // Set up the repository for the test ... - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); // Set the property that will be sequenced ... graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes())); @@ -325,7 +325,7 @@ public void shouldExecuteSequencerOnExistingNodeAndOutputToMultipleNonExistingNodes() throws Exception { // Set up the repository for the test ... - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); // Set the property that will be sequenced ... graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes())); @@ -430,7 +430,7 @@ @Test( expected = java.lang.AssertionError.class ) public void shouldNotAllowNullSequencedProperty() throws Exception { - graph.create("/a"); + graph.create("/a").and(); Node input = graph.getNodeAt("/a"); sequencer.createStreamSequencerContext(input, null, seqContext, problems); } @@ -439,7 +439,7 @@ public void shouldNotAllowNullExecutionContext() throws Exception { this.sequencedProperty = mock(Property.class); - graph.create("/a"); + graph.create("/a").and(); Node input = graph.getNodeAt("/a"); sequencer.createStreamSequencerContext(input, sequencedProperty, null, problems); } @@ -448,7 +448,7 @@ public void shouldProvideNamespaceRegistry() throws Exception { this.sequencedProperty = mock(Property.class); - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); Node input = graph.getNodeAt("/a/b/c"); StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input, sequencedProperty, @@ -461,7 +461,7 @@ public void shouldProvideValueFactories() throws Exception { this.sequencedProperty = mock(Property.class); - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); Node input = graph.getNodeAt("/a/b/c"); StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input, sequencedProperty, @@ -474,7 +474,7 @@ public void shouldProvidePathToInput() throws Exception { this.sequencedProperty = mock(Property.class); - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); Node input = graph.getNodeAt("/a/b/c"); StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input, sequencedProperty, @@ -487,7 +487,7 @@ public void shouldNeverReturnNullInputProperties() throws Exception { this.sequencedProperty = mock(Property.class); - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); Node input = graph.getNodeAt("/a/b/c"); StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input, sequencedProperty, @@ -501,7 +501,7 @@ public void shouldProvideInputProperties() throws Exception { this.sequencedProperty = mock(Property.class); - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); graph.set("x").on("/a/b/c").to(true); graph.set("y").on("/a/b/c").to(Arrays.asList(new String[] {"asdf", "xyzzy"})); Node input = graph.getNodeAt("/a/b/c"); @@ -521,7 +521,7 @@ public void shouldCreateSequencerContextThatProvidesMimeType() throws Exception { this.sequencedProperty = mock(Property.class); - graph.create("/a").and().create("/a/b").and().create("/a/b/c"); + graph.create("/a").and().create("/a/b").and().create("/a/b/c").and(); Node input = graph.getNodeAt("/a/b/c"); StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input, sequencedProperty, Index: extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/JpaConnectorWritingTest.java =================================================================== --- extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/JpaConnectorWritingTest.java (revision 1066) +++ extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/JpaConnectorWritingTest.java (working copy) @@ -90,14 +90,14 @@ graph.useWorkspace(defaultWorkspaceName); - graph.create("/newUuids"); + graph.create("/newUuids").and(); // Copy once to get the UUID into the default workspace //graph.copy("/node1").replacingExistingNodesWithSameUuids().fromWorkspace(workspaceName).to("/newUuids/node1"); graph.clone("/node1").fromWorkspace(workspaceName).as(name("node1")).into("/newUuids").replacingExistingNodesWithSameUuids(); // Create a new child node that in the target workspace that has no corresponding node in the source workspace - graph.create("/newUuids/node1/shouldBeRemoved"); - graph.create("/refererringNode"); + graph.create("/newUuids/node1/shouldBeRemoved").and(); + graph.create("/refererringNode").and(); graph.set("refProp").on("/refererringNode").to(graph.getNodeAt("/newUuids/node1/shouldBeRemoved")); // Now create a reference to this new node