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
UserManagerimplementation 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 BooleanuseComputedGroupstatic StringVIRTUAL_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 booleanactivateComputedGroup()DocumentModelcreateGroup(DocumentModel groupModel, DocumentModel context)Creates a group from given model with the given context.voiddeleteGroup(String groupId, DocumentModel context)Deletes group with given id with the given context.protected DocumentModelgetComputedGroupAsDocumentModel(String grpName)NuxeoGroupgetGroup(String groupName)Returns the nuxeo group with given name or null if it does not exist.NuxeoGroupgetGroup(String groupName, DocumentModel context)List<String>getGroupIds()Returns the list of all groups ids.DocumentModelgetGroupModel(String groupName)Return the group document model with this id or null if group does not exist.protected ComputedGroupsServicegetService()protected NuxeoPrincipalmakePrincipal(DocumentModel userEntry, boolean anonymous, List<String> groups)DocumentModelListsearchGroups(Map<String,Serializable> filter, Set<String> fulltext)Returns groups matching given criteria.DocumentModelListsearchGroups(Map<String,Serializable> filter, Set<String> fulltext, DocumentModel context)Returns groups matching given criteria with the given context.DocumentModelListsearchGroups(QueryBuilder queryBuilder)Returns groups matching the given query.DocumentModelListsearchGroups(QueryBuilder queryBuilder, DocumentModel context)Returns groups matching the given query, within the given context.voidupdateGroup(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:
makePrincipalin classUserManagerImpl
-
getGroup
public NuxeoGroup getGroup(String groupName)
Description copied from interface:UserManagerReturns the nuxeo group with given name or null if it does not exist.- Specified by:
getGroupin interfaceUserManager- Overrides:
getGroupin classUserManagerImpl
-
getGroup
public NuxeoGroup getGroup(String groupName, DocumentModel context)
- Overrides:
getGroupin classUserManagerImpl
-
getGroupIds
public List<String> getGroupIds()
Description copied from interface:UserManagerReturns the list of all groups ids.- Specified by:
getGroupIdsin interfaceUserManager- Overrides:
getGroupIdsin classUserManagerImpl
-
getGroupModel
public DocumentModel getGroupModel(String groupName)
Description copied from interface:UserManagerReturn the group document model with this id or null if group does not exist.- Specified by:
getGroupModelin interfaceUserManager- Overrides:
getGroupModelin classUserManagerImpl- Parameters:
groupName- the group identifier
-
searchGroups
public DocumentModelList searchGroups(Map<String,Serializable> filter, Set<String> fulltext)
Description copied from interface:UserManagerReturns groups matching given criteria.- Specified by:
searchGroupsin interfaceUserManager- Overrides:
searchGroupsin 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:MultiTenantUserManagerReturns 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:
searchGroupsin interfaceMultiTenantUserManager- Overrides:
searchGroupsin 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:UserManagerReturns groups matching the given query.- Specified by:
searchGroupsin interfaceUserManager- Overrides:
searchGroupsin 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:MultiTenantUserManagerReturns groups matching the given query, within the given context.- Specified by:
searchGroupsin interfaceMultiTenantUserManager- Overrides:
searchGroupsin 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:MultiTenantUserManagerCreates 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:
createGroupin interfaceMultiTenantUserManager- Overrides:
createGroupin classUserManagerImpl- Returns:
- the created group model
-
updateGroup
public void updateGroup(DocumentModel groupModel, DocumentModel context)
Description copied from interface:MultiTenantUserManagerUpdates 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:
updateGroupin interfaceMultiTenantUserManager- Overrides:
updateGroupin classUserManagerImpl
-
deleteGroup
public void deleteGroup(String groupId, DocumentModel context)
Description copied from interface:MultiTenantUserManagerDeletes 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:
deleteGroupin interfaceMultiTenantUserManager- Overrides:
deleteGroupin classUserManagerImpl
-
-