return new ApplyFunctionAction<Batch>(function, getCurrentWorkspaceName(), this) {
/** * Request to delete the node at the given location. * <p> * Like all other methods on the {@link Batch}, the request will be performed when the {@link #execute()} method is * called. * </p> * * @param at the location of the node that is to be deleted * @return an object that may be used to start another request */ public BatchConjunction delete( Location at ) { assertNotExecuted(); this.requestQueue.deleteBranch(at, getCurrentWorkspaceName()); return nextRequests; }
protected final CreateAction<Batch> create( Location parent, Name child ) { return new CreateAction<Batch>(this, parent, getCurrentWorkspaceName(), child) { @Override protected Batch submit( Location parent, String workspaceName, Name childName, Collection<Property> properties, NodeConflictBehavior behavior ) { requestQueue.createNode(parent, workspaceName, childName, properties.iterator(), behavior); return Batch.this; } }; }
public BatchConjunction at( Location location ) { requestQueue.readBranch(location, getCurrentWorkspaceName(), depth); return Batch.this.nextRequests; }
public BatchConjunction on( Location location ) { requestQueue.readAllProperties(location, getCurrentWorkspaceName()); return Batch.this.nextRequests; }
public BatchConjunction on( Location location ) { requestQueue.removeProperties(location, getCurrentWorkspaceName(), propertyNames); return nextRequests; }
@Override protected BatchConjunction submit( String fromWorkspaceName, Locations from, Location into, Name copyName ) { String intoWorkspaceName = getCurrentWorkspaceName(); if (fromWorkspaceName == null) fromWorkspaceName = intoWorkspaceName; do { requestQueue.copyBranch(from.getLocation(), fromWorkspaceName, into, intoWorkspaceName, copyName, null); } while ((from = from.next()) != null); return and(); } };
/** * Request to read the node at the supplied location. * <p> * Like all other methods on the {@link Batch}, the request will be performed when the {@link #execute()} method is * called. * </p> * * @param location the location of the node that is to be read * @return the interface that can either execute the batched requests or continue to add additional requests to the batch */ public BatchConjunction read( Location location ) { assertNotExecuted(); requestQueue.readNode(location, getCurrentWorkspaceName()); return nextRequests; }
public BatchConjunction on( Location at ) { requestQueue.readProperty(at, getCurrentWorkspaceName(), name); return Batch.this.nextRequests; } };
public RemoveValue<Batch> removeValue( Object value ) { return new RemoveValueAction<Batch>(this, this.getCurrentWorkspaceName(), value) { @Override protected Batch submit( String workspaceName, Location on, Name property, List<Object> values ) { requestQueue.removeValues(workspaceName, on, property, values); return nextRequests.and(); } }; }
public BatchConjunction on( Location location ) { requestQueue.setProperties(location, getCurrentWorkspaceName(), properties); return nextRequests; }
public BatchConjunction on( Location location ) { requestQueue.setProperties(location, getCurrentWorkspaceName(), properties); return nextRequests; }
public BatchConjunction on( Location location ) { requestQueue.removeProperties(location, getCurrentWorkspaceName(), names); return nextRequests; }
@Override protected BatchConjunction submit( Location target, org.modeshape.graph.request.LockBranchRequest.LockScope lockScope, long lockTimeoutInMillis ) { String workspaceName = getCurrentWorkspaceName(); requestQueue.lockBranch(workspaceName, target, lockScope, lockTimeoutInMillis); return and(); } };
public BatchConjunction of( Location at ) { requestQueue.readAllChildren(at, getCurrentWorkspaceName()); return Batch.this.nextRequests; } };
public AddValue<Batch> addValue( Object value ) { return new AddValueAction<Batch>(this, this.getCurrentWorkspaceName(), value) { @Override protected Batch submit( String workspaceName, Location on, Name property, List<Object> values ) { requestQueue.addValues(workspaceName, on, property, values); return nextRequests.and(); } }; }
@Override protected BatchConjunction submit( Locations from, Location into, Location before, Name newName ) { String workspaceName = getCurrentWorkspaceName(); do { requestQueue.moveBranch(from.getLocation(), into, before, workspaceName, newName); } while ((from = from.next()) != null); return and(); } };