Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.usermanager
Interface UserManager

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
UserManagerLocal
All Known Implementing Classes:
FakeUserManagerImpl, UserManagerBean, UserManagerImpl, UserManagerWithComputedGroups

public interface UserManager
extends java.io.Serializable

Author:
Anahide Tchertchian

Nested Class Summary
static class UserManager.MatchType
           
 
Method Summary
 java.lang.Boolean areGroupsReadOnly()
          Returns true is users referential is read only (ie : LDAP) -> can not add users -> can not delete users.
 java.lang.Boolean areUsersReadOnly()
          Returns true is groups referential is read only (ie : LDAP) -> can not add groups -> can not delete groups.
 boolean checkUsernamePassword(java.lang.String username, java.lang.String password)
           
 DocumentModel createGroup(DocumentModel groupModel)
          Creates a group from given model.
 void createGroup(NuxeoGroup group)
          Deprecated. use createGroup(DocumentModel)
 void createPrincipal(NuxeoPrincipal principal)
          Deprecated. use createUser(DocumentModel)
 DocumentModel createUser(DocumentModel userModel)
          Creates user from given model.
 void deleteGroup(DocumentModel groupModel)
          Deletes group represented by given model.
 void deleteGroup(NuxeoGroup group)
          Deprecated. use deleteGroup(DocumentModel)
 void deleteGroup(java.lang.String groupId)
          Deletes group with given id.
 void deletePrincipal(NuxeoPrincipal principal)
          Deprecated. use deleteUser(DocumentModel)
 void deleteUser(DocumentModel userModel)
          Deletes user represented by given model.
 void deleteUser(java.lang.String userId)
          Deletes user with given id.
 java.util.List<java.lang.String> getAdministratorsGroups()
          Returns the list of administrators groups.
 java.lang.String getAnonymousUserId()
          Gets the anonymous user id.
 java.util.List<NuxeoGroup> getAvailableGroups()
          Deprecated. use getGroupIds() or #searchGroups(Map, Set)
 java.util.List<NuxeoPrincipal> getAvailablePrincipals()
          Deprecated. use getUserIds() or #searchUsers(null)
 DocumentModel getBareGroupModel()
          Returns a bare group model.
 DocumentModel getBareUserModel()
          Returns a bare user model.
 java.lang.String getDefaultGroup()
           
 NuxeoGroup getGroup(java.lang.String groupName)
          Returns the nuxeo group with given name or null if it does not exist.
 java.lang.String getGroupDirectoryName()
          Gets the group directory name.
 java.lang.String getGroupIdField()
          Returns the group directory id field.
 java.util.List<java.lang.String> getGroupIds()
          Returns the list of all groups ids.
 java.lang.String getGroupListingMode()
           
 java.lang.String getGroupMembersField()
          Gets the group members field.
 DocumentModel getGroupModel(java.lang.String groupName)
          Return the group document model with this id or null if group does not exist.
 java.lang.String getGroupParentGroupsField()
          Gets the group parent-groups field.
 java.lang.String getGroupSchemaName()
          Returns the group directory schema name.
 java.util.List<java.lang.String> getGroupsInGroup(java.lang.String parentId)
          Returns the list of groups that belong to this group.
 java.lang.String getGroupSubGroupsField()
          Gets the group sub-groups field.
 DocumentModel getModelForUser(java.lang.String name)
          Deprecated. use getUserModel(String)
 NuxeoPrincipal getPrincipal(java.lang.String username)
          Retrieves the principal with the given username or null if it does not exist.
 java.util.List<java.lang.String> getTopLevelGroups()
          Returns the list of groups that are not members of other groups.
 java.lang.String getUserDirectoryName()
          Gets the user directory name.
 java.lang.String getUserEmailField()
          Gets the user email field.
 java.lang.String getUserIdField()
          Returns the user directory id field.
 java.util.List<java.lang.String> getUserIds()
          Returns the list of all user ids.
 java.lang.String getUserListingMode()
           
 DocumentModel getUserModel(java.lang.String userName)
          Returns the document model representing user with given id or null if it does not exist.
 java.util.regex.Pattern getUserPasswordPattern()
           
 java.lang.String getUserSchemaName()
          Returns the user directory schema name.
 java.util.Set<java.lang.String> getUserSearchFields()
          Gets the user search fields, the fields to use when a principal search is done.
 java.util.List<java.lang.String> getUsersInGroup(java.lang.String groupId)
          Returns the list of users that belong to this group.
 java.util.List<java.lang.String> getUsersInGroupAndSubGroups(java.lang.String groupId)
          Get users from a group and its subgroups.
 java.lang.String getUserSortField()
           
 java.util.List<NuxeoPrincipal> searchByMap(java.util.Map<java.lang.String,java.io.Serializable> filter, java.util.Set<java.lang.String> pattern)
          Deprecated. use searchUsers(Map, Set)
 DocumentModelList searchGroups(java.util.Map<java.lang.String,java.io.Serializable> filter, java.util.HashSet<java.lang.String> fulltext)
          Returns groups matching given criteria.
 java.util.List<NuxeoGroup> searchGroups(java.lang.String pattern)
          Deprecated. see searchGroups(String)
 java.util.List<NuxeoPrincipal> searchPrincipals(java.lang.String pattern)
          Deprecated. see searchUsers(String)
 DocumentModelList searchUsers(java.util.Map<java.lang.String,java.io.Serializable> filter, java.util.Set<java.lang.String> fulltext)
          Returns users matching given criteria.
 DocumentModelList searchUsers(java.lang.String pattern)
          Returns users matching given pattern Pattern is used to fill a filter and fulltext map according to users search fields configuration.
 void setConfiguration(UserManagerDescriptor descriptor)
          Sets the given configuration on the service.
 void updateGroup(DocumentModel groupModel)
          Updates group represented by given model.
 void updateGroup(NuxeoGroup group)
          Deprecated. use updateGroup(DocumentModel)
 void updatePrincipal(NuxeoPrincipal principal)
          Deprecated. use updateUser(DocumentModel)
 void updateUser(DocumentModel userModel)
          Updates user represented by given model.
 boolean validatePassword(java.lang.String password)
           
 

Method Detail

checkUsernamePassword

boolean checkUsernamePassword(java.lang.String username,
                              java.lang.String password)
                              throws ClientException
Throws:
ClientException

validatePassword

boolean validatePassword(java.lang.String password)
                         throws ClientException
Throws:
ClientException

getPrincipal

NuxeoPrincipal getPrincipal(java.lang.String username)
                            throws ClientException
Retrieves the principal with the given username or null if it does not exist.

Can build principals for anonymous and virtual users as well as for users defined in the users directory.

Throws:
ClientException

getGroup

NuxeoGroup getGroup(java.lang.String groupName)
                    throws ClientException
Returns the nuxeo group with given name or null if it does not exist.

Throws:
ClientException

searchPrincipals

@Deprecated
java.util.List<NuxeoPrincipal> searchPrincipals(java.lang.String pattern)
                                                throws ClientException
Deprecated. see searchUsers(String)

Throws:
ClientException

searchGroups

@Deprecated
java.util.List<NuxeoGroup> searchGroups(java.lang.String pattern)
                                        throws ClientException
Deprecated. see searchGroups(String)

Throws:
ClientException

getUserIds

java.util.List<java.lang.String> getUserIds()
                                            throws ClientException
Returns the list of all user ids.

Throws:
ClientException
Since:
5.2M4

createUser

DocumentModel createUser(DocumentModel userModel)
                         throws ClientException,
                                UserAlreadyExistsException
Creates user from given model.

Throws:
ClientException
UserAlreadyExistsException
Since:
5.2M4

updateUser

void updateUser(DocumentModel userModel)
                throws ClientException
Updates user represented by given model.

Parameters:
userModel -
Throws:
ClientException
Since:
5.2M4

deleteUser

void deleteUser(DocumentModel userModel)
                throws ClientException
Deletes user represented by given model.

Throws:
DirectoryException - if given entry does not exist
ClientException
Since:
5.2M4

deleteUser

void deleteUser(java.lang.String userId)
                throws ClientException
Deletes user with given id.

Throws:
DirectoryException - if given entry does not exist
ClientException
Since:
5.2M4

getBareUserModel

DocumentModel getBareUserModel()
                               throws ClientException
Returns a bare user model.

Can be used for user creation/search screens.

Throws:
ClientException
Since:
5.2M4

getUserModel

DocumentModel getUserModel(java.lang.String userName)
                           throws ClientException
Returns the document model representing user with given id or null if it does not exist.

Throws:
ClientException
Since:
5.2M4

searchUsers

DocumentModelList searchUsers(java.lang.String pattern)
                              throws ClientException
Returns users matching given pattern

Pattern is used to fill a filter and fulltext map according to users search fields configuration. Search is performed on each of these fields (OR).

Throws:
ClientException
Since:
5.2M4

searchUsers

DocumentModelList searchUsers(java.util.Map<java.lang.String,java.io.Serializable> filter,
                              java.util.Set<java.lang.String> fulltext)
                              throws ClientException
Returns users matching given criteria.

Parameters:
filter - filter with field names as keys
fulltext - field names used for fulltext match
Throws:
ClientException
Since:
5.2M4

getUserListingMode

java.lang.String getUserListingMode()
                                    throws ClientException
Throws:
ClientException

getUserSortField

java.lang.String getUserSortField()
                                  throws ClientException
Throws:
ClientException

getUserPasswordPattern

java.util.regex.Pattern getUserPasswordPattern()
                                               throws ClientException
Throws:
ClientException

getGroupIds

java.util.List<java.lang.String> getGroupIds()
                                             throws ClientException
Returns the list of all groups ids.

Throws:
ClientException
Since:
5.2M4

searchGroups

DocumentModelList searchGroups(java.util.Map<java.lang.String,java.io.Serializable> filter,
                               java.util.HashSet<java.lang.String> fulltext)
                               throws ClientException
Returns groups matching given criteria.

Parameters:
filter - filter with field names as keys
fulltext - field names used for fulltext match
Throws:
ClientException
Since:
5.2M4

createGroup

DocumentModel createGroup(DocumentModel groupModel)
                          throws ClientException,
                                 GroupAlreadyExistsException
Creates a group from given model.

Returns:
the created group model
Throws:
ClientException
GroupAlreadyExistsException
Since:
5.2M4

updateGroup

void updateGroup(DocumentModel groupModel)
                 throws ClientException
Updates group represented by given model.

Throws:
DirectoryException - if given entry does not exist
ClientException
Since:
5.2M4

deleteGroup

void deleteGroup(DocumentModel groupModel)
                 throws ClientException
Deletes group represented by given model.

Parameters:
groupModel -
Throws:
DirectoryException - if given entry does not exist
ClientException
Since:
5.2M4

deleteGroup

void deleteGroup(java.lang.String groupId)
                 throws ClientException
Deletes group with given id.

Parameters:
groupId -
Throws:
DirectoryException - if given entry does not exist
ClientException
Since:
5.2M4

getBareGroupModel

DocumentModel getBareGroupModel()
                                throws ClientException
Returns a bare group model.

Can be used for group creation/search screens.

Throws:
ClientException
Since:
5.2M4

getGroupModel

DocumentModel getGroupModel(java.lang.String groupName)
                            throws ClientException
Return the group document model with this id or null if group does not exist.

Parameters:
groupName - the group identifier
Throws:
ClientException
Since:
5.2M4

getDefaultGroup

java.lang.String getDefaultGroup()

getGroupListingMode

java.lang.String getGroupListingMode()
                                     throws ClientException
Throws:
ClientException

getGroupsInGroup

java.util.List<java.lang.String> getGroupsInGroup(java.lang.String parentId)
                                                  throws ClientException
Returns the list of groups that belong to this group.

Parameters:
parentId - the name of the parent group.
Returns:
Throws:
ClientException

getTopLevelGroups

java.util.List<java.lang.String> getTopLevelGroups()
                                                   throws ClientException
Returns the list of groups that are not members of other groups.

Returns:
Throws:
ClientException

getUsersInGroup

java.util.List<java.lang.String> getUsersInGroup(java.lang.String groupId)
                                                 throws ClientException
Returns the list of users that belong to this group.

Parameters:
groupId - ID of the group
Returns:
Throws:
ClientException

getUsersInGroupAndSubGroups

java.util.List<java.lang.String> getUsersInGroupAndSubGroups(java.lang.String groupId)
                                                             throws ClientException
Get users from a group and its subgroups.

Parameters:
groupId - ID of the group
Returns:
Throws:
ClientException

areGroupsReadOnly

java.lang.Boolean areGroupsReadOnly()
                                    throws ClientException
Returns true is users referential is read only (ie : LDAP) -> can not add users -> can not delete users.

Throws:
ClientException

areUsersReadOnly

java.lang.Boolean areUsersReadOnly()
                                   throws ClientException
Returns true is groups referential is read only (ie : LDAP) -> can not add groups -> can not delete groups.

Throws:
ClientException

getUserDirectoryName

java.lang.String getUserDirectoryName()
                                      throws ClientException
Gets the user directory name.

Returns:
the user directory name.
Throws:
ClientException

getUserSchemaName

java.lang.String getUserSchemaName()
                                   throws ClientException
Returns the user directory schema name.

Throws:
ClientException
Since:
5.2M4

getUserIdField

java.lang.String getUserIdField()
                                throws ClientException
Returns the user directory id field.

Throws:
ClientException
Since:
5.2M4

getUserEmailField

java.lang.String getUserEmailField()
                                   throws ClientException
Gets the user email field.

Returns:
the user email field.
Throws:
ClientException

getUserSearchFields

java.util.Set<java.lang.String> getUserSearchFields()
                                                    throws ClientException
Gets the user search fields, the fields to use when a principal search is done.

Returns:
the search fields.
Throws:
ClientException

getGroupDirectoryName

java.lang.String getGroupDirectoryName()
                                       throws ClientException
Gets the group directory name.

Returns:
the group directory name.
Throws:
ClientException

getGroupSchemaName

java.lang.String getGroupSchemaName()
                                    throws ClientException
Returns the group directory schema name.

Throws:
ClientException
Since:
5.2M4

getGroupIdField

java.lang.String getGroupIdField()
                                 throws ClientException
Returns the group directory id field.

Throws:
ClientException
Since:
5.2M4

getGroupMembersField

java.lang.String getGroupMembersField()
                                      throws ClientException
Gets the group members field.

Returns:
the group members field.
Throws:
ClientException

getGroupSubGroupsField

java.lang.String getGroupSubGroupsField()
                                        throws ClientException
Gets the group sub-groups field.

Returns:
the sub-groups field.
Throws:
ClientException

getGroupParentGroupsField

java.lang.String getGroupParentGroupsField()
                                           throws ClientException
Gets the group parent-groups field.

Returns:
the parent-groups field.
Throws:
ClientException

getAnonymousUserId

java.lang.String getAnonymousUserId()
                                    throws ClientException
Gets the anonymous user id.

Returns:
the anonymous user id, or the default one if none is defined.
Throws:
ClientException

setConfiguration

void setConfiguration(UserManagerDescriptor descriptor)
                      throws ClientException
Sets the given configuration on the service.

Parameters:
descriptor - the descriptor as parsed from xml, merged from the previous one if it exists.
Throws:
ClientException

getAdministratorsGroups

java.util.List<java.lang.String> getAdministratorsGroups()
Returns the list of administrators groups.

Since:
5.3 GA

getModelForUser

@Deprecated
DocumentModel getModelForUser(java.lang.String name)
                              throws ClientException
Deprecated. use getUserModel(String)

Throws:
ClientException

getAvailablePrincipals

@Deprecated
java.util.List<NuxeoPrincipal> getAvailablePrincipals()
                                                      throws ClientException
Deprecated. use getUserIds() or #searchUsers(null)

Throws:
ClientException

createPrincipal

@Deprecated
void createPrincipal(NuxeoPrincipal principal)
                     throws ClientException
Deprecated. use createUser(DocumentModel)

Throws:
ClientException

updatePrincipal

@Deprecated
void updatePrincipal(NuxeoPrincipal principal)
                     throws ClientException
Deprecated. use updateUser(DocumentModel)

Throws:
ClientException

deletePrincipal

@Deprecated
void deletePrincipal(NuxeoPrincipal principal)
                     throws ClientException
Deprecated. use deleteUser(DocumentModel)

Throws:
ClientException

searchByMap

@Deprecated
java.util.List<NuxeoPrincipal> searchByMap(java.util.Map<java.lang.String,java.io.Serializable> filter,
                                                      java.util.Set<java.lang.String> pattern)
                                           throws ClientException
Deprecated. use searchUsers(Map, Set)

Throws:
ClientException

getAvailableGroups

@Deprecated
java.util.List<NuxeoGroup> getAvailableGroups()
                                              throws ClientException
Deprecated. use getGroupIds() or #searchGroups(Map, Set)

Throws:
ClientException

createGroup

@Deprecated
void createGroup(NuxeoGroup group)
                 throws ClientException
Deprecated. use createGroup(DocumentModel)

Throws:
ClientException

deleteGroup

@Deprecated
void deleteGroup(NuxeoGroup group)
                 throws ClientException
Deprecated. use deleteGroup(DocumentModel)

Throws:
ClientException

updateGroup

@Deprecated
void updateGroup(NuxeoGroup group)
                 throws ClientException
Deprecated. use updateGroup(DocumentModel)

Throws:
ClientException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.