|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.graph.request.Request org.jboss.dna.graph.request.ChangeRequest org.jboss.dna.graph.request.CloneWorkspaceRequest
public final class CloneWorkspaceRequest
Request that an existing workspace be cloned into a target workspace with the supplied name. If the target workspace exists,
the target conflict behavior
defines the behavior to be followed. If the workspace being
cloned does not exist, the clone conflict behavior
defines the behavior to be followed.
Nested Class Summary | |
---|---|
static class |
CloneWorkspaceRequest.CloneConflictBehavior
The options for the behavior when a request specifies the name of the workspace to clone, but the cloned workspace does not exist. |
Field Summary | |
---|---|
static CloneWorkspaceRequest.CloneConflictBehavior |
DEFAULT_CLONE_CONFLICT_BEHAVIOR
The default CloneWorkspaceRequest.CloneConflictBehavior that will be used if it is unspecified. |
static CreateWorkspaceRequest.CreateConflictBehavior |
DEFAULT_CREATE_CONFLICT_BEHAVIOR
The default CreateWorkspaceRequest.CreateConflictBehavior that will be used if it is unspecified. |
Constructor Summary | |
---|---|
CloneWorkspaceRequest(String nameOfWorkspaceToBeCloned,
String desiredNameOfTargetWorkspace,
CreateWorkspaceRequest.CreateConflictBehavior createConflictBehavior,
CloneWorkspaceRequest.CloneConflictBehavior cloneConflictBehavior)
Create a request to clone an existing workspace 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. |
Method Summary | |
---|---|
void |
cancel()
Cancel this request. |
Location |
changedLocation()
Get the location of the top-most node that is to be changed by this request. |
String |
changedWorkspace()
Get the name of the workspace that was changed by this request. |
boolean |
changes(String workspace,
Path path)
Determine if this request changes the branch at the given path. |
CloneWorkspaceRequest.CloneConflictBehavior |
cloneConflictBehavior()
Get the desired behavior if the cloned workspace does not exist. |
String |
desiredNameOfTargetWorkspace()
Get the desired name for the target workspace. |
boolean |
equals(Object obj)
|
Location |
getActualLocationOfRoot()
Get the actual location of the root node in the new workspace, or null if the workspace was not (yet) created. |
String |
getActualWorkspaceName()
Get the actual name of the workspace that was created. |
int |
hashCode()
|
boolean |
isReadOnly()
Return whether this request only reads information. |
String |
nameOfWorkspaceToBeCloned()
Get the name of the existing workspace that is to be cloned into the new workspace. |
void |
setActualRootLocation(Location actualLocationOfRoot)
Set the actual location of the root node in the new workspace. |
void |
setActualWorkspaceName(String actualWorkspaceName)
Set the actual name of the workspace that was created. |
CreateWorkspaceRequest.CreateConflictBehavior |
targetConflictBehavior()
Get the desired behavior if a workspace already exists with the desired workspace
name . |
String |
toString()
|
Methods inherited from class org.jboss.dna.graph.request.Request |
---|
freeze, getError, hasError, isCancelled, isFrozen, setError, setLatchForFreezing |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final CloneWorkspaceRequest.CloneConflictBehavior DEFAULT_CLONE_CONFLICT_BEHAVIOR
CloneWorkspaceRequest.CloneConflictBehavior
that will be used if it is unspecified.
public static final CreateWorkspaceRequest.CreateConflictBehavior DEFAULT_CREATE_CONFLICT_BEHAVIOR
CreateWorkspaceRequest.CreateConflictBehavior
that will be used if it is unspecified.
Constructor Detail |
---|
public CloneWorkspaceRequest(String nameOfWorkspaceToBeCloned, String desiredNameOfTargetWorkspace, CreateWorkspaceRequest.CreateConflictBehavior createConflictBehavior, CloneWorkspaceRequest.CloneConflictBehavior cloneConflictBehavior)
nameOfWorkspaceToBeCloned
- the name of the existing workspace that is to be cloneddesiredNameOfTargetWorkspace
- the desired name of the target workspacecreateConflictBehavior
- the behavior if a workspace already exists with the same namecloneConflictBehavior
- the behavior if the workspace to be cloned does not exist
IllegalArgumentException
- if the either workspace name is nullMethod Detail |
---|
public String nameOfWorkspaceToBeCloned()
public String desiredNameOfTargetWorkspace()
public CreateWorkspaceRequest.CreateConflictBehavior targetConflictBehavior()
desired workspace
name
.
public CloneWorkspaceRequest.CloneConflictBehavior cloneConflictBehavior()
cloned workspace
does not exist.
public String getActualWorkspaceName()
desired target name
unless there was a conflict and the desired behavior
was to
alter the name
.
public void setActualWorkspaceName(String actualWorkspaceName)
desired target name
unless there was a conflict and the
desired behavior
was to alter the
name
.
actualWorkspaceName
- the actual name of the workspace that was created, or null if a workspace was not created
IllegalStateException
- if the request is frozenpublic Location getActualLocationOfRoot()
public void setActualRootLocation(Location actualLocationOfRoot)
actualLocationOfRoot
- the actual location of the workspace's root node.
IllegalStateException
- if the request is frozenpublic boolean isReadOnly()
isReadOnly
in class Request
Request.isReadOnly()
public void cancel()
cancellation flag
is set, and any current or
future processing of the request may be affected by the cancellation. (Note however, that processors may choose to not
respect this request.)
This method is safe to be called by different threads.
cancel
in class Request
Request.cancel()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public Location changedLocation()
changedLocation
in class ChangeRequest
ChangeRequest.changedLocation()
public String changedWorkspace()
changedWorkspace
in class ChangeRequest
ChangeRequest.changedWorkspace()
public boolean changes(String workspace, Path path)
changes
in class ChangeRequest
workspace
- the name of the workspace; may not be nullpath
- the path; may not be null
ChangeRequest.changes(java.lang.String, org.jboss.dna.graph.property.Path)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |