/** * Add a request to verify the existance of the named workspace. * * @param workspaceName the desired name of the workspace, or null if the source's default workspace should be used * @return the request; never null */ public VerifyWorkspaceRequest verifyWorkspace( String workspaceName ) { return process(new VerifyWorkspaceRequest(workspaceName)); }
/** * Add a request to obtain the information about the available workspaces. * * @return the request; never null */ public GetWorkspacesRequest getWorkspaces() { GetWorkspacesRequest request = new GetWorkspacesRequest(); process(request); return request; }
/** * Add a request to read the branch at the supplied location, to a maximum depth of 2. * * @param at the location of the branch * @param workspaceName the name of the workspace containing the branch * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null or if the maximum depth is not positive */ public ReadBranchRequest readBranch( Location at, String workspaceName ) { return process(new ReadBranchRequest(at, workspaceName)); }
/** * Add a request to read the properties and number of children of a node at the supplied location. * * @param at the location of the node to be read * @param workspaceName the name of the workspace containing the node * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null */ public ReadNodeRequest readNode( Location at, String workspaceName ) { return process(new ReadNodeRequest(at, workspaceName)); }
/** * Add a request to read the children of a node at the supplied location in the designated workspace. * * @param of the location of the node whose children are to be read * @param workspaceName the name of the workspace * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null */ public ReadAllChildrenRequest readAllChildren( Location of, String workspaceName ) { return process(new ReadAllChildrenRequest(of, workspaceName)); }
/** * Add a request to read the properties and number of children of a node at the supplied location. * * @param of the location of the node whose children are to be read * @param workspaceName the name of the workspace * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null */ public ReadAllPropertiesRequest readAllProperties( Location of, String workspaceName ) { return process(new ReadAllPropertiesRequest(of, workspaceName)); }
/** * Add a request to destroy an existing workspace. * * @param workspaceName the name of the workspace that is to be destroyed * @return the request; never null * @throws IllegalArgumentException if the workspace name is null */ public DestroyWorkspaceRequest destroyWorkspace( String workspaceName ) { return process(new DestroyWorkspaceRequest(workspaceName)); }
/** * Add a request to verify the existance and location of a node at the supplied location. * * @param at the location of the node to be verified * @param workspaceName the name of the workspace containing the node * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null */ public VerifyNodeExistsRequest verifyNodeExists( Location at, String workspaceName ) { return process(new VerifyNodeExistsRequest(at, workspaceName)); }
/** * Add a request to delete a branch. * * @param at the location of the top node in the existing branch that is to be deleted * @param workspaceName the name of the workspace containing the parent * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null */ public DeleteBranchRequest deleteBranch( Location at, String workspaceName ) { return process(new DeleteBranchRequest(at, workspaceName)); }
/** * Add a request to create a new workspace, and specify the behavior should a workspace already exists with a name that * matches the desired name for the new workspace. * * @param desiredNameOfNewWorkspace the desired name of the new workspace * @param createConflictBehavior the behavior if a workspace already exists with the same name, or null if the default * behavior should be used * @return the request; never null */ public CreateWorkspaceRequest createWorkspace( String desiredNameOfNewWorkspace, CreateConflictBehavior createConflictBehavior ) { return process(new CreateWorkspaceRequest(desiredNameOfNewWorkspace, createConflictBehavior)); }
/** * Add a request to read the properties and number of children of a node at the supplied location. * * @param of the location of the node whose children are to be read * @param workspaceName the name of the workspace * @param propertyName the name of the property to read * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null */ public ReadPropertyRequest readProperty( Location of, String workspaceName, Name propertyName ) { return process(new ReadPropertyRequest(of, workspaceName, propertyName)); }
/** * Add a request to read the branch (of given depth) at the supplied location. * * @param at the location of the branch * @param workspaceName the name of the workspace containing the branch * @param maxDepth the maximum depth to read * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null or if the maximum depth is not positive */ public ReadBranchRequest readBranch( Location at, String workspaceName, int maxDepth ) { return process(new ReadBranchRequest(at, workspaceName, maxDepth)); }
/** * Create a request to move a branch from one location into another. * * @param from the location of the top node in the existing branch that is to be moved * @param into the location of the existing node into which the branch should be moved * @param workspaceName the name of the workspace * @return the request; never null * @throws IllegalArgumentException if any of the parameters are null */ public MoveBranchRequest moveBranch( Location from, Location into, String workspaceName ) { return process(new MoveBranchRequest(from, into, workspaceName, MoveBranchRequest.DEFAULT_CONFLICT_BEHAVIOR)); }
/** * Add a request to rename the node at the supplied location. * * @param at the location of the node to be read * @param workspaceName the name of the workspace containing the node * @param newName the new name for the node * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null */ public RenameNodeRequest renameNode( Location at, String workspaceName, Name newName ) { return process(new RenameNodeRequest(at, workspaceName, newName)); }
/** * Add a request to remove the property with the supplied name from the given node. Supplying a name for a property that does * not exist will not cause an error. * * @param on the location of the node to be read * @param workspaceName the name of the workspace containing the node * @param propertyName the name of the property that is to be removed * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null or if there are no properties to remove */ public RemovePropertyRequest removeProperty( Location on, String workspaceName, Name propertyName ) { return process(new RemovePropertyRequest(on, workspaceName, propertyName)); }
/** * Add a request to update the property on the node at the supplied location. This request will create the property if it does * not yet exist. * * @param on the location of the node to be read * @param workspaceName the name of the workspace containing the node * @param property the new property on the node * @return the request; never null * @throws IllegalArgumentException if the location or workspace name is null or if there are no properties to update */ public SetPropertyRequest setProperty( Location on, String workspaceName, Property property ) { return process(new SetPropertyRequest(on, workspaceName, property)); }
/** * Add a request to read those children of a node that are immediately after a supplied sibling node. * * @param startingAfter the location of the previous sibling that was the last child of the previous block of children read * @param workspaceName the name of the workspace containing the node * @param count the maximum number of children that should be included in the block * @return the request; never null * @throws IllegalArgumentException if the workspace name or <code>startingAfter</code> location is null, or if * <code>count</count> is less than 1. */ public ReadNextBlockOfChildrenRequest readNextBlockOfChildren( Location startingAfter, String workspaceName, int count ) { return process(new ReadNextBlockOfChildrenRequest(startingAfter, workspaceName, count)); }
/** * Create a request to perform a full-text search of the workspace. * * @param workspaceName the name of the workspace containing the node * @param fullTextSearchExpression the full-text search expression * @param maxResults the maximum number of results that are to be returned; always positive * @param offset the number of initial results to skip, or 0 if the first results are to be returned * @return the request; never null * @throws IllegalArgumentException if any of the parameters are null or if the expression is empty */ public FullTextSearchRequest search( String workspaceName, String fullTextSearchExpression, int maxResults, int offset ) { return process(new FullTextSearchRequest(fullTextSearchExpression, workspaceName, maxResults, offset)); }
/** * Create a request to unlock a branch or node * <p> * The lock on the node should be removed. If the lock was deep (i.e., locked the entire branch under the node, then all of * the descendants of the node affected by the lock should also be unlocked after this request is processed. * </p> * * @param workspaceName the name of the workspace containing the node; may not be null * @param target the location of the top node in the existing branch that is to be unlocked * @return the request; never null * @throws IllegalArgumentException if any of the parameters are null */ public UnlockBranchRequest unlockBranch( String workspaceName, Location target ) { return process(new UnlockBranchRequest(target, workspaceName)); }
/** * Add a request to remove values from a property on an existing node * * @param workspaceName the name of the workspace containing the node; may not be null * @param on the location of the node; may not be null * @param property the name of the property; may not be null * @param values the new values to remove; may not be null * @return the request; never null */ public UpdateValuesRequest removeValues( String workspaceName, Location on, Name property, List<Object> values ) { UpdateValuesRequest request = new UpdateValuesRequest(workspaceName, on, property, null, values); process(request); return request; }