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)
Can build principals for anonymous and virtual users as well as for users defined in the users directory.
DocumentModelList searchGroups(String pattern, DocumentModel context)
List<String> getUserIds(DocumentModel context)
DocumentModel createUser(DocumentModel userModel, DocumentModel context) throws UserAlreadyExistsException
UserAlreadyExistsException
void updateUser(DocumentModel userModel, DocumentModel context)
userModel
- void deleteUser(DocumentModel userModel, DocumentModel context)
DirectoryException
- if given entry does not existvoid deleteUser(String userId, DocumentModel context)
DirectoryException
- if given entry does not existDocumentModel getUserModel(String userName, DocumentModel context)
DocumentModelList searchUsers(String pattern, DocumentModel context)
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).
DocumentModelList searchUsers(Map<String,Serializable> filter, Set<String> fulltext, DocumentModel context)
filter
- filter with field names as keysfulltext
- field names used for fulltext matchcontext
- List<String> getGroupIds(DocumentModel context)
DocumentModelList searchGroups(Map<String,Serializable> filter, Set<String> fulltext, DocumentModel context)
filter
- filter with field names as keysfulltext
- field names used for fulltext matchcontext
- DocumentModel createGroup(DocumentModel groupModel, DocumentModel context) throws GroupAlreadyExistsException
GroupAlreadyExistsException
void updateGroup(DocumentModel groupModel, DocumentModel context)
DirectoryException
- if given entry does not existvoid deleteGroup(DocumentModel groupModel, DocumentModel context)
groupModel
- DirectoryException
- if given entry does not existvoid deleteGroup(String groupId, DocumentModel context)
groupId
- DirectoryException
- if given entry does not existDocumentModel getGroupModel(String groupName, DocumentModel context)
groupName
- the group identifierList<String> getGroupsInGroup(String parentId, DocumentModel context)
parentId
- the name of the parent group.List<String> getTopLevelGroups(DocumentModel context)
List<String> getUsersInGroup(String groupId, DocumentModel context)
groupId
- ID of the groupList<String> getUsersInGroupAndSubGroups(String groupId, DocumentModel context)
groupId
- ID of the groupBoolean areGroupsReadOnly()
Boolean areUsersReadOnly()
String[] getUsersForPermission(String perm, ACP acp, DocumentModel context)
perm
- the permissionacp
- The access control policy of the documentCopyright © 2015 Nuxeo SA. All rights reserved.