|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.dna.graph.request.Request
org.jboss.dna.graph.request.ChangeRequest
org.jboss.dna.graph.request.MoveBranchRequest
public class MoveBranchRequest
Instruction that a branch be moved from one location into another.
Field Summary | |
---|---|
static NodeConflictBehavior |
DEFAULT_CONFLICT_BEHAVIOR
|
Constructor Summary | |
---|---|
MoveBranchRequest(Location from,
Location into,
Location before,
String workspaceName,
Name newNameForMovedNode,
NodeConflictBehavior conflictBehavior)
Create a request to move a branch from one location into another. |
|
MoveBranchRequest(Location from,
Location into,
String workspaceName)
Create a request to move a branch from one location into another. |
|
MoveBranchRequest(Location from,
Location into,
String workspaceName,
Name newNameForMovedNode)
Create a request to move a branch from one location into another. |
|
MoveBranchRequest(Location from,
Location into,
String workspaceName,
NodeConflictBehavior conflictBehavior)
Create a request to move a branch from one location into another. |
Method Summary | |
---|---|
Location |
before()
Get the location defining the node before which the branch is to be placed |
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. |
MoveBranchRequest |
clone()
This method does not clone the results. |
NodeConflictBehavior |
conflictBehavior()
Get the expected behavior when copying the branch and the destination already has a node with the same
name. |
Name |
desiredName()
Get the name of the copy if it is to be different than that of the original. |
boolean |
equals(Object obj)
|
Location |
from()
Get the location defining the top of the branch to be moved |
Location |
getActualLocationAfter()
Get the actual location of the node after being moved. |
Location |
getActualLocationBefore()
Get the actual location of the node before being moved. |
int |
hashCode()
|
boolean |
hasNoEffect()
Determine whether this move request can be determined to have no effect. |
Location |
into()
Get the location defining the parent where the branch is to be placed |
String |
inWorkspace()
Get the name of the workspace in which the branch exists. |
boolean |
isReadOnly()
Return whether this request only reads information. |
void |
setActualLocations(Location oldLocation,
Location newLocation)
Sets the actual and complete location of the node being renamed and its new location. |
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 NodeConflictBehavior DEFAULT_CONFLICT_BEHAVIOR
Constructor Detail |
---|
public MoveBranchRequest(Location from, Location into, String workspaceName)
from
- the location of the top node in the existing branch that is to be movedinto
- the location of the existing node into which the branch should be movedworkspaceName
- the name of the workspace
IllegalArgumentException
- if any of the parameters are nullpublic MoveBranchRequest(Location from, Location into, String workspaceName, Name newNameForMovedNode)
from
- the location of the top node in the existing branch that is to be movedinto
- the location of the existing node into which the branch should be movedworkspaceName
- the name of the workspacenewNameForMovedNode
- the new name for the node being moved, or null if the name of the original should be used
IllegalArgumentException
- if any of the parameters are nullpublic MoveBranchRequest(Location from, Location into, String workspaceName, NodeConflictBehavior conflictBehavior)
from
- the location of the top node in the existing branch that is to be movedinto
- the location of the existing node into which the branch should be movedworkspaceName
- the name of the workspaceconflictBehavior
- the expected behavior if an equivalently-named child already exists at the into
location
IllegalArgumentException
- if any of the parameters are nullpublic MoveBranchRequest(Location from, Location into, Location before, String workspaceName, Name newNameForMovedNode, NodeConflictBehavior conflictBehavior)
from
- the location of the top node in the existing branch that is to be movedinto
- the location of the existing node into which the branch should be movedbefore
- the location of the child of the into
node that the branch should be placed before; null indicates
that the branch should be the last child of its new parentworkspaceName
- the name of the workspacenewNameForMovedNode
- the new name for the node being moved, or null if the name of the original should be usedconflictBehavior
- the expected behavior if an equivalently-named child already exists at the into
location
IllegalArgumentException
- if any of the parameters are nullMethod Detail |
---|
public Location from()
public Location into()
public Location before()
public String inWorkspace()
public Name desiredName()
public NodeConflictBehavior conflictBehavior()
destination
already has a node with the same
name.
public boolean isReadOnly()
isReadOnly
in class Request
Request.isReadOnly()
public boolean hasNoEffect()
A move is known to have no effect when all of the following conditions are true:
into
location has a path
but no identification properties
;from
location has a path
; andfrom
location's parent
is the same as the into
location's
path.
public void setActualLocations(Location oldLocation, Location newLocation)
path
.
oldLocation
- the actual location of the node before being movednewLocation
- the actual new location of the node
IllegalArgumentException
- if the either location is null, if the old location is not equal to
the from location
, if the new location is not equal to
the into location
, or if the either location does not have a path
IllegalStateException
- if the request is frozenpublic Location getActualLocationBefore()
public Location getActualLocationAfter()
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)
public Location changedLocation()
path
.
This method returns the getActualLocationAfter()
location, or if null the into()
location.
changedLocation
in class ChangeRequest
ChangeRequest.changedLocation()
public String changedWorkspace()
changedWorkspace
in class ChangeRequest
ChangeRequest.changedWorkspace()
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 MoveBranchRequest clone()
This method does not clone the results.
This method does not clone the results.
clone
in class ChangeRequest
ChangeRequest.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |