Class IdentifierManager
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager
-
public class IdentifierManager extends java.lang.ObjectTODO document
-
-
Constructor Summary
Constructors Constructor Description IdentifierManager(Root root)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static @NotNull java.lang.StringgenerateUUID()Deprecated.static @NotNull java.lang.StringgenerateUUID(java.lang.String hint)Deprecated.static @NotNull java.lang.StringgetIdentifier(Tree tree)Return the identifier of a tree.@Nullable java.lang.StringgetPath(java.lang.String identifier)The path of the tree identified by the specifiedidentifierornull.@Nullable java.lang.StringgetPath(PropertyState referenceValue)Returns the path of the tree references by the specified (weak) referencePropertyState.@Nullable java.lang.StringgetPath(PropertyValue referenceValue)Returns the path of the tree references by the specified (weak) referencePropertyState.@NotNull java.lang.Iterable<java.lang.String>getReferences(boolean weak, @NotNull Tree tree, @Nullable java.lang.String propertyName)Searches all reference properties to the specifiedtreethat match the given name and node type constraints.@NotNull java.lang.Iterable<Tree>getReferences(@NotNull Tree tree, @NotNull java.lang.String propertyName, @NotNull java.lang.String ntName, boolean weak)Searches all reference properties to the specifiedtreethat match the givenpropertyNameand the specified, mandatory node type constraint (ntName).@Nullable TreegetTree(@NotNull PropertyValue referenceValue)@Nullable TreegetTree(java.lang.String identifier)The possibly non existing tree identified by the specifiedidentifierornull.static booleanisValidUUID(java.lang.String uuid)Deprecated.UseUUIDUtils.isValidUUID(String)(String)}@Nullable java.lang.StringresolveUUID(java.lang.String uuid)
-
-
-
Constructor Detail
-
IdentifierManager
public IdentifierManager(Root root)
-
-
Method Detail
-
generateUUID
@NotNull public static @NotNull java.lang.String generateUUID()
Deprecated.
-
generateUUID
@NotNull public static @NotNull java.lang.String generateUUID(java.lang.String hint)
Deprecated.
-
isValidUUID
public static boolean isValidUUID(java.lang.String uuid)
Deprecated.UseUUIDUtils.isValidUUID(String)(String)}
-
getIdentifier
@NotNull public static @NotNull java.lang.String getIdentifier(Tree tree)
Return the identifier of a tree.- Parameters:
tree- a tree- Returns:
- identifier of
tree
-
getTree
@Nullable public @Nullable Tree getTree(java.lang.String identifier)
The possibly non existing tree identified by the specifiedidentifierornull.- Parameters:
identifier- The identifier of the tree such as exposed bygetIdentifier(Tree)- Returns:
- The tree with the given
identifierornullif no such tree exists.
-
getTree
@Nullable public @Nullable Tree getTree(@NotNull @NotNull PropertyValue referenceValue)
-
getPath
@Nullable public @Nullable java.lang.String getPath(java.lang.String identifier)
The path of the tree identified by the specifiedidentifierornull.- Parameters:
identifier- The identifier of the tree such as exposed bygetIdentifier(Tree)- Returns:
- The path of the tree with the given
identifierornullif no such tree exists or if the tree is not accessible.
-
getPath
@Nullable public @Nullable java.lang.String getPath(PropertyState referenceValue)
Returns the path of the tree references by the specified (weak) referencePropertyState.- Parameters:
referenceValue- A (weak) reference value.- Returns:
- The tree with the given
identifierornullif no such tree exists or isn't accessible to the content session.
-
getPath
@Nullable public @Nullable java.lang.String getPath(PropertyValue referenceValue)
Returns the path of the tree references by the specified (weak) referencePropertyState.- Parameters:
referenceValue- A (weak) reference value.- Returns:
- The tree with the given
identifierornullif no such tree exists or isn't accessible to the content session.
-
getReferences
@NotNull public @NotNull java.lang.Iterable<java.lang.String> getReferences(boolean weak, @NotNull @NotNull Tree tree, @Nullable @Nullable java.lang.String propertyName)Searches all reference properties to the specifiedtreethat match the given name and node type constraints.- Parameters:
weak- iftrueonly 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;nullif no constraint should be enforced.- Returns:
- A set of oak paths of those reference properties referring to the
specified
treeand matching the constraints.
-
getReferences
@NotNull public @NotNull java.lang.Iterable<Tree> getReferences(@NotNull @NotNull Tree tree, @NotNull @NotNull java.lang.String propertyName, @NotNull @NotNull java.lang.String ntName, boolean weak)
Searches all reference properties to the specifiedtreethat match the givenpropertyNameand the specified, mandatory node type constraint (ntName). In contrast togetReferences(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.- Parameters:
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- iftrueonly weak references are returned. Otherwise on hard references are returned.- Returns:
- A set of oak trees containing reference properties referring to the
specified
treeand matching the constraints.
-
resolveUUID
@Nullable public @Nullable java.lang.String resolveUUID(java.lang.String uuid)
-
-