Interface DirectoryService

All Known Implementing Classes:
DirectoryServiceImpl

public interface DirectoryService
Author:
George Lefter
  • Field Details

  • Method Details

    • getDirectoryNames

      List<String> getDirectoryNames()
      Gets the directory ids.
    • getDirectories

      List<Directory> getDirectories()
      Gets all the directories.
    • getDirectory

      Directory getDirectory(String id, DocumentModel documentContext)
      Returns the directory for the specified id and document context.

      The context is given by the document. The document service will try to find the directory local configuration of the document that will specify the suffix. The directory service will fetch the id + suffix found. If no local configuration is found the service will return the directory with the given id.

      If the id is null, returns null.

      Parameters:
      id - the directory id
      documentContext - the document context
      Returns:
      the directory, or null if not found
    • getDirectory

      Directory getDirectory(String id)
      Return the directory with the given id.

      If the id is null, returns null.

      Parameters:
      id - the directory id
      Returns:
      the directory, or null if not found
    • getDirectoryDescriptor

      BaseDirectoryDescriptor getDirectoryDescriptor(String id)
      Gets the effective directory descriptor for the given directory.
      Parameters:
      id - the directory id
      Returns:
      the effective directory descriptor, or null if not registered
      Since:
      8.2
    • open

      Session open(String directoryName)
      Opens a session on specified directory.

      This method prefers to throw rather than returning null.

      Returns:
      the session
    • open

      Session open(String directoryName, DocumentModel documentContext)
      Opens a session on the directory for the specified context. The context is given by the document. The document service will try to find the directory local configuration of the document that will specify the suffix. the directory will fetch the directoryName + suffix found. If no local configuration is found the service will return the directoryName directory.

      This method prefers to throw rather than returning null.

      Returns:
      the session
    • getDirectorySchema

      String getDirectorySchema(String id)
      Gets the schema for a directory.
      Parameters:
      id - the directory id
      Returns:
      the schema for the directory
    • getDirectoryIdField

      String getDirectoryIdField(String id)
      Gets the id field for a directory.
      Parameters:
      id - the directory id
      Returns:
      the id field for the directory
    • getDirectoryPasswordField

      String getDirectoryPasswordField(String directoryName)
      Gets the password field for a directory.
      Parameters:
      directoryName - the directory name
      Returns:
      the password field for the directory
    • getParentDirectoryName

      String getParentDirectoryName(String id)
      Gets the parent directory id a directory.
      Parameters:
      id - the directory id
      Returns:
      the parent directory id, which may be null
    • registerDirectoryDescriptor

      void registerDirectoryDescriptor(BaseDirectoryDescriptor descriptor)
      INTERNAL registers a directory descriptor.
    • unregisterDirectoryDescriptor

      void unregisterDirectoryDescriptor(BaseDirectoryDescriptor descriptor)
      INTERNAL unregisters a directory descriptor.
    • loadFromCSV

      void loadFromCSV(String directoryName, Blob dataBlob, String dataLoadingPolicy)
      Loads a CSV into the given directoryName.
      Since:
      11.1
      See Also: