org.jasig.portal.groups
Class EntityTestingGroupImpl

java.lang.Object
  extended by org.jasig.portal.groups.GroupMemberImpl
      extended by org.jasig.portal.groups.EntityGroupImpl
          extended by org.jasig.portal.groups.EntityTestingGroupImpl
All Implemented Interfaces:
IEntityGroup, IGroupMember, IBasicEntity

public class EntityTestingGroupImpl
extends EntityGroupImpl

Version:
$Revision: 1.1.6.1 $
Author:
Dan Ellentuck
See Also:
An IEntityGroup that answers if it contains an entity by delegating to the local group store. By contrast, an EntityGroupImpl answers this by examining (and if necessary initializing) its own member cache. This behavior is designed to accommodate groups whose membership is computed by testing the prospective entity member rather than by testing the group. It allows contains() and deepContains() to work correctly for groups from services like PAGS and JitLDAP. Groups in these services do not keep references to their members but only define the logic for computing if a candidate entity is a member.

Field Summary
 
Fields inherited from class org.jasig.portal.groups.EntityGroupImpl
localGroupService
 
Constructor Summary
EntityTestingGroupImpl(java.lang.String groupKey, java.lang.Class entityType)
           
 
Method Summary
 boolean contains(IGroupMember gm)
          Checks if GroupMember gm is a member of this.
 
Methods inherited from class org.jasig.portal.groups.EntityGroupImpl
addMember, areMemberKeysInitialized, clearPendingUpdates, deepContains, delete, equals, getAddedMembers, getAllEntities, getAllMembers, getCompositeEntityIdentifier, getCreatorID, getDescription, getEntities, getEntityIdentifier, getEntityKey, getEntityType, getGroupID, getLeafType, getLocalGroupService, getLocalKey, getMemberEntities, getMemberGroupNamed, getMemberGroups, getMembers, getName, getRemovedMembers, getService, getServiceName, getType, hasAdds, hasDeletes, hashCode, hasMembers, isDirty, isEditable, isGroup, primAddMember, primGetAllEntities, primGetAllMembers, primRemoveMember, primSetName, removeMember, setCreatorID, setDescription, setLocalGroupService, setName, setServiceName, toString, update, updateMembers
 
Methods inherited from class org.jasig.portal.groups.GroupMemberImpl
addGroup, castAndCopyHashSet, getAllContainingGroups, getCacheKey, getCompositeGroupService, getContainingGroups, getKey, getUnderlyingEntityIdentifier, isDeepMemberOf, isEntity, isKnownEntityType, isMemberOf, primGetAllContainingGroups, removeGroup, setGroupKeysInitialized
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jasig.portal.groups.IGroupMember
getAllContainingGroups, getContainingGroups, getKey, getUnderlyingEntityIdentifier, isDeepMemberOf, isEntity, isMemberOf
 

Constructor Detail

EntityTestingGroupImpl

public EntityTestingGroupImpl(java.lang.String groupKey,
                              java.lang.Class entityType)
                       throws GroupsException
Parameters:
groupKey -
entityType -
Throws:
GroupsException
Method Detail

contains

public boolean contains(IGroupMember gm)
                 throws GroupsException
Checks if GroupMember gm is a member of this.

Specified by:
contains in interface IGroupMember
Overrides:
contains in class EntityGroupImpl
Parameters:
gm - org.jasig.portal.groups.IGroupMember
Returns:
boolean
Throws:
GroupsException