Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.directory.api
Interface DirectoryService

All Known Subinterfaces:
DirectoryManager
All Known Implementing Classes:
DirectoryServiceImpl

public interface DirectoryService

Author:
George Lefter

Field Summary
static ComponentName NAME
           
 
Method Summary
 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 directoryName, 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 unregisterDirectory(String directoryName, DirectoryFactory factory)
           
 

Field Detail

NAME

static final ComponentName NAME
Method Detail

getDirectoryNames

List<String> getDirectoryNames()
                               throws ClientException
Throws:
ClientException

getDirectorySchema

String getDirectorySchema(String directoryName)
                          throws DirectoryException
Throws:
DirectoryException

open

Session open(String directoryName)
             throws DirectoryException
Opens a session on specified directory.

This method prefers to throw rather than returning null.

Parameters:
directoryName -
Returns:
the session
Throws:
DirectoryException - in case the session cannot be created

open

Session open(String directoryName,
             DocumentModel documentContext)
             throws DirectoryException
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.

Parameters:
directoryName -
documentContext -
Returns:
the session
Throws:
DirectoryException - in case the session cannot be created

getDirectory

Directory getDirectory(String directoryName,
                       DocumentModel documentContext)
                       throws DirectoryException
Return 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 service will fetch the directoryName + suffix found. If no local configuration is found the service will return the directoryName directory.

If the directoryName is null, return null.

Parameters:
directoryName -
documentContext -
Returns:
the directory, if the factory of the directory or the directory itself is not found return null
Throws:
DirectoryException

getDirectory

Directory getDirectory(String directoryName)
                       throws DirectoryException
Return the directory with the name directoryName.

If the directoryName is null, return null.

Parameters:
directoryName -
Returns:
the directory, if the factory of the directory or the directory itself is not found return null
Throws:
DirectoryException

getDirectories

List<Directory> getDirectories()
                               throws DirectoryException
Return all the directories registered into the service.

Throws:
DirectoryException

registerDirectory

void registerDirectory(String directoryName,
                       DirectoryFactory factory)

unregisterDirectory

void unregisterDirectory(String directoryName,
                         DirectoryFactory factory)

getDirectoryIdField

String getDirectoryIdField(String directoryName)
                           throws DirectoryException
Throws:
DirectoryException

getDirectoryPasswordField

String getDirectoryPasswordField(String directoryName)
                                 throws DirectoryException
Throws:
DirectoryException

getParentDirectoryName

String getParentDirectoryName(String directoryName)
                              throws DirectoryException
Returns the name of the parent directory of specified directory, if applicable.

Parameters:
directoryName -
Returns:
the name, or null
Throws:
DirectoryException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.