|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.graph.requests.Request org.jboss.dna.graph.requests.CacheableRequest org.jboss.dna.graph.requests.ReadBranchRequest
@NotThreadSafe public class ReadBranchRequest
Instruction to read the properties and children of the nodes in the branch at the supplied location. The children of the nodes at the bottom of the branch are not read.
Field Summary | |
---|---|
static int |
DEFAULT_MAXIMUM_DEPTH
|
Constructor Summary | |
---|---|
ReadBranchRequest(Location at)
Create a request to read the branch at the supplied location, to a maximum depth of 2. |
|
ReadBranchRequest(Location at,
int maxDepth)
Create a request to read the branch (of given depth) at the supplied location. |
Method Summary | |
---|---|
Location |
at()
Get the location defining the top of the branch to be deleted |
boolean |
equals(Object obj)
|
Location |
getActualLocationOfNode()
Get the actual location of the node that was read. |
List<Location> |
getChildren(Location parent)
Get the children of the node at the supplied location. |
Location |
getLocationFor(Path path)
Get the location for the supplied path. |
Map<Name,Property> |
getPropertiesFor(Location location)
Get the nodes that make up this branch. |
boolean |
includes(Location location)
Return whether this branch contains the specified location. |
boolean |
includes(Path path)
Return whether this branch contains the specified path. |
boolean |
isReadOnly()
Return whether this request only reads information. |
Iterator<Location> |
iterator()
The resulting iterator accesses the Location objects in the branch, in pre-order traversal order. |
int |
maximumDepth()
Get the maximum depth of the branch that is to be read. |
void |
setActualLocationOfNode(Location actual)
Sets the actual and complete location of the node being read. |
void |
setChildren(Location parent,
List<Location> children)
Record the children for a parent node in the branch. |
void |
setChildren(Location parent,
Location... children)
Record the children for a parent node in the branch. |
void |
setProperties(Location node,
Iterable<Property> properties)
Add a node that was read from the RepositoryConnection . |
void |
setProperties(Location node,
Property... properties)
Add a node that was read from the RepositoryConnection . |
String |
toString()
|
Methods inherited from class org.jboss.dna.graph.requests.CacheableRequest |
---|
getCachePolicy, getTimeLoaded, setCachePolicy, setTimeLoaded |
Methods inherited from class org.jboss.dna.graph.requests.Request |
---|
cancel, getError, hasError, isCancelled, setError |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_MAXIMUM_DEPTH
Constructor Detail |
---|
public ReadBranchRequest(Location at)
at
- the location of the branch
IllegalArgumentException
- if the location is nullpublic ReadBranchRequest(Location at, int maxDepth)
at
- the location of the branchmaxDepth
- the maximum depth to read
IllegalArgumentException
- if the location is null or if the maximum depth is not positiveMethod Detail |
---|
public boolean isReadOnly()
isReadOnly
in class Request
Request.isReadOnly()
public Location at()
public int maximumDepth()
public boolean includes(Location location)
location
- the location
public boolean includes(Path path)
path
- the path
public Location getLocationFor(Path path)
path
- the path
public void setProperties(Location node, Property... properties)
RepositoryConnection
. This method does not verify or check that the node is
indeed on the branch and that it is at a level prescribed by the request.
node
- the location of the node that appears on this branch; must have a path
properties
- the properties on the node
IllegalArgumentException
- if the node is nullpublic void setProperties(Location node, Iterable<Property> properties)
RepositoryConnection
. This method does not verify or check that the node is
indeed on the branch and that it is at a level prescribed by the request.
node
- the location of the node that appears on this branch; must have a path
properties
- the properties on the node
IllegalArgumentException
- if the node is nullpublic void setChildren(Location parent, Location... children)
parent
- the location of the parent; must have a path
children
- the location of each child, in the order they appear in the parentpublic void setChildren(Location parent, List<Location> children)
parent
- the location of the parent; must have a path
children
- the location of each child, in the order they appear in the parentpublic Map<Name,Property> getPropertiesFor(Location location)
added
.
location
- the location of the node for which the properties are to be obtained
iterator()
public List<Location> getChildren(Location parent)
parent
- the location of the parent
public Iterator<Location> iterator()
The resulting iterator accesses the Location
objects in the branch, in pre-order traversal order.
iterator
in interface Iterable<Location>
Iterable.iterator()
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 does not represent the same
location
as the current location
, or if the actual location does not have a path.public Location getActualLocationOfNode()
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 |