|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.request.Request
org.modeshape.graph.request.ChangeRequest
org.modeshape.graph.request.CreateNodeRequest
public class CreateNodeRequest
Instruction to create the node under the specified location. This command will create the node and set the initial properties.
Field Summary | |
---|---|
static NodeConflictBehavior |
DEFAULT_CONFLICT_BEHAVIOR
|
Constructor Summary | |
---|---|
CreateNodeRequest(Location parentLocation,
String workspaceName,
Name childName,
Iterable<Property> properties)
Create a request to create a node with the given properties under the supplied location. |
|
CreateNodeRequest(Location parentLocation,
String workspaceName,
Name childName,
Iterator<Property> properties)
Create a request to create a node with the given properties under the supplied location. |
|
CreateNodeRequest(Location parentLocation,
String workspaceName,
Name childName,
NodeConflictBehavior conflictBehavior,
Iterable<Property> properties)
Create a request to create a node with the given properties under the supplied location. |
|
CreateNodeRequest(Location parentLocation,
String workspaceName,
Name childName,
NodeConflictBehavior conflictBehavior,
Iterator<Property> properties)
Create a request to create a node with the given properties under the supplied location. |
|
CreateNodeRequest(Location parentLocation,
String workspaceName,
Name childName,
NodeConflictBehavior conflictBehavior,
Property... properties)
Create a request to create a node with the given properties under the supplied location. |
|
CreateNodeRequest(Location parentLocation,
String workspaceName,
Name childName,
Property... properties)
Create a request to create a node with the given properties under the supplied location. |
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. |
CreateNodeRequest |
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. |
boolean |
equals(Object obj)
|
Location |
getActualLocationOfNode()
Get the actual location of the node that was created. |
RequestType |
getType()
Returns the type of the request |
int |
hashCode()
|
String |
inWorkspace()
Get the name of the workspace in which the node is to be createde |
boolean |
isReadOnly()
Return whether this request only reads information. |
Iterator<Property> |
iterator()
|
Name |
named()
Get the name for the new child. |
Collection<Property> |
properties()
Get the properties for the node. |
void |
setActualLocationOfNode(Location actual)
Sets the actual and complete location of the node being created. |
String |
toString()
|
Location |
under()
Get the location defining the parent of the new node that is to be created. |
Methods inherited from class org.modeshape.graph.request.Request |
---|
checkNotFrozen, freeze, getError, hasError, isCancelled, isFrozen, printable, printable, setError, setLatchForFreezing |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final NodeConflictBehavior DEFAULT_CONFLICT_BEHAVIOR
Constructor Detail |
---|
public CreateNodeRequest(Location parentLocation, String workspaceName, Name childName, Property... properties)
parentLocation
- the location of the existing parent node, under which the new child should be createdworkspaceName
- the name of the workspace containing the parentchildName
- the name of the new child to create under the existing parentproperties
- the properties of the new node, which should include any identification
properties
for the new node
IllegalArgumentException
- if the location, workspace name, or child name is nullpublic CreateNodeRequest(Location parentLocation, String workspaceName, Name childName, Iterable<Property> properties)
parentLocation
- the location of the existing parent node, under which the new child should be createdworkspaceName
- the name of the workspace containing the parentchildName
- the name of the new child to create under the existing parentproperties
- the properties of the new node, which should include any identification
properties
for the new node
IllegalArgumentException
- if the location, workspace name, or child name is nullpublic CreateNodeRequest(Location parentLocation, String workspaceName, Name childName, Iterator<Property> properties)
parentLocation
- the location of the existing parent node, under which the new child should be createdworkspaceName
- the name of the workspace containing the parentchildName
- the name of the new child to create under the existing parentproperties
- the properties of the new node, which should include any identification
properties
for the new node
IllegalArgumentException
- if the location, workspace name, or child name is nullpublic CreateNodeRequest(Location parentLocation, String workspaceName, Name childName, NodeConflictBehavior conflictBehavior, Property... properties)
parentLocation
- the location of the existing parent node, under which the new child should be createdworkspaceName
- the name of the workspace containing the parentchildName
- the name of the new child to create under the existing parentproperties
- the properties of the new node, which should include any identification
properties
for the new nodeconflictBehavior
- the expected behavior if an equivalently-named child already exists under the into
location
IllegalArgumentException
- if the location, workspace name, child name, or the conflict behavior is nullpublic CreateNodeRequest(Location parentLocation, String workspaceName, Name childName, NodeConflictBehavior conflictBehavior, Iterable<Property> properties)
parentLocation
- the location of the existing parent node, under which the new child should be createdworkspaceName
- the name of the workspace containing the parentchildName
- the name of the new child to create under the existing parentproperties
- the properties of the new node, which should include any identification
properties
for the new nodeconflictBehavior
- the expected behavior if an equivalently-named child already exists under the into
location
IllegalArgumentException
- if the location, workspace name, child name, or the conflict behavior is nullpublic CreateNodeRequest(Location parentLocation, String workspaceName, Name childName, NodeConflictBehavior conflictBehavior, Iterator<Property> properties)
parentLocation
- the location of the existing parent node, under which the new child should be createdworkspaceName
- the name of the workspace containing the parentchildName
- the name of the new child to create under the existing parentproperties
- the properties of the new node, which should include any identification
properties
for the new nodeconflictBehavior
- the expected behavior if an equivalently-named child already exists under the into
location
IllegalArgumentException
- if the location, workspace name, child name, or the conflict behavior is nullMethod Detail |
---|
public Location under()
public String inWorkspace()
public Name named()
public Iterator<Property> iterator()
iterator
in interface Iterable<Property>
Iterable.iterator()
public Collection<Property> properties()
location
has identification properties, the resulting
properties will include the identification properties
.
public NodeConflictBehavior conflictBehavior()
destination
already has a node with the same
name.
public boolean isReadOnly()
isReadOnly
in class Request
Request.isReadOnly()
public void setActualLocationOfNode(Location actual)
path
.
actual
- the actual location of the node being created, or null if the current location
should be
used
IllegalArgumentException
- the actual location is null or does not have a path
IllegalStateException
- if the request is frozenpublic Location getActualLocationOfNode()
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.modeshape.graph.property.Path)
public Location changedLocation()
path
.
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 CreateNodeRequest clone()
This method does not clone the results.
This method does not clone the results.
clone
in class ChangeRequest
ChangeRequest.clone()
public RequestType getType()
Request
getType
in class Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |