Class ComputedGroupsServiceImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.platform.computedgroups.ComputedGroupsServiceImpl
-
- All Implemented Interfaces:
ComputedGroupsService,Adaptable,Component,Extensible,TimestampedService
public class ComputedGroupsServiceImpl extends DefaultComponent implements ComputedGroupsService
ComputedGroupsServiceimplementation- Author:
- Thierry Delprat
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallowOverridestatic StringCHAIN_EPstatic StringCOMPUTER_EPprotected List<String>computerNamesprotected Map<String,GroupComputerDescriptor>computersprotected static Loglog-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description ComputedGroupsServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidactivate(ComponentContext context)Activates the component.booleanactivateComputedGroups()booleanallowGroupOverride()Defines if a computed group can override a physical group.List<String>computeGroupIds()Returns list of all computed groups (if this is available).List<String>computeGroupsForUser(NuxeoPrincipalImpl nuxeoPrincipal)Returns list of ids for users computed groups.voiddeactivate(ComponentContext context)Deactivates the component.NuxeoGroupgetComputedGroup(String groupName)Deprecated.NuxeoGroupgetComputedGroup(String groupName, GroupConfig groupConfig)Resolves a computed group by it's name.List<String>getComputedGroupMembers(String groupName)Retrieves member users for a given computed group.List<String>getComputedGroupParent(String groupName)Retrieves parent group for a given computed group.List<String>getComputedGroupSubGroups(String groupName)Retrieves sub groups for a given computed group.List<GroupComputerDescriptor>getComputerDescriptors()voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)List<String>searchComputedGroups(Map<String,Serializable> filter, Set<String> fulltext)Searches for a computed group.List<String>searchComputedGroups(QueryBuilder queryBuilder)Searches for computed groups.voidupdateGroupsForUser(NuxeoPrincipalImpl nuxeoPrincipal)Update the virtual groups of the user with the computed groups.-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted, getApplicationStartedOrder
-
-
-
-
Field Detail
-
COMPUTER_EP
public static final String COMPUTER_EP
- See Also:
- Constant Field Values
-
CHAIN_EP
public static final String CHAIN_EP
- See Also:
- Constant Field Values
-
computers
protected Map<String,GroupComputerDescriptor> computers
-
allowOverride
protected boolean allowOverride
-
log
protected static Log log
-
-
Method Detail
-
activate
public void activate(ComponentContext context)
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContributionin classDefaultComponent
-
computeGroupsForUser
public List<String> computeGroupsForUser(NuxeoPrincipalImpl nuxeoPrincipal)
Description copied from interface:ComputedGroupsServiceReturns list of ids for users computed groups.- Specified by:
computeGroupsForUserin interfaceComputedGroupsService
-
updateGroupsForUser
public void updateGroupsForUser(NuxeoPrincipalImpl nuxeoPrincipal)
Description copied from interface:ComputedGroupsServiceUpdate the virtual groups of the user with the computed groups.- Specified by:
updateGroupsForUserin interfaceComputedGroupsService
-
allowGroupOverride
public boolean allowGroupOverride()
Description copied from interface:ComputedGroupsServiceDefines if a computed group can override a physical group.- Specified by:
allowGroupOverridein interfaceComputedGroupsService
-
getComputedGroup
@Deprecated public NuxeoGroup getComputedGroup(String groupName)
Deprecated.Description copied from interface:ComputedGroupsServiceResolves a computed group by it's name.- Specified by:
getComputedGroupin interfaceComputedGroupsService
-
getComputedGroup
public NuxeoGroup getComputedGroup(String groupName, GroupConfig groupConfig)
Description copied from interface:ComputedGroupsServiceResolves a computed group by it's name.- Specified by:
getComputedGroupin interfaceComputedGroupsService
-
computeGroupIds
public List<String> computeGroupIds()
Description copied from interface:ComputedGroupsServiceReturns list of all computed groups (if this is available).- Specified by:
computeGroupIdsin interfaceComputedGroupsService
-
getComputedGroupMembers
public List<String> getComputedGroupMembers(String groupName)
Description copied from interface:ComputedGroupsServiceRetrieves member users for a given computed group.- Specified by:
getComputedGroupMembersin interfaceComputedGroupsService
-
getComputedGroupParent
public List<String> getComputedGroupParent(String groupName)
Description copied from interface:ComputedGroupsServiceRetrieves parent group for a given computed group.- Specified by:
getComputedGroupParentin interfaceComputedGroupsService
-
getComputedGroupSubGroups
public List<String> getComputedGroupSubGroups(String groupName)
Description copied from interface:ComputedGroupsServiceRetrieves sub groups for a given computed group.- Specified by:
getComputedGroupSubGroupsin interfaceComputedGroupsService
-
getComputerDescriptors
public List<GroupComputerDescriptor> getComputerDescriptors()
-
activateComputedGroups
public boolean activateComputedGroups()
- Specified by:
activateComputedGroupsin interfaceComputedGroupsService
-
searchComputedGroups
public List<String> searchComputedGroups(Map<String,Serializable> filter, Set<String> fulltext)
Description copied from interface:ComputedGroupsServiceSearches for a computed group.- Specified by:
searchComputedGroupsin interfaceComputedGroupsService
-
searchComputedGroups
public List<String> searchComputedGroups(QueryBuilder queryBuilder)
Description copied from interface:ComputedGroupsServiceSearches for computed groups.- Specified by:
searchComputedGroupsin interfaceComputedGroupsService- Parameters:
queryBuilder- the query- Returns:
- the list of computed group ids
-
deactivate
public void deactivate(ComponentContext context)
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
-