public interface UserManager extends Authenticator, EventListener, Serializable
Modifier and Type | Interface and Description |
---|---|
static class |
UserManager.MatchType |
Modifier and Type | Method and Description |
---|---|
Boolean |
areGroupsReadOnly()
Returns true is users referential is read only (ie : LDAP) -> can not add
users -> can not delete users.
|
Boolean |
areUsersReadOnly()
Returns true is groups referential is read only (ie : LDAP) -> can not
add groups -> can not delete groups.
|
boolean |
checkUsernamePassword(String username,
String password)
Check the password for the given username.
|
DocumentModel |
createGroup(DocumentModel groupModel)
Creates a group from given model
|
void |
createGroup(NuxeoGroup group)
Deprecated.
|
void |
createPrincipal(NuxeoPrincipal principal)
Deprecated.
|
DocumentModel |
createUser(DocumentModel userModel)
Creates user from given model.
|
void |
deleteGroup(DocumentModel groupModel)
Deletes group represented by given model.
|
void |
deleteGroup(NuxeoGroup group)
Deprecated.
|
void |
deleteGroup(String groupId)
Deletes group with given id.
|
void |
deletePrincipal(NuxeoPrincipal principal)
Deprecated.
|
void |
deleteUser(DocumentModel userModel)
Deletes user represented by given model.
|
void |
deleteUser(String userId)
Deletes user with given id.
|
List<String> |
getAdministratorsGroups()
Returns the list of administrators groups.
|
String |
getAnonymousUserId()
Gets the anonymous user id.
|
List<NuxeoGroup> |
getAvailableGroups()
Deprecated.
|
List<NuxeoPrincipal> |
getAvailablePrincipals()
Deprecated.
use
getUserIds() or #searchUsers(null) |
DocumentModel |
getBareGroupModel()
Returns a bare group model.
|
DocumentModel |
getBareUserModel()
Returns a bare user model.
|
String |
getDefaultGroup() |
String |
getDigestAuthDirectory()
Gets the Digest Auth directory.
|
String |
getDigestAuthRealm()
Gets the Digest Auth realm.
|
NuxeoGroup |
getGroup(String groupName)
Returns the nuxeo group with given name or null if it does not exist.
|
String |
getGroupDirectoryName()
Gets the group directory name.
|
String |
getGroupIdField()
Returns the group directory id field.
|
List<String> |
getGroupIds()
Returns the list of all groups ids.
|
String |
getGroupLabelField()
Returns the group label field.
|
String |
getGroupListingMode() |
String |
getGroupMembersField()
Gets the group members field.
|
DocumentModel |
getGroupModel(String groupName)
Return the group document model with this id or null if group does not
exist.
|
String |
getGroupParentGroupsField()
Gets the group parent-groups field.
|
String |
getGroupSchemaName()
Returns the group directory schema name.
|
Set<String> |
getGroupSearchFields()
Gets the group search fields.
|
List<String> |
getGroupsInGroup(String parentId)
Returns the list of groups that belong to this group.
|
String |
getGroupSubGroupsField()
Gets the group sub-groups field.
|
DocumentModel |
getModelForUser(String name)
Deprecated.
|
NuxeoPrincipal |
getPrincipal(String username)
Retrieves the principal with the given username or null if it does not
exist.
|
List<String> |
getTopLevelGroups()
Returns the list of groups that are not members of other groups.
|
String |
getUserDirectoryName()
Gets the user directory name.
|
String |
getUserEmailField()
Gets the user email field.
|
String |
getUserIdField()
Returns the user directory id field.
|
List<String> |
getUserIds()
Returns the list of all user ids.
|
String |
getUserListingMode() |
DocumentModel |
getUserModel(String userName)
Returns the document model representing user with given id or null if it
does not exist.
|
Pattern |
getUserPasswordPattern() |
String |
getUserSchemaName()
Returns the user directory schema name.
|
Set<String> |
getUserSearchFields()
Gets the user search fields, the fields to use when a principal search is
done.
|
String[] |
getUsersForPermission(String perm,
ACP acp)
For an ACP, get the list of user that has a permission.
|
List<String> |
getUsersInGroup(String groupId)
Returns the list of users that belong to this group.
|
List<String> |
getUsersInGroupAndSubGroups(String groupId)
Get users from a group and its subgroups.
|
String |
getUserSortField() |
List<NuxeoPrincipal> |
searchByMap(Map<String,Serializable> filter,
Set<String> pattern)
Deprecated.
|
DocumentModelList |
searchGroups(Map<String,Serializable> filter,
Set<String> fulltext)
Returns groups matching given criteria.
|
DocumentModelList |
searchGroups(String pattern)
Search matching groups through their defined search fields
|
List<NuxeoPrincipal> |
searchPrincipals(String pattern)
Deprecated.
|
DocumentModelList |
searchUsers(Map<String,Serializable> filter,
Set<String> fulltext)
Returns users matching given criteria.
|
DocumentModelList |
searchUsers(String pattern)
Returns users matching given pattern
|
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.
|
void |
updatePrincipal(NuxeoPrincipal principal)
Deprecated.
|
void |
updateUser(DocumentModel userModel)
Updates user represented by given model.
|
boolean |
validatePassword(String password) |
authenticate
aboutToHandleEvent, handleEvent
boolean checkUsernamePassword(String username, String password) throws ClientException
Authenticator
checkUsernamePassword
in interface Authenticator
username
- the usernamepassword
- the password to checkClientException
boolean validatePassword(String password) throws ClientException
ClientException
NuxeoPrincipal getPrincipal(String username) throws ClientException
Can build principals for anonymous and virtual users as well as for users defined in the users directory.
ClientException
NuxeoGroup getGroup(String groupName) throws ClientException
ClientException
@Deprecated List<NuxeoPrincipal> searchPrincipals(String pattern) throws ClientException
searchUsers(String)
ClientException
DocumentModelList searchGroups(String pattern) throws ClientException
ClientException
List<String> getUserIds() throws ClientException
ClientException
DocumentModel createUser(DocumentModel userModel) throws ClientException, UserAlreadyExistsException
ClientException
UserAlreadyExistsException
void updateUser(DocumentModel userModel) throws ClientException
userModel
- ClientException
void deleteUser(DocumentModel userModel) throws ClientException
DirectoryException
- if given entry does not existClientException
void deleteUser(String userId) throws ClientException
DirectoryException
- if given entry does not existClientException
DocumentModel getBareUserModel() throws ClientException
Can be used for user creation/search screens.
ClientException
DocumentModel getUserModel(String userName) throws ClientException
ClientException
DocumentModelList searchUsers(String pattern) throws ClientException
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).
ClientException
DocumentModelList searchUsers(Map<String,Serializable> filter, Set<String> fulltext) throws ClientException
filter
- filter with field names as keysfulltext
- field names used for fulltext matchClientException
String getUserListingMode() throws ClientException
ClientException
String getUserSortField() throws ClientException
ClientException
Pattern getUserPasswordPattern() throws ClientException
ClientException
List<String> getGroupIds() throws ClientException
ClientException
DocumentModelList searchGroups(Map<String,Serializable> filter, Set<String> fulltext) throws ClientException
filter
- filter with field names as keysfulltext
- field names used for fulltext matchClientException
DocumentModel createGroup(DocumentModel groupModel) throws ClientException, GroupAlreadyExistsException
ClientException
GroupAlreadyExistsException
void updateGroup(DocumentModel groupModel) throws ClientException
DirectoryException
- if given entry does not existClientException
void deleteGroup(DocumentModel groupModel) throws ClientException
groupModel
- DirectoryException
- if given entry does not existClientException
void deleteGroup(String groupId) throws ClientException
groupId
- DirectoryException
- if given entry does not existClientException
DocumentModel getBareGroupModel() throws ClientException
Can be used for group creation/search screens.
ClientException
DocumentModel getGroupModel(String groupName) throws ClientException
groupName
- the group identifierClientException
String getDefaultGroup()
String getGroupListingMode() throws ClientException
ClientException
List<String> getGroupsInGroup(String parentId) throws ClientException
parentId
- the name of the parent group.ClientException
List<String> getTopLevelGroups() throws ClientException
ClientException
List<String> getUsersInGroup(String groupId) throws ClientException
groupId
- ID of the groupClientException
List<String> getUsersInGroupAndSubGroups(String groupId) throws ClientException
groupId
- ID of the groupClientException
Boolean areGroupsReadOnly() throws ClientException
ClientException
Boolean areUsersReadOnly() throws ClientException
ClientException
String getUserDirectoryName() throws ClientException
ClientException
String getUserSchemaName() throws ClientException
ClientException
String getUserIdField() throws ClientException
ClientException
String getUserEmailField() throws ClientException
ClientException
Set<String> getUserSearchFields() throws ClientException
ClientException
Set<String> getGroupSearchFields() throws ClientException
ClientException
String getGroupDirectoryName() throws ClientException
ClientException
String getGroupSchemaName() throws ClientException
ClientException
String getGroupIdField() throws ClientException
ClientException
String getGroupLabelField() throws ClientException
ClientException
String getGroupMembersField() throws ClientException
ClientException
String getGroupSubGroupsField() throws ClientException
ClientException
String getGroupParentGroupsField() throws ClientException
ClientException
String getAnonymousUserId() throws ClientException
ClientException
String getDigestAuthDirectory() throws ClientException
ClientException
String getDigestAuthRealm() throws ClientException
ClientException
void setConfiguration(UserManagerDescriptor descriptor) throws ClientException
descriptor
- the descriptor as parsed from xml, merged from the
previous one if it exists.ClientException
List<String> getAdministratorsGroups()
@Deprecated DocumentModel getModelForUser(String name) throws ClientException
getUserModel(String)
ClientException
@Deprecated List<NuxeoPrincipal> getAvailablePrincipals() throws ClientException
ClientException
@Deprecated void createPrincipal(NuxeoPrincipal principal) throws ClientException
createUser(DocumentModel)
ClientException
@Deprecated void updatePrincipal(NuxeoPrincipal principal) throws ClientException
updateUser(DocumentModel)
ClientException
@Deprecated void deletePrincipal(NuxeoPrincipal principal) throws ClientException
deleteUser(DocumentModel)
ClientException
@Deprecated List<NuxeoPrincipal> searchByMap(Map<String,Serializable> filter, Set<String> pattern) throws ClientException
searchUsers(Map, Set)
ClientException
@Deprecated List<NuxeoGroup> getAvailableGroups() throws ClientException
ClientException
@Deprecated void createGroup(NuxeoGroup group) throws ClientException
createGroup(DocumentModel)
ClientException
@Deprecated void deleteGroup(NuxeoGroup group) throws ClientException
deleteGroup(DocumentModel)
ClientException
@Deprecated void updateGroup(NuxeoGroup group) throws ClientException
updateGroup(DocumentModel)
ClientException
String[] getUsersForPermission(String perm, ACP acp)
perm
- the permissionacp
- The access control policy of the documentCopyright © 2014 Nuxeo SA. All rights reserved.