Class DirectoryRegistry

java.lang.Object
org.nuxeo.ecm.directory.DirectoryRegistry

public class DirectoryRegistry extends Object
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 through extends="templatename" to inherit all its properties.
Since:
8.2
  • Field Details

  • Constructor Details

    • DirectoryRegistry

      public DirectoryRegistry()
  • Method Details

    • addContribution

      public void addContribution(BaseDirectoryDescriptor contrib)
    • removeContribution

      public void removeContribution(BaseDirectoryDescriptor contrib)
    • contributionChanged

      protected void contributionChanged(BaseDirectoryDescriptor contrib)
    • removeDirectory

      protected void removeDirectory(String id)
    • recomputeDescriptor

      protected BaseDirectoryDescriptor recomputeDescriptor(String id)
      Recomputes the effective descriptor for a directory id.
    • getDirectoryDescriptor

      public BaseDirectoryDescriptor getDirectoryDescriptor(String id)
      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

      public Directory getDirectory(String id)
      Gets the directory with the given id.
      Parameters:
      id - the directory id
      Returns:
      the directory, or null if not found
    • getDirectoryIds

      public List<String> getDirectoryIds()
      Gets all the directory ids.
      Returns:
      the directory ids
    • getDirectories

      public List<Directory> getDirectories()
      Gets all the directories.
      Returns:
      the directories
    • shutdown

      public void shutdown()
      Shuts down all directories and clears the registry.
    • shutdownDirectory

      protected static void shutdownDirectory(Directory dir)
      Shuts down the given directory and catches any DirectoryException.
      Parameters:
      dir - the directory