public class DirectoryServiceImpl extends DefaultComponent implements DirectoryService
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.
|
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.
|
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, unregisterContribution
public void applicationStarted(ComponentContext context) throws Exception
Component
applicationStarted
in interface Component
applicationStarted
in class DefaultComponent
Exception
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) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void registerExtension(Extension extension) throws Exception
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerException
- if any error occurspublic void unregisterExtension(Extension extension) throws Exception
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterException
- if any error occurspublic 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 © 2013 Nuxeo SA. All Rights Reserved.