|
||||||||||
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.SetPropertyRequest
public class SetPropertyRequest
Instruction to set a particular property on the node at the specified location. This request never removes the node, even if the property is empty.
Constructor Summary | |
---|---|
SetPropertyRequest(Location on,
String workspaceName,
Property property)
Create a request to set the property on the node at 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. |
SetPropertyRequest |
clone()
This method does not clone the results. |
boolean |
equals(Object obj)
|
Location |
getActualLocationOfNode()
Get the actual location of the node that was updated. |
RequestType |
getType()
Returns the type of the request |
int |
hashCode()
|
String |
inWorkspace()
Get the name of the workspace in which the node exists. |
boolean |
isNewProperty()
Get whether the property was created. |
boolean |
isReadOnly()
Return whether this request only reads information. |
Location |
on()
Get the location defining the node that is to be updated. |
Property |
property()
Get the property that is being set. |
void |
setActualLocationOfNode(Location actual)
Sets the actual and complete location of the node being updated. |
void |
setNewProperty(boolean created)
Record that the property did not exist prior to the processing of this request and was actually created by this request. |
String |
toString()
|
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 |
Constructor Detail |
---|
public SetPropertyRequest(Location on, String workspaceName, Property property)
on
- the location of the node to be readworkspaceName
- the name of the workspace containing the nodeproperty
- the new property on the node
IllegalArgumentException
- if the location, workspace name, or property is nullMethod Detail |
---|
public boolean isReadOnly()
isReadOnly
in class Request
Request.isReadOnly()
public Location on()
public String inWorkspace()
public Property property()
public void setActualLocationOfNode(Location actual)
path
.
actual
- the actual location of the node being updated, or null if the current location
should be used
IllegalArgumentException
- if the actual location is null or does not have a path.
IllegalStateException
- if the request is frozenpublic Location getActualLocationOfNode()
public void setNewProperty(boolean created)
path
.
created
- true if the property was created by this request, or false if this request updated an existing property
IllegalStateException
- if the request is frozenpublic boolean isNewProperty()
property
was created.
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 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 Location changedLocation()
path
.
changedLocation
in class ChangeRequest
ChangeRequest.changedLocation()
public String changedWorkspace()
changedWorkspace
in class ChangeRequest
ChangeRequest.changedWorkspace()
public String toString()
toString
in class Object
Object.toString()
public SetPropertyRequest 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 |