public class IdentifierManager
extends java.lang.Object
Constructor and Description |
---|
IdentifierManager(Root root) |
Modifier and Type | Method and Description |
---|---|
static @NotNull java.lang.String |
generateUUID()
Deprecated.
|
static @NotNull java.lang.String |
generateUUID(java.lang.String hint)
Deprecated.
|
static @NotNull java.lang.String |
getIdentifier(Tree tree)
Return the identifier of a tree.
|
@Nullable java.lang.String |
getPath(PropertyState referenceValue)
Returns the path of the tree references by the specified (weak)
reference
PropertyState . |
@Nullable java.lang.String |
getPath(PropertyValue referenceValue)
Returns the path of the tree references by the specified (weak)
reference
PropertyState . |
@Nullable java.lang.String |
getPath(java.lang.String identifier)
The path of the tree identified by the specified
identifier or null . |
@NotNull java.lang.Iterable<java.lang.String> |
getReferences(boolean weak,
@NotNull Tree tree,
@Nullable java.lang.String propertyName)
Searches all reference properties to the specified
tree that match
the given name and node type constraints. |
@NotNull java.lang.Iterable<java.lang.String> |
getReferences(@NotNull Tree tree,
@NotNull java.lang.String propertyName,
@NotNull java.lang.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 ). |
@Nullable Tree |
getTree(java.lang.String identifier)
The possibly non existing tree identified by the specified
identifier or null . |
static boolean |
isValidUUID(java.lang.String uuid)
Deprecated.
Use
UUIDUtils.isValidUUID(String) (String)} |
@Nullable java.lang.String |
resolveUUID(java.lang.String uuid) |
public IdentifierManager(Root root)
@NotNull public static @NotNull java.lang.String generateUUID()
UUIDUtils.generateUUID()
@NotNull public static @NotNull java.lang.String generateUUID(java.lang.String hint)
UUIDUtils.generateUUID(String)
public static boolean isValidUUID(java.lang.String uuid)
UUIDUtils.isValidUUID(String)
(String)}@NotNull public static @NotNull java.lang.String getIdentifier(Tree tree)
tree
- a treetree
@Nullable public @Nullable Tree getTree(java.lang.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.@Nullable public @Nullable java.lang.String getPath(java.lang.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.@Nullable public @Nullable java.lang.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.@Nullable public @Nullable java.lang.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.@NotNull public @NotNull java.lang.Iterable<java.lang.String> getReferences(boolean weak, @NotNull @NotNull Tree tree, @Nullable @Nullable java.lang.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.@NotNull public @NotNull java.lang.Iterable<java.lang.String> getReferences(@NotNull @NotNull Tree tree, @NotNull @NotNull java.lang.String propertyName, @NotNull @NotNull java.lang.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.@Nullable public @Nullable java.lang.String resolveUUID(java.lang.String uuid)
Copyright © 2010 - 2020 Adobe. All Rights Reserved