|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.connector.jcr.JcrRequestProcessor.Workspace
protected class JcrRequestProcessor.Workspace
An encapsulation of a remote JCR Session, with an ExecutionContext that contains a namespace registry which mirrors the session's registry, and with factories that convert the JCR-specific values, paths, and names into their graph-equivalents.
Constructor Summary | |
---|---|
protected |
JcrRequestProcessor.Workspace(Session jcrSession)
|
Method Summary | |
---|---|
Object |
convert(Value value,
Property jcrProperty)
Utility method used to convert a JCR Value object into a valid graph property value. |
protected Value |
convertToJcrValue(PropertyType graphType,
Object graphValue)
|
protected Set<Name> |
getMultiValuedProperties(Property multiValuedProperty)
|
Location |
locationFor(Node node)
Obtain the actual location for the supplied node. |
Location |
locationForRootNode()
|
Location |
move(Node original,
Node newParent,
Name newName,
Node beforeSibling)
|
String |
name()
|
protected String |
nameFor(Node node)
|
Node |
node(Location location)
Find the existing node given the location. |
Property |
propertyFor(Name name,
Object... values)
|
Property |
propertyFor(Property jcrProperty)
Get the graph property for the supplied JCR property representation. |
Session |
session()
|
void |
setProperties(Node node,
Iterable<Property> properties)
|
protected void |
setProperty(Node node,
Property property,
boolean isMultiValued)
|
protected String |
stringFor(Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected JcrRequestProcessor.Workspace(Session jcrSession) throws RepositoryException
RepositoryException
Method Detail |
---|
public Location move(Node original, Node newParent, Name newName, Node beforeSibling) throws RepositoryException
RepositoryException
public String name()
public Session session()
protected String stringFor(Object value)
protected String nameFor(Node node) throws RepositoryException
RepositoryException
public Property propertyFor(Name name, Object... values)
public Property propertyFor(Property jcrProperty) throws RepositoryException
property
for the supplied JCR property representation.
jcrProperty
- the JCR property; may not be null
RepositoryException
- if there is an error working with the sessionpublic Object convert(Value value, Property jcrProperty) throws RepositoryException
Value
object into a valid graph property value.
value
- the JCR value; may be nulljcrProperty
- the JCR property, used to access the session (if needed)
RepositoryException
- if there is an error working with the sessionpublic Location locationFor(Node node) throws RepositoryException
node
- the existing node; may not be null
RepositoryException
- if there is an errorpublic Location locationForRootNode() throws RepositoryException
RepositoryException
public Node node(Location location) throws RepositoryException
location
- the location of the node, which must have a path
and/or
UUID
RepositoryException
- if there is an error working with the session
PathNotFoundException
- if the node could not be found by its pathpublic void setProperties(Node node, Iterable<Property> properties) throws RepositoryException
RepositoryException
protected Set<Name> getMultiValuedProperties(Property multiValuedProperty)
protected void setProperty(Node node, Property property, boolean isMultiValued) throws RepositoryException
RepositoryException
protected Value convertToJcrValue(PropertyType graphType, Object graphValue) throws RepositoryException
RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |