* {@inheritDoc}
*
* @see org.jboss.dna.graph.Graph.NameWorkspace#named(java.lang.String)
*/
public Workspace named( String workspaceName ) {
CreateWorkspaceRequest request = requests.createWorkspace(workspaceName, CreateConflictBehavior.DO_NOT_CREATE);
return setWorkspace(request.getActualWorkspaceName(), request.getActualLocationOfRoot());
}
/**
* {@inheritDoc}
*
* @see org.jboss.dna.graph.Graph.CreateWorkspace#namedSomethingLike(java.lang.String)
*/
public Workspace namedSomethingLike( String workspaceName ) {
CreateWorkspaceRequest request = requests.createWorkspace(workspaceName,
CreateConflictBehavior.CREATE_WITH_ADJUSTED_NAME);
return setWorkspace(request.getActualWorkspaceName(), request.getActualLocationOfRoot());
}
/**
* {@inheritDoc}
*
* @see org.jboss.dna.graph.Graph.CreateWorkspace#clonedFrom(java.lang.String)
*/
public NameWorkspace clonedFrom( final String nameOfWorkspaceToClone ) {
return new NameWorkspace() {
/**
* {@inheritDoc}
*
* @see org.jboss.dna.graph.Graph.NameWorkspace#named(java.lang.String)
*/
public Workspace named( String nameOfWorkspaceToCreate ) {
CloneWorkspaceRequest request = requests.cloneWorkspace(nameOfWorkspaceToClone,
nameOfWorkspaceToCreate,
CreateConflictBehavior.DO_NOT_CREATE,
CloneConflictBehavior.DO_NOT_CLONE);
return setWorkspace(request.getActualWorkspaceName(), request.getActualLocationOfRoot());
}
/**
* {@inheritDoc}
*
* @see org.jboss.dna.graph.Graph.NameWorkspace#namedSomethingLike(java.lang.String)
*/
public Workspace namedSomethingLike( String nameOfWorkspaceToCreate ) {
CloneWorkspaceRequest request = requests.cloneWorkspace(nameOfWorkspaceToClone,
nameOfWorkspaceToCreate,
CreateConflictBehavior.CREATE_WITH_ADJUSTED_NAME,
CloneConflictBehavior.DO_NOT_CLONE);
return setWorkspace(request.getActualWorkspaceName(), request.getActualLocationOfRoot());
}
};
}
};
}