uPortal 2.4.1
API Documentation

org.jasig.portal.groups
Class GroupMemberImpl

java.lang.Object
  extended byorg.jasig.portal.groups.GroupMemberImpl
All Implemented Interfaces:
IBasicEntity, IGroupMember
Direct Known Subclasses:
EntityGroupImpl, EntityImpl

public abstract class GroupMemberImpl
extends java.lang.Object
implements IGroupMember

GroupMemberImpl summary first sentence goes here.

Version:
$Revision: 1.18 $
Author:
Dan Ellentuck
See Also:
IGroupMember

Constructor Summary
GroupMemberImpl(EntityIdentifier newEntityIdentifier)
          GroupMemberImpl constructor
GroupMemberImpl(java.lang.String key, java.lang.Class type)
          GroupMemberImpl constructor
 
Method Summary
 void addGroup(IEntityGroup eg)
          Adds the key of the IEntityGroup to our Set of group keys by copying the keys, updating the copy, and replacing the old keys with the copy.
 boolean contains(IGroupMember gm)
          Default implementation, overridden on EntityGroupImpl.
 boolean deepContains(IGroupMember gm)
          Default implementation, overridden on EntityGroupImpl.
 java.util.Iterator getAllContainingGroups()
          Returns an Iterator over the Set of this IGroupMember's recursively-retrieved parent groups.
 java.util.Iterator getAllEntities()
          Default implementation, overridden on EntityGroupImpl.
 java.util.Iterator getAllMembers()
          Default implementation, overridden on EntityGroupImpl.
 java.util.Iterator getContainingGroups()
          Returns an Iterator over this IGroupMember's parent groups.
 java.util.Iterator getEntities()
          Default implementation, overridden on EntityGroupImpl.
 java.lang.String getKey()
          Returns the key of the underlying entity.
 IEntityGroup getMemberGroupNamed(java.lang.String name)
          Default implementation, overridden on EntityGroupImpl.
 java.util.Iterator getMembers()
          Default implementation, overridden on EntityGroupImpl.
 java.lang.Class getType()
          Returns the type of the underlying entity.
 EntityIdentifier getUnderlyingEntityIdentifier()
          Returns EntityIdentifier for this IGroupMember's underlying entity.
 int hashCode()
           
 boolean hasMembers()
          Default implementation, overridden on EntityGroupImpl.
 boolean isDeepMemberOf(IGroupMember gm)
          Answers if this IGroupMember is, recursively, a member of IGroupMember gm.
 boolean isEntity()
           
 boolean isGroup()
           
 boolean isMemberOf(IGroupMember gm)
          Answers if this IGroupMember is a member of IGroupMember gm.
 void removeGroup(IEntityGroup eg)
          Removes the key of the IEntityGroup from our Set of group keys by copying the keys, updating the copy, and replacing the old keys with the copy.
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jasig.portal.groups.IGroupMember
equals, getEntityType, getLeafType
 
Methods inherited from interface org.jasig.portal.IBasicEntity
getEntityIdentifier
 

Constructor Detail

GroupMemberImpl

public GroupMemberImpl(java.lang.String key,
                       java.lang.Class type)
                throws GroupsException
GroupMemberImpl constructor


GroupMemberImpl

public GroupMemberImpl(EntityIdentifier newEntityIdentifier)
                throws GroupsException
GroupMemberImpl constructor

Method Detail

addGroup

public void addGroup(IEntityGroup eg)
              throws GroupsException
Adds the key of the IEntityGroup to our Set of group keys by copying the keys, updating the copy, and replacing the old keys with the copy. This lets us confine synchronization to the getter and setter methods for the keys.

Parameters:
eg - org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException

contains

public boolean contains(IGroupMember gm)
                 throws GroupsException
Default implementation, overridden on EntityGroupImpl.

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

deepContains

public boolean deepContains(IGroupMember gm)
                     throws GroupsException
Default implementation, overridden on EntityGroupImpl.

Specified by:
deepContains in interface IGroupMember
Parameters:
gm - org.jasig.portal.groups.IGroupMember
Returns:
boolean
Throws:
GroupsException

getAllContainingGroups

public java.util.Iterator getAllContainingGroups()
                                          throws GroupsException
Returns an Iterator over the Set of this IGroupMember's recursively-retrieved parent groups.

Specified by:
getAllContainingGroups in interface IGroupMember
Returns:
java.util.Iterator
Throws:
GroupsException

getAllEntities

public java.util.Iterator getAllEntities()
                                  throws GroupsException
Default implementation, overridden on EntityGroupImpl.

Specified by:
getAllEntities in interface IGroupMember
Returns:
java.util.Iterator
Throws:
GroupsException

getAllMembers

public java.util.Iterator getAllMembers()
                                 throws GroupsException
Default implementation, overridden on EntityGroupImpl.

Specified by:
getAllMembers in interface IGroupMember
Returns:
java.util.Iterator
Throws:
GroupsException

getContainingGroups

public java.util.Iterator getContainingGroups()
                                       throws GroupsException
Returns an Iterator over this IGroupMember's parent groups. Synchronize the collection of keys with adds and removes.

Specified by:
getContainingGroups in interface IGroupMember
Returns:
java.util.Iterator
Throws:
GroupsException

getEntities

public java.util.Iterator getEntities()
                               throws GroupsException
Default implementation, overridden on EntityGroupImpl.

Specified by:
getEntities in interface IGroupMember
Returns:
java.util.Iterator
Throws:
GroupsException

getKey

public java.lang.String getKey()
Description copied from interface: IGroupMember
Returns the key of the underlying entity.

Specified by:
getKey in interface IGroupMember
Returns:
java.lang.String

getMemberGroupNamed

public IEntityGroup getMemberGroupNamed(java.lang.String name)
                                 throws GroupsException
Default implementation, overridden on EntityGroupImpl.

Specified by:
getMemberGroupNamed in interface IGroupMember
Parameters:
name - java.lang.String
Returns:
org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException

getMembers

public java.util.Iterator getMembers()
                              throws GroupsException
Default implementation, overridden on EntityGroupImpl.

Specified by:
getMembers in interface IGroupMember
Returns:
java.util.Iterator
Throws:
GroupsException

getType

public java.lang.Class getType()
Description copied from interface: IGroupMember
Returns the type of the underlying entity. For a group this will be IEntityGroup. For an entity, it will be the type of the underlying EntityIdentifier.

Specified by:
getType in interface IGroupMember
Returns:
java.lang.Class

getUnderlyingEntityIdentifier

public EntityIdentifier getUnderlyingEntityIdentifier()
Description copied from interface: IGroupMember
Returns EntityIdentifier for this IGroupMember's underlying entity. In the case of an IEntityGroup, it will be the EntityIdentifier for this. In the case of an IEntity, it will be the EntityIdentifier that identifies the underlying IPerson, ChannelDefinition, etc.

Specified by:
getUnderlyingEntityIdentifier in interface IGroupMember
Returns:
EntityIdentifier

hashCode

public int hashCode()
Specified by:
hashCode in interface IGroupMember

hasMembers

public boolean hasMembers()
                   throws GroupsException
Default implementation, overridden on EntityGroupImpl.

Specified by:
hasMembers in interface IGroupMember
Returns:
boolean
Throws:
GroupsException

isDeepMemberOf

public boolean isDeepMemberOf(IGroupMember gm)
                       throws GroupsException
Answers if this IGroupMember is, recursively, a member of IGroupMember gm.

Specified by:
isDeepMemberOf in interface IGroupMember
Parameters:
gm - org.jasig.portal.groups.IGroupMember
Returns:
boolean
Throws:
GroupsException

isEntity

public boolean isEntity()
Specified by:
isEntity in interface IGroupMember
Returns:
boolean

isGroup

public boolean isGroup()
Specified by:
isGroup in interface IGroupMember
Returns:
boolean

isMemberOf

public boolean isMemberOf(IGroupMember gm)
                   throws GroupsException
Answers if this IGroupMember is a member of IGroupMember gm.

Specified by:
isMemberOf in interface IGroupMember
Parameters:
gm - org.jasig.portal.groups.IGroupMember
Returns:
boolean
Throws:
GroupsException

removeGroup

public void removeGroup(IEntityGroup eg)
                 throws GroupsException
Removes the key of the IEntityGroup from our Set of group keys by copying the keys, updating the copy, and replacing the old keys with the copy. This lets us confine synchronization to the getter and setter methods for the keys.

Parameters:
eg - org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException

uPortal 2.4.1
API Documentation