Package org.nuxeo.ecm.directory
Class DirectoryRegistry
java.lang.Object
org.nuxeo.ecm.directory.DirectoryRegistry
Generic
BaseDirectoryDescriptor
registry holding registered descriptors and instantiated Directory
objects.
The directory descriptors have two special boolean flags that control how merge works:
remove="true"
: this removes the definition of the directory. The next definition (if any) will be done from scratch.template="true"
: this defines an abstract descriptor which cannot be directly instantiated as a directory. However another descriptor can extend it throughextends="templatename"
to inherit all its properties.
- Since:
- 8.2
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<String,
List<BaseDirectoryDescriptor>> All descriptors registered.protected Map<String,
BaseDirectoryDescriptor> Effective descriptors.Effective instantiated directories. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContribution
(BaseDirectoryDescriptor contrib) protected void
Gets all the directories.getDirectory
(String id) Gets the directory with the given id.Gets the effective directory descriptor with the given id.Gets all the directory ids.protected BaseDirectoryDescriptor
Recomputes the effective descriptor for a directory id.void
protected void
void
shutdown()
Shuts down all directories and clears the registry.protected static void
Shuts down the given directory and catches anyDirectoryException
.
-
Field Details
-
allDescriptors
All descriptors registered. -
descriptors
Effective descriptors. -
directories
Effective instantiated directories.
-
-
Constructor Details
-
DirectoryRegistry
public DirectoryRegistry()
-
-
Method Details
-
addContribution
-
removeContribution
-
contributionChanged
-
removeDirectory
-
recomputeDescriptor
Recomputes the effective descriptor for a directory id. -
getDirectoryDescriptor
Gets the effective directory descriptor with the given id.Templates are not returned.
- Parameters:
id
- the directory id- Returns:
- the effective directory descriptor, or
null
if not found
-
getDirectory
Gets the directory with the given id.- Parameters:
id
- the directory id- Returns:
- the directory, or
null
if not found
-
getDirectoryIds
Gets all the directory ids.- Returns:
- the directory ids
-
getDirectories
Gets all the directories.- Returns:
- the directories
-
shutdown
public void shutdown()Shuts down all directories and clears the registry. -
shutdownDirectory
Shuts down the given directory and catches anyDirectoryException
.- Parameters:
dir
- the directory
-