public class IdentifierManager extends Object
| Constructor and Description |
|---|
IdentifierManager(Root root) |
| Modifier and Type | Method and Description |
|---|---|
static String |
generateUUID() |
static String |
generateUUID(String hint) |
static String |
getIdentifier(Tree tree)
Return the identifier of a tree.
|
String |
getPath(PropertyState referenceValue)
Returns the path of the tree references by the specified (weak)
reference
PropertyState. |
String |
getPath(PropertyValue referenceValue)
Returns the path of the tree references by the specified (weak)
reference
PropertyState. |
String |
getPath(String identifier)
The path of the tree identified by the specified
identifier or null. |
Iterable<String> |
getReferences(boolean weak,
Tree tree,
String propertyName)
Searches all reference properties to the specified
tree that match
the given name and node type constraints. |
Iterable<String> |
getReferences(Tree tree,
String propertyName,
String ntName,
boolean weak)
Searches all reference properties to the specified
tree that match
the given propertyName and the specified, mandatory node type
constraint (ntName). |
Tree |
getTree(String identifier)
The possibly non existing tree identified by the specified
identifier or null. |
static boolean |
isValidUUID(String uuid) |
String |
resolveUUID(String uuid) |
public IdentifierManager(Root root)
public static String generateUUID()
public static boolean isValidUUID(String uuid)
public static String getIdentifier(Tree tree)
tree - a treetreepublic Tree getTree(String identifier)
identifier or null.identifier - The identifier of the tree such as exposed by getIdentifier(Tree)identifier or null if no
such tree exists.public String getPath(String identifier)
identifier or null.identifier - The identifier of the tree such as exposed by getIdentifier(Tree)identifier or null if no
such tree exists or if the tree is not accessible.public String getPath(PropertyState referenceValue)
PropertyState.referenceValue - A (weak) reference value.identifier or null if no
such tree exists or isn't accessible to the content session.public String getPath(PropertyValue referenceValue)
PropertyState.referenceValue - A (weak) reference value.identifier or null if no
such tree exists or isn't accessible to the content session.public Iterable<String> getReferences(boolean weak, Tree tree, String propertyName)
tree that match
the given name and node type constraints.weak - if true only weak references are returned. Otherwise only
hard references are returned.tree - The tree for which references should be searched.propertyName - A name constraint for the reference properties;
null if no constraint should be enforced.tree and matching the constraints.public Iterable<String> getReferences(Tree tree, String propertyName, String ntName, boolean weak)
tree that match
the given propertyName and the specified, mandatory node type
constraint (ntName). In contrast to getReferences(boolean, org.apache.jackrabbit.oak.api.Tree, java.lang.String) this
method requires all parameters to be specified, which eases the handling
of the result set and doesn't require the trees associated with the
result set to be resolved.tree - The tree for which references should be searched.propertyName - The name of the reference properties.ntName - The node type name to be used for the query.weak - if true only weak references are returned. Otherwise on hard references are returned.tree and matching the constraints."Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"