|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.groups.GroupMemberImpl
public abstract class GroupMemberImpl
GroupMemberImpl summary first sentence goes here.
IGroupMember| Field Summary | |
|---|---|
private static java.lang.Class |
defaultEntityType
|
private java.util.Set |
groupKeys
|
private boolean |
groupKeysInitialized
|
private EntityIdentifier |
underlyingEntityIdentifier
|
| 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. |
private boolean |
areGroupKeysInitialized()
|
protected java.util.Set |
castAndCopyHashSet(java.util.Set s)
Cast a Set to a HashSet, clone it, and down cast back to Set. |
boolean |
contains(IGroupMember gm)
Default implementation, overridden on EntityGroupImpl. |
private java.util.Set |
copyGroupKeys()
Clone the group keys. |
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. |
protected java.lang.String |
getCacheKey()
|
protected ICompositeGroupService |
getCompositeGroupService()
Returns the composite group service. |
java.util.Iterator |
getContainingGroups()
Returns an Iterator over this IGroupMember's parent groups. |
private java.lang.Class |
getDefaultEntityType()
|
private java.util.Iterator |
getEmptyIterator()
|
java.util.Iterator |
getEntities()
Default implementation, overridden on EntityGroupImpl. |
private java.util.Set |
getGroupKeys()
|
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. |
private void |
initializeContainingGroupKeys()
Cache the keys for IEntityGroups that contain this IGroupMember. |
boolean |
isDeepMemberOf(IGroupMember gm)
Answers if this IGroupMember is, recursively, a member of IGroupMember gm. |
boolean |
isEntity()
|
boolean |
isGroup()
|
protected boolean |
isKnownEntityType(java.lang.Class anEntityType)
|
boolean |
isMemberOf(IGroupMember gm)
Answers if this IGroupMember is a member of IGroupMember gm. |
protected java.util.Set |
primGetAllContainingGroups(java.util.Set s)
Returns the Set of groups in our member Collection and,
recursively, in the Collections of our members. |
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. |
private void |
setGroupKeys(java.util.Set newGroupKeys)
|
protected void |
setGroupKeysInitialized(boolean newGroupKeysInitialized)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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 |
| Field Detail |
|---|
private EntityIdentifier underlyingEntityIdentifier
private static java.lang.Class defaultEntityType
private java.util.Set groupKeys
private boolean groupKeysInitialized
| Constructor Detail |
|---|
public GroupMemberImpl(java.lang.String key,
java.lang.Class type)
throws GroupsException
GroupsException
public GroupMemberImpl(EntityIdentifier newEntityIdentifier)
throws GroupsException
GroupsException| Method Detail |
|---|
public void addGroup(IEntityGroup eg)
throws GroupsException
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.
eg - org.jasig.portal.groups.IEntityGroup
GroupsExceptionprivate boolean areGroupKeysInitialized()
public boolean contains(IGroupMember gm)
throws GroupsException
contains in interface IGroupMembergm - org.jasig.portal.groups.IGroupMember
GroupsException
private java.util.Set copyGroupKeys()
throws GroupsException
GroupsExceptionprotected java.util.Set castAndCopyHashSet(java.util.Set s)
public boolean deepContains(IGroupMember gm)
throws GroupsException
deepContains in interface IGroupMembergm - org.jasig.portal.groups.IGroupMember
GroupsException
public java.util.Iterator getAllContainingGroups()
throws GroupsException
Iterator over the Set of this
IGroupMember's recursively-retrieved parent groups.
getAllContainingGroups in interface IGroupMemberGroupsException
public java.util.Iterator getAllEntities()
throws GroupsException
getAllEntities in interface IGroupMemberGroupsException
public java.util.Iterator getAllMembers()
throws GroupsException
getAllMembers in interface IGroupMemberGroupsExceptionprotected java.lang.String getCacheKey()
protected ICompositeGroupService getCompositeGroupService()
throws GroupsException
GroupsException
public java.util.Iterator getContainingGroups()
throws GroupsException
Iterator over this IGroupMember's parent groups.
Synchronize the collection of keys with adds and removes.
getContainingGroups in interface IGroupMemberGroupsExceptionprivate java.lang.Class getDefaultEntityType()
private java.util.Iterator getEmptyIterator()
public java.util.Iterator getEntities()
throws GroupsException
getEntities in interface IGroupMemberGroupsException
private java.util.Set getGroupKeys()
throws GroupsException
GroupsExceptionpublic java.lang.String getKey()
IGroupMember
getKey in interface IGroupMember
public IEntityGroup getMemberGroupNamed(java.lang.String name)
throws GroupsException
getMemberGroupNamed in interface IGroupMembername - java.lang.String
GroupsException
public java.util.Iterator getMembers()
throws GroupsException
getMembers in interface IGroupMemberGroupsExceptionpublic java.lang.Class getType()
IGroupMemberIEntityGroup. For an entity, it will be the type of the
underlying EntityIdentifier.
getType in interface IGroupMemberpublic EntityIdentifier getUnderlyingEntityIdentifier()
IGroupMemberEntityIdentifier 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.
getUnderlyingEntityIdentifier in interface IGroupMemberpublic int hashCode()
hashCode in interface IGroupMemberhashCode in class java.lang.Object
public boolean hasMembers()
throws GroupsException
hasMembers in interface IGroupMemberGroupsException
private void initializeContainingGroupKeys()
throws GroupsException
IEntityGroups that contain this IGroupMember.
GroupsException
public boolean isDeepMemberOf(IGroupMember gm)
throws GroupsException
IGroupMember is, recursively, a member of IGroupMember gm.
isDeepMemberOf in interface IGroupMembergm - org.jasig.portal.groups.IGroupMember
GroupsExceptionpublic boolean isEntity()
isEntity in interface IGroupMemberpublic boolean isGroup()
isGroup in interface IGroupMember
protected boolean isKnownEntityType(java.lang.Class anEntityType)
throws GroupsException
GroupsException
public boolean isMemberOf(IGroupMember gm)
throws GroupsException
IGroupMember is a member of IGroupMember gm.
isMemberOf in interface IGroupMembergm - org.jasig.portal.groups.IGroupMember
GroupsException
protected java.util.Set primGetAllContainingGroups(java.util.Set s)
throws GroupsException
Set of groups in our member Collection and,
recursively, in the Collections of our members.
s - java.lang.Set - A Set that groups are added to.
GroupsException
public void removeGroup(IEntityGroup eg)
throws GroupsException
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.
eg - org.jasig.portal.groups.IEntityGroup
GroupsExceptionprivate void setGroupKeys(java.util.Set newGroupKeys)
newGroupKeys - Setprotected void setGroupKeysInitialized(boolean newGroupKeysInitialized)
newGroupKeysInitialized - boolean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||