public class DirectoryServiceImpl extends DefaultComponent implements DirectoryService
Modifier and Type | Field and Description |
---|---|
protected static String |
DELIMITER_BETWEEN_DIRECTORY_NAME_AND_SUFFIX |
protected DirectoryFactoryRegistry |
factories |
protected DirectoryFactoryMapperRegistry |
factoriesByDirectoryName |
lastModified
NAME
Constructor and Description |
---|
DirectoryServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
applicationStarted(ComponentContext context)
Notify the component that Nuxeo Framework finished starting all Nuxeo bundles.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
List<Directory> |
getDirectories()
Return all the directories registered into the service.
|
Directory |
getDirectory(String directoryName)
Return the directory with the name directoryName.
|
Directory |
getDirectory(String name,
DocumentModel documentContext)
Return the directory for the specified context.
|
protected DirectoryConfiguration |
getDirectoryConfiguration(DocumentModel documentContext) |
String |
getDirectoryIdField(String directoryName) |
List<String> |
getDirectoryNames() |
String |
getDirectoryPasswordField(String directoryName) |
String |
getDirectorySchema(String directoryName) |
String |
getParentDirectoryName(String directoryName)
Returns the name of the parent directory of specified directory, if applicable.
|
protected String |
getWaitingLocalDirectoryName(String directoryName,
DirectoryConfiguration configuration)
This will return the local directory name according the local configuration.
|
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 |
registerDirectory(String directoryName,
DirectoryFactory factory) |
void |
registerExtension(Extension extension)
Registers the given extension.
|
void |
unregisterDirectory(String directoryName,
DirectoryFactory factory) |
void |
unregisterExtension(Extension extension)
Unregisters the given extension.
|
getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, setLastModified, setModifiedNow, unregisterContribution
protected static final String DELIMITER_BETWEEN_DIRECTORY_NAME_AND_SUFFIX
protected DirectoryFactoryRegistry factories
protected DirectoryFactoryMapperRegistry factoriesByDirectoryName
public DirectoryServiceImpl()
public void applicationStarted(ComponentContext context)
Component
applicationStarted
in interface Component
applicationStarted
in class DefaultComponent
protected DirectoryConfiguration getDirectoryConfiguration(DocumentModel documentContext)
protected String getWaitingLocalDirectoryName(String directoryName, DirectoryConfiguration configuration)
public Directory getDirectory(String directoryName) throws DirectoryException
DirectoryService
If the directoryName is null, return null.
getDirectory
in interface DirectoryService
DirectoryException
public Directory getDirectory(String name, DocumentModel documentContext) throws DirectoryException
DirectoryService
If the directoryName is null, return null.
getDirectory
in interface DirectoryService
DirectoryException
public List<Directory> getDirectories() throws DirectoryException
DirectoryService
getDirectories
in interface DirectoryService
DirectoryException
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void registerExtension(Extension extension)
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerpublic void unregisterExtension(Extension extension)
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterpublic void registerDirectory(String directoryName, DirectoryFactory factory)
registerDirectory
in interface DirectoryService
public void unregisterDirectory(String directoryName, DirectoryFactory factory)
unregisterDirectory
in interface DirectoryService
public List<String> getDirectoryNames() throws DirectoryException
getDirectoryNames
in interface DirectoryService
DirectoryException
public String getDirectorySchema(String directoryName) throws DirectoryException
getDirectorySchema
in interface DirectoryService
DirectoryException
public String getDirectoryIdField(String directoryName) throws DirectoryException
getDirectoryIdField
in interface DirectoryService
DirectoryException
public String getDirectoryPasswordField(String directoryName) throws DirectoryException
getDirectoryPasswordField
in interface DirectoryService
DirectoryException
public Session open(String directoryName) throws DirectoryException
DirectoryService
This method prefers to throw rather than returning null.
open
in interface DirectoryService
DirectoryException
- in case the session cannot be createdpublic Session open(String directoryName, DocumentModel documentContext) throws DirectoryException
DirectoryService
This method prefers to throw rather than returning null.
open
in interface DirectoryService
DirectoryException
- in case the session cannot be createdpublic String getParentDirectoryName(String directoryName) throws DirectoryException
DirectoryService
getParentDirectoryName
in interface DirectoryService
DirectoryException
Copyright © 2015 Nuxeo SA. All rights reserved.