|
|||||||||
| 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.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,
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,
Name newNameForMovedNode,
NodeConflictBehavior conflictBehavior)
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 |
changedLocation()
Get the location of the top-most node that is to be changed by this request. |
boolean |
changes(String workspace,
Path path)
Determine if this request changes the branch at the given path. |
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. |
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 |
|---|
cancel, getError, hasError, isCancelled, setError |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, 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 null
public 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 null
public 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 null
public MoveBranchRequest(Location from,
Location into,
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 movedworkspaceName - 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 null| Method Detail |
|---|
public Location from()
public Location into()
public String inWorkspace()
public Name desiredName()
public NodeConflictBehavior conflictBehavior()
destination already has a node with the same
name.
public boolean isReadOnly()
isReadOnly in class RequestRequest.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 does not represent the
same location as the from location, if the new location does not
represent the same location as the into location, or if the
either location does not have a pathpublic Location getActualLocationBefore()
public Location getActualLocationAfter()
public boolean changes(String workspace,
Path path)
changes in interface ChangeRequestworkspace - 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()
changedLocation in interface ChangeRequestChangeRequest.changedLocation()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||