Package org.nuxeo.ecm.directory.api
Interface DirectoryService
-
- All Known Implementing Classes:
DirectoryServiceImpl
public interface DirectoryService
- Author:
- George Lefter
-
-
Field Summary
Fields Modifier and Type Field Description static String
SYSTEM_DIRECTORY_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Directory>
getDirectories()
Gets all the directories.Directory
getDirectory(String id)
Return the directory with the given id.Directory
getDirectory(String id, DocumentModel documentContext)
Returns the directory for the specified id and document context.BaseDirectoryDescriptor
getDirectoryDescriptor(String id)
Gets the effective directory descriptor for the given directory.String
getDirectoryIdField(String id)
Gets the id field for a directory.List<String>
getDirectoryNames()
Gets the directory ids.String
getDirectoryPasswordField(String directoryName)
Gets the password field for a directory.String
getDirectorySchema(String id)
Gets the schema for a directory.String
getParentDirectoryName(String id)
Gets the parent directory id a directory.void
loadFromCSV(String directoryName, Blob dataBlob, String dataLoadingPolicy)
Loads a CSV into the givendirectoryName
.Session
open(String directoryName)
Opens a session on specified directory.Session
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 Detail
-
SYSTEM_DIRECTORY_TYPE
static final String SYSTEM_DIRECTORY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
, returnsnull
.- Parameters:
id
- the directory iddocumentContext
- 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
, returnsnull
.- 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 givendirectoryName
.- Since:
- 11.1
- See Also:
BaseDirectoryDescriptor.DATA_LOADING_POLICIES
-
-