public interface DirectoryService
Modifier and Type | Field and Description |
---|---|
static String |
SYSTEM_DIRECTORY_TYPE |
Modifier and Type | Method and 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.
|
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.
|
static final String SYSTEM_DIRECTORY_TYPE
List<String> getDirectoryNames()
List<Directory> getDirectories()
Directory getDirectory(String id, DocumentModel documentContext)
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
.
id
- the directory iddocumentContext
- the document contextnull
if not foundDirectory getDirectory(String id)
If the id is null
, returns null
.
id
- the directory idnull
if not foundBaseDirectoryDescriptor getDirectoryDescriptor(String id)
id
- the directory idnull
if not registeredSession open(String directoryName)
This method prefers to throw rather than returning null.
directoryName
- Session open(String directoryName, DocumentModel documentContext)
This method prefers to throw rather than returning null.
directoryName
- documentContext
- String getDirectorySchema(String id)
id
- the directory idString getDirectoryIdField(String id)
id
- the directory idString getDirectoryPasswordField(String directoryName)
id
- the directory idString getParentDirectoryName(String id)
id
- the directory idnull
void registerDirectoryDescriptor(BaseDirectoryDescriptor descriptor)
void unregisterDirectoryDescriptor(BaseDirectoryDescriptor descriptor)
Copyright © 2019 Nuxeo. All rights reserved.