|
||||||||||
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.UpdateValuesRequest
public class UpdateValuesRequest
Instruction to update the values for a certain property on the node at the specified location.
This request is capable of specifying specific values for the property that will be added or removed. Other values for the property not be affected by this request. The request contains a workspace name and a location that uniquely identify a node in the workspace as well as the name of property (that may or may not previously exist) on the node. The request also contains zero or more values to add and zero or more values to remove from the property. All values will be appended to the list of values. Removals are processed before additions.
Even if the property has no values after this call, the property itself will not be removed by this request.
Note that the number of values in a property (e.g., Property.size()
, Property.isEmpty()
,
Property.isSingle()
, and Property.isMultiple()
) has no influence on whether the property should be removed. It
is possible for a property to have no values.
Constructor Summary | |
---|---|
UpdateValuesRequest(String workspaceName,
Location on,
Name propertyName,
List<Object> addedValues,
List<Object> removedValues)
|
Method Summary | |
---|---|
List<Object> |
addedValues()
Get the list of values to be added. |
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. |
UpdateValuesRequest |
clone()
This method does not clone the results. |
List<Object> |
getActualAddedValues()
Get the actual added values. |
Location |
getActualLocationOfNode()
Get the actual location of the node that was updated. |
Property |
getActualProperty()
Get the actual node property that was created or updated. |
List<Object> |
getActualRemovedValues()
Get the actual removed values. |
RequestType |
getType()
Returns the type of the request |
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. |
Name |
property()
Get the name of the property that is to be updated. |
List<Object> |
removedValues()
Get the list of values to be removed. |
void |
setActualLocation(Location actual,
List<Object> actualAddedValues,
List<Object> actualRemovedValues)
|
void |
setActualProperty(Property property,
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 |
---|
cancel, checkNotFrozen, freeze, getError, hasError, isCancelled, isFrozen, printable, printable, setError, setLatchForFreezing |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UpdateValuesRequest(String workspaceName, Location on, Name propertyName, List<Object> addedValues, List<Object> removedValues)
Method Detail |
---|
public Location on()
public Name property()
public String inWorkspace()
public List<Object> addedValues()
public List<Object> removedValues()
public Location changedLocation()
ChangeRequest
path
.
changedLocation
in class ChangeRequest
public String changedWorkspace()
ChangeRequest
changedWorkspace
in class ChangeRequest
public boolean changes(String workspace, Path path)
ChangeRequest
changes
in class ChangeRequest
workspace
- the name of the workspace; may not be nullpath
- the path; may not be null
public boolean isReadOnly()
Request
isReadOnly
in class Request
public void setActualLocation(Location actual, List<Object> actualAddedValues, List<Object> actualRemovedValues)
public void setActualProperty(Property property, boolean created)
path
.
property
- the property being created or updated (may not be null
)created
- true if the property was created by this request, or false if this request updated an existing property
IllegalStateException
- if the request is frozen
IllegalArgumentException
- if the property is null
public Property getActualProperty()
null
if the actual property was not setpublic Location getActualLocationOfNode()
public List<Object> getActualAddedValues()
public List<Object> getActualRemovedValues()
public boolean isNewProperty()
property
was created.
public UpdateValuesRequest clone()
This method does not clone the results.
This method does not clone the results.
clone
in class ChangeRequest
ChangeRequest.clone()
public String toString()
toString
in class Object
Object.toString()
public RequestType getType()
Request
getType
in class Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |