|
||||||||||
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.CacheableRequest
org.modeshape.graph.request.ReadAllPropertiesRequest
public class ReadAllPropertiesRequest
Instruction to read the properties and the number of children of the node at the specifed location.
Field Summary | |
---|---|
static int |
UNKNOWN_NUMBER_OF_CHILDREN
|
Constructor Summary | |
---|---|
ReadAllPropertiesRequest(Location at,
String workspaceName)
Create a request to read the properties and number of children of a node at the supplied location. |
Method Summary | |
---|---|
void |
addProperties(Iterable<Property> properties)
Add a property that was read from the RepositoryConnection |
void |
addProperties(Property... properties)
Add a property that was read from the RepositoryConnection |
Property |
addProperty(Property property)
Add a property that was read from the RepositoryConnection |
Location |
at()
Get the location defining the node that is to be read. |
void |
cancel()
Cancel this request. |
boolean |
equals(Object obj)
|
Location |
getActualLocationOfNode()
Get the actual location of the node whose properties were read. |
int |
getNumberOfChildren()
Get the number of children for this node. |
Collection<Property> |
getProperties()
Get the properties that were read from the RepositoryConnection . |
Map<Name,Property> |
getPropertiesByName()
Get the properties that were read from the RepositoryConnection . |
RequestType |
getType()
Returns the type of the request |
int |
hashCode()
|
String |
inWorkspace()
Get the name of the workspace in which the node exists. |
boolean |
isReadOnly()
Return whether this request only reads information. |
Iterator<Property> |
iterator()
|
void |
setActualLocationOfNode(Location actual)
Sets the actual and complete location of the node whose properties have been read. |
void |
setNumberOfChildren(int numberOfChildren)
Set the number of children for this node |
String |
toString()
|
Methods inherited from class org.modeshape.graph.request.CacheableRequest |
---|
getCachePolicy, getTimeLoaded, setCachePolicy, setTimeLoaded |
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 |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNKNOWN_NUMBER_OF_CHILDREN
Constructor Detail |
---|
public ReadAllPropertiesRequest(Location at, String workspaceName)
at
- the location of the node to be readworkspaceName
- the name of the workspace containing the node
IllegalArgumentException
- if the location or workspace name is nullMethod Detail |
---|
public boolean isReadOnly()
isReadOnly
in class Request
Request.isReadOnly()
public Location at()
public String inWorkspace()
public Map<Name,Property> getPropertiesByName()
RepositoryConnection
.
public Collection<Property> getProperties()
RepositoryConnection
.
public Iterator<Property> iterator()
iterator
in interface Iterable<Property>
Iterable.iterator()
public Property addProperty(Property property)
RepositoryConnection
property
- the property that was read
IllegalArgumentException
- if the property is null
IllegalStateException
- if the request is frozenpublic void addProperties(Property... properties)
RepositoryConnection
properties
- the properties that were read
IllegalArgumentException
- if the property is null
IllegalStateException
- if the request is frozenpublic void addProperties(Iterable<Property> properties)
RepositoryConnection
properties
- the properties that were read
IllegalArgumentException
- if the property is null
IllegalStateException
- if the request is frozenpublic int getNumberOfChildren()
UNKNOWN_NUMBER_OF_CHILDREN
if the number of children was not yet readpublic void setNumberOfChildren(int numberOfChildren)
numberOfChildren
- the number of children
IllegalArgumentException
- if the number of childre is negative
IllegalStateException
- if the request is frozenpublic void setActualLocationOfNode(Location actual)
path
.
actual
- the actual location of the node being read, 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 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 RequestType getType()
Request
getType
in class Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |