|
||||||||||
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.CacheableRequest
org.jboss.dna.graph.request.ReadNodeRequest
public class ReadNodeRequest
Instruction to read the properties and children of the node at the specifed location.
Constructor Summary | |
---|---|
ReadNodeRequest(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 |
addChild(Location child)
Add to the list of children that has been read the child with the given path and identification properties. |
void |
addChild(Path pathToChild,
Property idProperty)
Add to the list of children that has been read the child with the given path and identification property. |
void |
addChild(Path pathToChild,
Property firstIdProperty,
Property... remainingIdProperties)
Add to the list of children that has been read the child with the given path and identification properties. |
void |
addChildren(Iterable<Location> children)
Add to the list of children that has been read the supplied children with the given path and identification properties. |
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 children and properties were read. |
List<Location> |
getChildren()
Get the children that were read from the RepositoryConnection after the request was processed. |
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 . |
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<Location> |
iterator()
|
void |
setActualLocationOfNode(Location actual)
Sets the actual and complete location of the node whose children and properties have been read. |
String |
toString()
|
Methods inherited from class org.jboss.dna.graph.request.CacheableRequest |
---|
getCachePolicy, getTimeLoaded, setCachePolicy, setTimeLoaded |
Methods inherited from class org.jboss.dna.graph.request.Request |
---|
freeze, getError, hasError, isCancelled, isFrozen, setError, setLatchForFreezing |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReadNodeRequest(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 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 properties array is null
IllegalStateException
- if the request is frozenpublic void addProperties(Iterable<Property> properties)
RepositoryConnection
properties
- the properties that were read
IllegalArgumentException
- if the iterable reference is null
IllegalStateException
- if the request is frozenpublic List<Location> getChildren()
RepositoryConnection
after the request was processed. Each child is
represented by a location.
public Iterator<Location> iterator()
iterator
in interface Iterable<Location>
Iterable.iterator()
public void addChildren(Iterable<Location> children)
children
- the locations of the children that were read
IllegalArgumentException
- if the parameter is null
IllegalStateException
- if the request is frozenaddChild(Location)
,
addChild(Path, Property)
,
addChild(Path, Property, Property...)
public void addChild(Location child)
child
- the location of the child that was read
IllegalArgumentException
- if the location is null
IllegalStateException
- if the request is frozenaddChild(Path, Property)
,
addChild(Path, Property, Property...)
public void addChild(Path pathToChild, Property firstIdProperty, Property... remainingIdProperties)
pathToChild
- the path of the child that was just readfirstIdProperty
- the first identification property of the child that was just readremainingIdProperties
- the remaining identification properties of the child that was just read
IllegalArgumentException
- if the path or identification properties are null
IllegalStateException
- if the request is frozenaddChild(Location)
,
addChild(Path, Property)
public void addChild(Path pathToChild, Property idProperty)
pathToChild
- the path of the child that was just readidProperty
- the identification property of the child that was just read
IllegalArgumentException
- if the path or identification properties are null
IllegalStateException
- if the request is frozenaddChild(Location)
,
addChild(Path, Property, Property...)
public 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 not equal to
the current location
, or if the actual location 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |