|
Nuxeo Enterprise Platform 5.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuxeo.ecm.platform.directory.ejb.DirectoryManagerBean
public class DirectoryManagerBean
Facade Bean provide Remoting API for DirectoryService
| Field Summary |
|---|
| Fields inherited from interface org.nuxeo.ecm.directory.api.DirectoryService |
|---|
NAME |
| Constructor Summary | |
|---|---|
DirectoryManagerBean()
|
|
| Method Summary | |
|---|---|
boolean |
authenticate(long sessionId,
java.lang.String username,
java.lang.String password)
Checks that the credentials provided by the UserManager match those registered in the directory. |
void |
close(long sessionId)
Closes the session and all open result sets obtained from this session. |
void |
commit(long sessionId)
Commits any changes on this session. |
DocumentModel |
createEntry(long sessionId,
DocumentModel entry)
Creates an entry in a directory. |
DocumentModel |
createEntry(long sessionId,
java.util.Map<java.lang.String,java.lang.Object> map)
Creates an entry in a directory. |
void |
deleteEntry(long sessionId,
DocumentModel docModel)
Deletes a directory entry. |
void |
deleteEntry(long sessionId,
java.lang.String id)
Deletes a directory entry by id. |
void |
deleteEntry(long sessionId,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.String> map)
Deletes a directory entry by id and secondary ids. |
java.util.List<Directory> |
getDirectories()
|
Directory |
getDirectory(java.lang.String name)
|
java.lang.String |
getDirectoryIdField(java.lang.String directoryName)
|
java.util.List<java.lang.String> |
getDirectoryNames()
|
java.lang.String |
getDirectoryPasswordField(java.lang.String directoryName)
|
java.lang.String |
getDirectorySchema(java.lang.String directoryName)
|
DocumentModelList |
getEntries(long sessionId)
Retrieves all the entries in the directory. |
DocumentModel |
getEntry(long sessionId,
java.lang.String id)
Retrieves a directory entry using its id. |
DocumentModel |
getEntry(long sessionId,
java.lang.String id,
boolean fetchReferences)
Retrieves a directory entry using its id. |
java.lang.String |
getIdField(long sessionId)
The Id field is the name of the field that is used a primary key: unique and not null value in the whole directory. |
java.lang.String |
getParentDirectoryName(java.lang.String directoryName)
Returns the name of the parent directory of specified directory, if applicable. |
java.lang.String |
getPasswordField(long sessionId)
|
java.util.List<java.lang.String> |
getProjection(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.util.Set<java.lang.String> fulltext,
java.lang.String columnName)
|
java.util.List<java.lang.String> |
getProjection(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.lang.String columnName)
Executes a query using filter and return only the column columnName. |
boolean |
hasEntry(long sessionId,
java.lang.String id)
Returns true if session has an entry with given id. |
void |
initialize()
|
boolean |
isAuthenticating(long sessionId)
Tells whether the directory implementation can be used as an authenticating backend for the UserManager (based on login / password check). |
boolean |
isReadOnly(long sessionId)
|
Session |
open(java.lang.String directoryName)
Opens a session on specified directory. |
DocumentModelList |
query(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter)
Executes a simple query. |
DocumentModelList |
query(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.util.Set<java.lang.String> fulltext)
Executes a simple query. |
DocumentModelList |
query(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.util.Set<java.lang.String> fulltext,
java.util.Map<java.lang.String,java.lang.String> orderBy)
Executes a simple query. |
DocumentModelList |
query(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.util.Set<java.lang.String> fulltext,
java.util.Map<java.lang.String,java.lang.String> orderBy,
boolean fetchReferences)
|
void |
registerDirectory(java.lang.String directoryName,
DirectoryFactory factory)
|
void |
rollback(long sessionId)
Rollbacks any changes on this session. |
void |
unregisterDirectory(java.lang.String directoryName,
DirectoryFactory factory)
|
void |
updateEntry(long sessionId,
DocumentModel docModel)
Updates a directory entry. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectoryManagerBean()
| Method Detail |
|---|
@PostConstruct public void initialize()
public boolean authenticate(long sessionId,
java.lang.String username,
java.lang.String password)
throws DirectoryException
DirectoryManager
authenticate in interface DirectoryManagerDirectoryException
public void close(long sessionId)
throws DirectoryException
DirectoryManagerReleases this Connection object's resources immediately instead of waiting for them to be automatically released.
TODO: should this operation auto-commit pending changes?
close in interface DirectoryManagerDirectoryException - if a communication error occurs
public void commit(long sessionId)
throws DirectoryException
DirectoryManager
commit in interface DirectoryManagerDirectoryException - if a communication error occurs
In this case the session will be automatically rollbacked
public DocumentModel createEntry(long sessionId,
java.util.Map<java.lang.String,java.lang.Object> map)
throws DirectoryException
DirectoryManager
createEntry in interface DirectoryManagermap - A map with keys and values that should be stored in a
directory
Note: The values in the map should be of type String
DirectoryException - if a communication exception occurs or if an
entry with the same id already exists.
public void deleteEntry(long sessionId,
DocumentModel docModel)
throws DirectoryException
DirectoryManager
deleteEntry in interface DirectoryManagerdocModel - The entry to delete
DirectoryException - if a communication error occurs
public void deleteEntry(long sessionId,
java.lang.String id)
throws DirectoryException
DirectoryManager
deleteEntry in interface DirectoryManagerid - the id of the entry to delete
DirectoryException - if a communication error occurs
public void deleteEntry(long sessionId,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.String> map)
throws DirectoryException
DirectoryManagerThis is used for hierarchical vocabularies, where the actual unique key is the couple (parent, id).
deleteEntry in interface DirectoryManagersessionId - the session id.id - the id of the entry to delete.map - a map of seconday key values.
DirectoryException - if a communication error occurs.
public DocumentModelList getEntries(long sessionId)
throws DirectoryException
DirectoryManager
getEntries in interface DirectoryManagerDirectoryException
SizeLimitExceededException - if the number of results is larger
than the limit configured for the directory
public DocumentModel getEntry(long sessionId,
java.lang.String id)
throws DirectoryException
DirectoryManagerTODO what happens when the entry is not found? return null if not found?
getEntry in interface DirectoryManagerid - the entry id
DirectoryException
public DocumentModel getEntry(long sessionId,
java.lang.String id,
boolean fetchReferences)
throws DirectoryException
DirectoryManager
getEntry in interface DirectoryManagerid - the entry idfetchReferences - boolean stating if references have to be fetched
DirectoryExceptionDirectoryManager.getEntry(long, String)
public java.lang.String getIdField(long sessionId)
throws DirectoryException
DirectoryManager
getIdField in interface DirectoryManagerDirectoryException
public java.lang.String getPasswordField(long sessionId)
throws DirectoryException
getPasswordField in interface DirectoryManagerDirectoryException
public java.util.List<java.lang.String> getProjection(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.lang.String columnName)
throws DirectoryException
DirectoryManager
getProjection in interface DirectoryManagerfilter - the filter for the querycolumnName - the column whose content should be returned
DirectoryException
SizeLimitExceededException - if the number of results is larger
than the limit configured for the directory
public java.util.List<java.lang.String> getProjection(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.util.Set<java.lang.String> fulltext,
java.lang.String columnName)
throws DirectoryException
getProjection in interface DirectoryManagerDirectoryException
public boolean isAuthenticating(long sessionId)
throws DirectoryException
DirectoryManager
isAuthenticating in interface DirectoryManagerDirectoryException
public boolean isReadOnly(long sessionId)
throws DirectoryException
isReadOnly in interface DirectoryManagerDirectoryException
public DocumentModelList query(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter)
throws DirectoryException
DirectoryManager
query in interface DirectoryManagerfilter - a filter to apply to entries in directory
DirectoryException - if a communication error occurs
SizeLimitExceededException - if the number of results is larger
than the limit configured for the directory
public DocumentModelList query(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.util.Set<java.lang.String> fulltext)
throws DirectoryException
DirectoryManagerfieldNames present in the fulltext set are treated as a fulltext match.
query in interface DirectoryManagerfilter - a filter to apply to entries in directoryfulltext - a set of field that should be treated as a fulltext
search
DirectoryException - if a communication error occurs
SizeLimitExceededException - if the number of results is larger
than the limit configured for the directory
public DocumentModelList query(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.util.Set<java.lang.String> fulltext,
java.util.Map<java.lang.String,java.lang.String> orderBy)
throws DirectoryException
DirectoryManagerfieldNames present in the fulltext set are treated as a fulltext match.
query in interface DirectoryManagerfilter - a filter to apply to entries in directoryfulltext - a set of field that should be treated as a fulltext
searchorderBy - a LinkedHashMap with the 'order by' criterias.The key of
an entry of this map represents the column name and the value
of the same entry represent the column order,which may be
'asc' or 'desc'.
DirectoryException - if a communication error occurs
SizeLimitExceededException - if the number of results is larger
than the limit configured for the directory
public DocumentModelList query(long sessionId,
java.util.Map<java.lang.String,java.io.Serializable> filter,
java.util.Set<java.lang.String> fulltext,
java.util.Map<java.lang.String,java.lang.String> orderBy,
boolean fetchReferences)
throws DirectoryException
query in interface DirectoryManagerDirectoryException
public void rollback(long sessionId)
throws DirectoryException
DirectoryManager
rollback in interface DirectoryManagerDirectoryException - if a communication error occurs
In this case, the session will be automatically rollbacked anyway
public void updateEntry(long sessionId,
DocumentModel docModel)
throws DirectoryException
DirectoryManager
updateEntry in interface DirectoryManagerdocModel - The entry to update
DirectoryException - if a communication error occurs
public java.util.List<java.lang.String> getDirectoryNames()
throws DirectoryException
getDirectoryNames in interface DirectoryServiceDirectoryException
public java.lang.String getDirectorySchema(java.lang.String directoryName)
throws DirectoryException
getDirectorySchema in interface DirectoryServiceDirectoryException
public Session open(java.lang.String directoryName)
throws DirectoryException
DirectoryServiceThis method prefers to throw rather than returning null.
open in interface DirectoryServiceDirectoryException - in case the session cannot be created
public Directory getDirectory(java.lang.String name)
throws DirectoryException
getDirectory in interface DirectoryServiceDirectoryException
public java.util.List<Directory> getDirectories()
throws DirectoryException
getDirectories in interface DirectoryServiceDirectoryException
public java.lang.String getDirectoryIdField(java.lang.String directoryName)
throws DirectoryException
getDirectoryIdField in interface DirectoryServiceDirectoryException
public java.lang.String getDirectoryPasswordField(java.lang.String directoryName)
throws DirectoryException
getDirectoryPasswordField in interface DirectoryServiceDirectoryException
public void registerDirectory(java.lang.String directoryName,
DirectoryFactory factory)
registerDirectory in interface DirectoryService
public void unregisterDirectory(java.lang.String directoryName,
DirectoryFactory factory)
unregisterDirectory in interface DirectoryService
public java.lang.String getParentDirectoryName(java.lang.String directoryName)
throws DirectoryException
DirectoryService
getParentDirectoryName in interface DirectoryServiceDirectoryException
public DocumentModel createEntry(long sessionId,
DocumentModel entry)
throws DirectoryException
DirectoryManager
createEntry in interface DirectoryManagerentry - the document model representing the entry to create
DirectoryException - if a communication exception occurs or if an
entry with the same id already exists.
public boolean hasEntry(long sessionId,
java.lang.String id)
throws DirectoryException
DirectoryManager
hasEntry in interface DirectoryManagerDirectoryException
|
Nuxeo Enterprise Platform 5.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||