Class UserManagerWithComputedGroups
- java.lang.Object
-
- org.nuxeo.ecm.platform.usermanager.UserManagerImpl
-
- org.nuxeo.ecm.platform.computedgroups.UserManagerWithComputedGroups
-
- All Implemented Interfaces:
Serializable
,AdministratorGroupsProvider
,MultiTenantUserManager
,UserManager
,Authenticator
,EventListener
- Direct Known Subclasses:
MultiTenantUserManager
public class UserManagerWithComputedGroups extends UserManagerImpl
UserManager
implementation that is aware ofComputedGroup
.- Author:
- Thierry Delprat
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.platform.usermanager.UserManager
UserManager.MatchType
-
-
Field Summary
Fields Modifier and Type Field Description protected static Boolean
useComputedGroup
static String
VIRTUAL_GROUP_MARKER
-
Fields inherited from class org.nuxeo.ecm.platform.usermanager.UserManagerImpl
administratorGroups, administratorIds, ANCESTOR_GROUPS_PROPERTY_KEY, anonymousUser, cacheService, DEFAULT_ANONYMOUS_USER_ID, defaultGroup, digestAuthDirectory, digestAuthRealm, dirService, disableDefaultAdministratorsGroup, GROUPCHANGED_EVENT_ID, groupConfig, GROUPCREATED_EVENT_ID, GROUPDELETED_EVENT_ID, groupDirectoryName, groupIdField, groupLabelField, groupListingMode, groupMembersField, GROUPMODIFIED_EVENT_ID, groupParentGroupsField, groupSchemaName, groupSearchFields, groupSortField, groupSubGroupsField, ID_PROPERTY_KEY, INVALIDATE_ALL_PRINCIPALS_EVENT_ID, INVALIDATE_PRINCIPAL_EVENT_ID, multiTenantManagement, principalCache, SEARCH_ESCAPE_COMPAT_PARAM, USER_GROUP_CATEGORY, USER_HAS_PARTIAL_CONTENT, USERCHANGED_EVENT_ID, userConfig, USERCREATED_EVENT_ID, USERDELETED_EVENT_ID, userDirectoryName, userEmailField, userIdField, userListingMode, USERMANAGER_TOPIC, USERMODIFIED_EVENT_ID, userPasswordPattern, userSchemaName, userSearchFields, userSortField, VIRTUAL_FIELD_FILTER_PREFIX, virtualUsers
-
-
Constructor Summary
Constructors Constructor Description UserManagerWithComputedGroups()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
activateComputedGroup()
DocumentModel
createGroup(DocumentModel groupModel, DocumentModel context)
Creates a group from given model with the given context.void
deleteGroup(String groupId, DocumentModel context)
Deletes group with given id with the given context.protected DocumentModel
getComputedGroupAsDocumentModel(String grpName)
NuxeoGroup
getGroup(String groupName)
Returns the nuxeo group with given name or null if it does not exist.NuxeoGroup
getGroup(String groupName, DocumentModel context)
List<String>
getGroupIds()
Returns the list of all groups ids.DocumentModel
getGroupModel(String groupName)
Return the group document model with this id or null if group does not exist.protected ComputedGroupsService
getService()
protected NuxeoPrincipal
makePrincipal(DocumentModel userEntry, boolean anonymous, List<String> groups)
DocumentModelList
searchGroups(Map<String,Serializable> filter, Set<String> fulltext)
Returns groups matching given criteria.DocumentModelList
searchGroups(Map<String,Serializable> filter, Set<String> fulltext, DocumentModel context)
Returns groups matching given criteria with the given context.DocumentModelList
searchGroups(QueryBuilder queryBuilder)
Returns groups matching the given query.DocumentModelList
searchGroups(QueryBuilder queryBuilder, DocumentModel context)
Returns groups matching the given query, within the given context.void
updateGroup(DocumentModel groupModel, DocumentModel context)
Updates group represented by given model with the given context.-
Methods inherited from class org.nuxeo.ecm.platform.usermanager.UserManagerImpl
appendSubgroups, areGroupsReadOnly, areUsersReadOnly, authenticate, checkGrouId, checkGroupsExistence, checkPasswordValidity, checkUserId, checkUsernamePassword, cloneMap, cloneSet, createGroup, createUser, createUser, deleteGroup, deleteGroup, deleteGroup, deleteUser, deleteUser, deleteUser, deleteUser, encodeDigestAuthPassword, getAdministratorsGroups, getAncestorGroups, getAnonymousUserId, getBareGroupModel, getBareUserModel, getDefaultGroup, getDescendantGroups, getDigestAuthDirectory, getDigestAuthModel, getDigestAuthRealm, getDirectorySortMap, getGroupConfig, getGroupDirectoryName, getGroupId, getGroupIdField, getGroupIds, getGroupLabelField, getGroupListingMode, getGroupMembersField, getGroupModel, getGroupOrderBy, getGroupParentGroupsField, getGroupSchemaName, getGroupSearchFields, getGroupsInGroup, getGroupsInGroup, getGroupSortMap, getGroupSubGroupsField, getLeafPermissions, getPrincipal, getPrincipal, getPrincipal, getPrincipalUsingCache, getQueryForPattern, getTopLevelGroups, getTopLevelGroups, getUserDirectoryName, getUserEmailField, getUserId, getUserIdField, getUserIds, getUserIds, getUserListingMode, getUserModel, getUserModel, getUserModel, getUserOrderBy, getUserPasswordPattern, getUserSchemaName, getUserSearchFields, getUsersForPermission, getUsersForPermission, getUsersInGroup, getUsersInGroup, getUsersInGroupAndSubGroups, getUsersInGroupAndSubGroups, getUserSortField, getUserSortMap, handleEvent, invalidateAllPrincipals, invalidatePrincipal, isAnonymousMatching, isAnonymousMatching, makeAnonymousPrincipal, makeGroup, makePrincipal, makePrincipal, makeTransientPrincipal, makeVirtualPrincipal, makeVirtualUserEntry, notifyCore, notifyCore, notifyGroupChanged, notifyRuntime, notifyUserChanged, populateAncestorGroups, populateDescendantGroups, queryWithVirtualEntries, removeVirtualFilters, searchGroups, searchGroups, searchPrincipals, searchUsers, searchUsers, searchUsers, searchUsers, searchUsers, searchUsers, searchUsers, setConfiguration, setGroupDirectoryName, setUserDirectoryName, setVirtualUsers, syncDigestAuthPassword, updateGroup, updateUser, updateUser, useCache, useSearchEscapeCompat, validatePassword
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.platform.usermanager.UserManager
getPrincipal, notifyGroupChanged
-
-
-
-
Field Detail
-
useComputedGroup
protected static Boolean useComputedGroup
-
VIRTUAL_GROUP_MARKER
public static final String VIRTUAL_GROUP_MARKER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getService
protected ComputedGroupsService getService()
-
activateComputedGroup
protected boolean activateComputedGroup()
-
makePrincipal
protected NuxeoPrincipal makePrincipal(DocumentModel userEntry, boolean anonymous, List<String> groups)
- Overrides:
makePrincipal
in classUserManagerImpl
-
getGroup
public NuxeoGroup getGroup(String groupName)
Description copied from interface:UserManager
Returns the nuxeo group with given name or null if it does not exist.- Specified by:
getGroup
in interfaceUserManager
- Overrides:
getGroup
in classUserManagerImpl
-
getGroup
public NuxeoGroup getGroup(String groupName, DocumentModel context)
- Overrides:
getGroup
in classUserManagerImpl
-
getGroupIds
public List<String> getGroupIds()
Description copied from interface:UserManager
Returns the list of all groups ids.- Specified by:
getGroupIds
in interfaceUserManager
- Overrides:
getGroupIds
in classUserManagerImpl
-
getGroupModel
public DocumentModel getGroupModel(String groupName)
Description copied from interface:UserManager
Return the group document model with this id or null if group does not exist.- Specified by:
getGroupModel
in interfaceUserManager
- Overrides:
getGroupModel
in classUserManagerImpl
- Parameters:
groupName
- the group identifier
-
searchGroups
public DocumentModelList searchGroups(Map<String,Serializable> filter, Set<String> fulltext)
Description copied from interface:UserManager
Returns groups matching given criteria.- Specified by:
searchGroups
in interfaceUserManager
- Overrides:
searchGroups
in classUserManagerImpl
- Parameters:
filter
- filter with field names as keysfulltext
- field names used for fulltext match
-
searchGroups
public DocumentModelList searchGroups(Map<String,Serializable> filter, Set<String> fulltext, DocumentModel context)
Description copied from interface:MultiTenantUserManager
Returns groups matching given criteria with the given context. if the Document Context have a directory local configuration, the service try to open the user directory with directory suffix set into the local configuration- Specified by:
searchGroups
in interfaceMultiTenantUserManager
- Overrides:
searchGroups
in classUserManagerImpl
- Parameters:
filter
- filter with field names as keysfulltext
- field names used for fulltext match
-
searchGroups
public DocumentModelList searchGroups(QueryBuilder queryBuilder)
Description copied from interface:UserManager
Returns groups matching the given query.- Specified by:
searchGroups
in interfaceUserManager
- Overrides:
searchGroups
in classUserManagerImpl
- Parameters:
queryBuilder
- the query to use, including limit, offset, ordering and countTotal
-
searchGroups
public DocumentModelList searchGroups(QueryBuilder queryBuilder, DocumentModel context)
Description copied from interface:MultiTenantUserManager
Returns groups matching the given query, within the given context.- Specified by:
searchGroups
in interfaceMultiTenantUserManager
- Overrides:
searchGroups
in classUserManagerImpl
- Parameters:
queryBuilder
- the query to use, including limit, offset, ordering and countTotalcontext
- the context for the tenant, ornull
-
getComputedGroupAsDocumentModel
protected DocumentModel getComputedGroupAsDocumentModel(String grpName)
-
createGroup
public DocumentModel createGroup(DocumentModel groupModel, DocumentModel context)
Description copied from interface:MultiTenantUserManager
Creates a group from given model with the given context. If the Document Context have a directory local configuration, the service will append at the end of the groupname the directory suffix set into the local configuration of the context document.- Specified by:
createGroup
in interfaceMultiTenantUserManager
- Overrides:
createGroup
in classUserManagerImpl
- Returns:
- the created group model
-
updateGroup
public void updateGroup(DocumentModel groupModel, DocumentModel context)
Description copied from interface:MultiTenantUserManager
Updates group represented by given model with the given context. If the Document Context have a directory local configuration, the service will append at the end of the groupname the directory suffix set into the local configuration of the context document.- Specified by:
updateGroup
in interfaceMultiTenantUserManager
- Overrides:
updateGroup
in classUserManagerImpl
-
deleteGroup
public void deleteGroup(String groupId, DocumentModel context)
Description copied from interface:MultiTenantUserManager
Deletes group with given id with the given context. If the Document Context have a directory local configuration, the service will append at the end of the groupname the directory suffix set into the local configuration of the context document.- Specified by:
deleteGroup
in interfaceMultiTenantUserManager
- Overrides:
deleteGroup
in classUserManagerImpl
-
-