public interface MultiTenantUserManager extends Serializable
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.
|
DocumentModel |
createGroup(DocumentModel groupModel,
DocumentModel context)
Creates a group from given model with the given context.
|
DocumentModel |
createUser(DocumentModel userModel,
DocumentModel context)
Creates user from given model into the given context document.
|
void |
deleteGroup(DocumentModel groupModel,
DocumentModel context)
Deletes group represented by given model with the given context.
|
void |
deleteGroup(String groupId,
DocumentModel context)
Deletes group with given id with the given context.
|
void |
deleteUser(DocumentModel userModel,
DocumentModel context)
Deletes user represented by given model into the given context document.
|
void |
deleteUser(String userId,
DocumentModel context)
Deletes user with given id into the given context document.
|
List<String> |
getGroupIds(DocumentModel context)
Returns the list of all groups ids with the given context.
|
DocumentModel |
getGroupModel(String groupName,
DocumentModel context)
Return the group document model with this id concatenated with the
directory local config (if not null) or null if group does not exist.
|
List<String> |
getGroupsInGroup(String parentId,
DocumentModel context)
Returns the list of groups that belong to this group with the given
context.
|
NuxeoPrincipal |
getPrincipal(String username,
DocumentModel context)
Retrieves the principal with the given username or null if it does not
exist into the given context document.
|
List<String> |
getTopLevelGroups(DocumentModel context)
Returns the list of groups that are not members of other groups with the
given context.
|
List<String> |
getUserIds(DocumentModel context)
Returns the list of all user ids into the given context document.
|
DocumentModel |
getUserModel(String userName,
DocumentModel context)
Returns the document model representing user with given id or null if it
does not exist into the given context document.
|
String[] |
getUsersForPermission(String perm,
ACP acp,
DocumentModel context)
For an ACP, get the list of user that has a permission into the given
context.
|
List<String> |
getUsersInGroup(String groupId,
DocumentModel context)
Returns the list of users that belong to this group into the given
context
|
List<String> |
getUsersInGroupAndSubGroups(String groupId,
DocumentModel context)
Get users from a group and its subgroups into the given context
|
DocumentModelList |
searchGroups(Map<String,Serializable> filter,
Set<String> fulltext,
DocumentModel context)
Returns groups matching given criteria with the given context.
|
DocumentModelList |
searchGroups(String pattern,
DocumentModel context)
Search matching groups through their defined search fields into the given
context document.
|
DocumentModelList |
searchUsers(Map<String,Serializable> filter,
Set<String> fulltext,
DocumentModel context)
Returns users matching given criteria and with the given context.
|
DocumentModelList |
searchUsers(String pattern,
DocumentModel context)
Returns users matching given pattern with the given context.
|
void |
updateGroup(DocumentModel groupModel,
DocumentModel context)
Updates group represented by given model with the given context.
|
void |
updateUser(DocumentModel userModel,
DocumentModel context)
Updates user represented by given model into the given context document.
|
NuxeoPrincipal getPrincipal(String username, DocumentModel context) throws ClientException
Can build principals for anonymous and virtual users as well as for users defined in the users directory.
ClientException
DocumentModelList searchGroups(String pattern, DocumentModel context) throws ClientException
ClientException
List<String> getUserIds(DocumentModel context) throws ClientException
ClientException
DocumentModel createUser(DocumentModel userModel, DocumentModel context) throws ClientException, UserAlreadyExistsException
ClientException
UserAlreadyExistsException
void updateUser(DocumentModel userModel, DocumentModel context) throws ClientException
userModel
- ClientException
void deleteUser(DocumentModel userModel, DocumentModel context) throws ClientException
DirectoryException
- if given entry does not existClientException
void deleteUser(String userId, DocumentModel context) throws ClientException
DirectoryException
- if given entry does not existClientException
DocumentModel getUserModel(String userName, DocumentModel context) throws ClientException
ClientException
DocumentModelList searchUsers(String pattern, DocumentModel context) 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, DocumentModel context) throws ClientException
filter
- filter with field names as keysfulltext
- field names used for fulltext matchcontext
- ClientException
List<String> getGroupIds(DocumentModel context) throws ClientException
ClientException
DocumentModelList searchGroups(Map<String,Serializable> filter, Set<String> fulltext, DocumentModel context) throws ClientException
filter
- filter with field names as keysfulltext
- field names used for fulltext matchcontext
- ClientException
DocumentModel createGroup(DocumentModel groupModel, DocumentModel context) throws ClientException, GroupAlreadyExistsException
ClientException
GroupAlreadyExistsException
void updateGroup(DocumentModel groupModel, DocumentModel context) throws ClientException
DirectoryException
- if given entry does not existClientException
void deleteGroup(DocumentModel groupModel, DocumentModel context) throws ClientException
groupModel
- DirectoryException
- if given entry does not existClientException
void deleteGroup(String groupId, DocumentModel context) throws ClientException
groupId
- DirectoryException
- if given entry does not existClientException
DocumentModel getGroupModel(String groupName, DocumentModel context) throws ClientException
groupName
- the group identifierClientException
List<String> getGroupsInGroup(String parentId, DocumentModel context) throws ClientException
parentId
- the name of the parent group.ClientException
List<String> getTopLevelGroups(DocumentModel context) throws ClientException
ClientException
List<String> getUsersInGroup(String groupId, DocumentModel context) throws ClientException
groupId
- ID of the groupClientException
List<String> getUsersInGroupAndSubGroups(String groupId, DocumentModel context) throws ClientException
groupId
- ID of the groupClientException
Boolean areGroupsReadOnly() throws ClientException
ClientException
Boolean areUsersReadOnly() throws ClientException
ClientException
String[] getUsersForPermission(String perm, ACP acp, DocumentModel context)
perm
- the permissionacp
- The access control policy of the documentCopyright © 2013 Nuxeo SA. All Rights Reserved.