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
ComputedGroupsService
implementation- Author:
- Thierry Delprat
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowOverride
static String
CHAIN_EP
static String
COMPUTER_EP
protected List<String>
computerNames
protected Map<String,GroupComputerDescriptor>
computers
protected static Log
log
-
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 void
activate(ComponentContext context)
Activates the component.boolean
activateComputedGroups()
boolean
allowGroupOverride()
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.void
deactivate(ComponentContext context)
Deactivates the component.NuxeoGroup
getComputedGroup(String groupName)
Deprecated.NuxeoGroup
getComputedGroup(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()
void
registerContribution(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.void
updateGroupsForUser(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
-
computerNames
protected List<String> computerNames
-
allowOverride
protected boolean allowOverride
-
-
Constructor Detail
-
ComputedGroupsServiceImpl
public ComputedGroupsServiceImpl()
-
-
Method Detail
-
activate
public void activate(ComponentContext context)
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContribution
in classDefaultComponent
-
computeGroupsForUser
public List<String> computeGroupsForUser(NuxeoPrincipalImpl nuxeoPrincipal)
Description copied from interface:ComputedGroupsService
Returns list of ids for users computed groups.- Specified by:
computeGroupsForUser
in interfaceComputedGroupsService
-
updateGroupsForUser
public void updateGroupsForUser(NuxeoPrincipalImpl nuxeoPrincipal)
Description copied from interface:ComputedGroupsService
Update the virtual groups of the user with the computed groups.- Specified by:
updateGroupsForUser
in interfaceComputedGroupsService
-
allowGroupOverride
public boolean allowGroupOverride()
Description copied from interface:ComputedGroupsService
Defines if a computed group can override a physical group.- Specified by:
allowGroupOverride
in interfaceComputedGroupsService
-
getComputedGroup
@Deprecated public NuxeoGroup getComputedGroup(String groupName)
Deprecated.Description copied from interface:ComputedGroupsService
Resolves a computed group by it's name.- Specified by:
getComputedGroup
in interfaceComputedGroupsService
-
getComputedGroup
public NuxeoGroup getComputedGroup(String groupName, GroupConfig groupConfig)
Description copied from interface:ComputedGroupsService
Resolves a computed group by it's name.- Specified by:
getComputedGroup
in interfaceComputedGroupsService
-
computeGroupIds
public List<String> computeGroupIds()
Description copied from interface:ComputedGroupsService
Returns list of all computed groups (if this is available).- Specified by:
computeGroupIds
in interfaceComputedGroupsService
-
getComputedGroupMembers
public List<String> getComputedGroupMembers(String groupName)
Description copied from interface:ComputedGroupsService
Retrieves member users for a given computed group.- Specified by:
getComputedGroupMembers
in interfaceComputedGroupsService
-
getComputedGroupParent
public List<String> getComputedGroupParent(String groupName)
Description copied from interface:ComputedGroupsService
Retrieves parent group for a given computed group.- Specified by:
getComputedGroupParent
in interfaceComputedGroupsService
-
getComputedGroupSubGroups
public List<String> getComputedGroupSubGroups(String groupName)
Description copied from interface:ComputedGroupsService
Retrieves sub groups for a given computed group.- Specified by:
getComputedGroupSubGroups
in interfaceComputedGroupsService
-
getComputerDescriptors
public List<GroupComputerDescriptor> getComputerDescriptors()
-
activateComputedGroups
public boolean activateComputedGroups()
- Specified by:
activateComputedGroups
in interfaceComputedGroupsService
-
searchComputedGroups
public List<String> searchComputedGroups(Map<String,Serializable> filter, Set<String> fulltext)
Description copied from interface:ComputedGroupsService
Searches for a computed group.- Specified by:
searchComputedGroups
in interfaceComputedGroupsService
-
searchComputedGroups
public List<String> searchComputedGroups(QueryBuilder queryBuilder)
Description copied from interface:ComputedGroupsService
Searches for computed groups.- Specified by:
searchComputedGroups
in interfaceComputedGroupsService
- Parameters:
queryBuilder
- the query- Returns:
- the list of computed group ids
-
deactivate
public void deactivate(ComponentContext context)
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
-