Package org.nuxeo.ecm.directory.api
Interface DirectoryService
- All Known Implementing Classes:
DirectoryServiceImpl
public interface DirectoryService
- Author:
- George Lefter
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets all the directories.getDirectory
(String id) Return the directory with the given id.getDirectory
(String id, DocumentModel documentContext) Returns the directory for the specified id and document context.Gets the effective directory descriptor for the given directory.Gets the id field for a directory.Gets the directory ids.getDirectoryPasswordField
(String directoryName) Gets the password field for a directory.Gets the schema for a directory.Gets the parent directory id a directory.void
loadFromCSV
(String directoryName, Blob dataBlob, String dataLoadingPolicy) Loads a CSV into the givendirectoryName
.Opens a session on specified directory.open
(String directoryName, DocumentModel documentContext) Opens a session on the directory for the specified context.void
registerDirectoryDescriptor
(BaseDirectoryDescriptor descriptor) INTERNAL registers a directory descriptor.void
unregisterDirectoryDescriptor
(BaseDirectoryDescriptor descriptor) INTERNAL unregisters a directory descriptor.
-
Field Details
-
SYSTEM_DIRECTORY_TYPE
- See Also:
-
-
Method Details
-
getDirectoryNames
Gets the directory ids. -
getDirectories
Gets all the directories. -
getDirectory
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
, returnsnull
.- Parameters:
id
- the directory iddocumentContext
- the document context- Returns:
- the directory, or
null
if not found
-
getDirectory
Return the directory with the given id.If the id is
null
, returnsnull
.- Parameters:
id
- the directory id- Returns:
- the directory, or
null
if not found
-
getDirectoryDescriptor
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
Opens a session on specified directory.This method prefers to throw rather than returning null.
- Returns:
- the session
-
open
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
Gets the schema for a directory.- Parameters:
id
- the directory id- Returns:
- the schema for the directory
-
getDirectoryIdField
Gets the id field for a directory.- Parameters:
id
- the directory id- Returns:
- the id field for the directory
-
getDirectoryPasswordField
Gets the password field for a directory.- Parameters:
directoryName
- the directory name- Returns:
- the password field for the directory
-
getParentDirectoryName
Gets the parent directory id a directory.- Parameters:
id
- the directory id- Returns:
- the parent directory id, which may be
null
-
registerDirectoryDescriptor
INTERNAL registers a directory descriptor. -
unregisterDirectoryDescriptor
INTERNAL unregisters a directory descriptor. -
loadFromCSV
Loads a CSV into the givendirectoryName
.- Since:
- 11.1
- See Also:
-