Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.computedgroups
Class AbstractAttributeBasedGroupComputer

java.lang.Object
  extended by org.nuxeo.ecm.platform.computedgroups.AbstractGroupComputer
      extended by org.nuxeo.ecm.platform.computedgroups.AbstractAttributeBasedGroupComputer
All Implemented Interfaces:
GroupComputer
Direct Known Subclasses:
CompanyGroupComputer

public abstract class AbstractAttributeBasedGroupComputer
extends AbstractGroupComputer

Base class for GroupComputer implementation that uses User attribute to compute groups.

Author:
Thierry Delprat

Constructor Summary
AbstractAttributeBasedGroupComputer()
           
 
Method Summary
 List<String> getAllGroupIds()
          Return all group ids.
 List<String> getGroupMembers(String groupName)
          Returns the members for a give group.
 List<String> getGroupsForUser(NuxeoPrincipalImpl nuxeoPrincipal)
          Returns the group names for a give User.
 List<String> getParentsGroupNames(String groupName)
          Return parent groups.
 List<String> getSubGroupsNames(String groupName)
          Returns children groups.
 List<String> searchGroups(Map<String,Serializable> filter, Set<String> fulltext)
          Default implementation that searches on all ids for a match.
 
Methods inherited from class org.nuxeo.ecm.platform.computedgroups.AbstractGroupComputer
hasGroup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAttributeBasedGroupComputer

public AbstractAttributeBasedGroupComputer()
Method Detail

getAllGroupIds

public List<String> getAllGroupIds()
                            throws Exception
Description copied from interface: GroupComputer
Return all group ids. If you class can not efficiently compute this list, you can return an empty list. In this case you need to implement the searchGroups method.

Throws:
Exception

getGroupMembers

public List<String> getGroupMembers(String groupName)
                             throws Exception
Description copied from interface: GroupComputer
Returns the members for a give group.

Throws:
Exception

getGroupsForUser

public List<String> getGroupsForUser(NuxeoPrincipalImpl nuxeoPrincipal)
                              throws Exception
Description copied from interface: GroupComputer
Returns the group names for a give User.

Throws:
Exception

getParentsGroupNames

public List<String> getParentsGroupNames(String groupName)
                                  throws Exception
Description copied from interface: GroupComputer
Return parent groups.

Throws:
Exception

getSubGroupsNames

public List<String> getSubGroupsNames(String groupName)
                               throws Exception
Description copied from interface: GroupComputer
Returns children groups.

Throws:
Exception

searchGroups

public List<String> searchGroups(Map<String,Serializable> filter,
                                 Set<String> fulltext)
                          throws Exception
Description copied from class: AbstractGroupComputer
Default implementation that searches on all ids for a match.

Specified by:
searchGroups in interface GroupComputer
Overrides:
searchGroups in class AbstractGroupComputer
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.