org.jasig.portal.layout.dlm.providers
Class GroupMembershipEvaluator
java.lang.Object
org.jasig.portal.layout.dlm.providers.GroupMembershipEvaluator
- All Implemented Interfaces:
- Evaluator
public class GroupMembershipEvaluator
- extends java.lang.Object
- implements Evaluator
Answers isApplicable() in the affirmative if the user represented by the
passed in IPerson is a member of the group whose name is passed to the
constructor of this class.
There are two modes to this evaluator: 'memberOf' and 'deepMemberOf'.
In 'memberOf' mode, the isApplicable() method returns whether the IPerson
is a member of the group, but does not evaluate if they are the member of
any contained groups. In 'deepMemberOf' mode, the isApplicable returns
whether the IPerson is a member of the groups or any contained groups.
For example, supposed there is a group 'Famous People' with a contained
group of 'Actors', and 'Robert Deniro' is a member of 'Actors' only. If
you construct a GroupMembershipEvaluator for the 'Famous People' group in
the 'memberOf' mode, isApplicable() would return 'false' for 'Robert Deniro'.
If you construct it in the 'deepMemberOf' mode, isApplicable() would return
'true' for 'Robert Deniro'.
Prior to uPortal 2.5.1, this evaluator only supported the 'memberOf' mode
and did not support 'deepMemberOf'.
- Since:
- uPortal 2.5
- Version:
- $Revision: 1.4.2.1 $ $Date: 2005/10/19 13:50:17 $
- Author:
- mboyd@sungardsct.com
Fields inherited from interface org.jasig.portal.layout.dlm.Evaluator |
RCS_ID |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MEMBER_OF_MODE
private static final int MEMBER_OF_MODE
- See Also:
- Constant Field Values
DEEP_MEMBER_OF_MODE
private static final int DEEP_MEMBER_OF_MODE
- See Also:
- Constant Field Values
groupName
private java.lang.String groupName
group
private IEntityGroup group
evaluatorMode
private final int evaluatorMode
GroupMembershipEvaluator
public GroupMembershipEvaluator(java.lang.String mode,
java.lang.String name)
getGroup
private IEntityGroup getGroup()
isApplicable
public boolean isApplicable(IPerson p)
- Specified by:
isApplicable
in interface Evaluator