|
||||||||||
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
GroupsException
private boolean areGroupKeysInitialized()
public boolean contains(IGroupMember gm) throws GroupsException
contains
in interface IGroupMember
gm
- org.jasig.portal.groups.IGroupMember
GroupsException
private java.util.Set copyGroupKeys() throws GroupsException
GroupsException
protected java.util.Set castAndCopyHashSet(java.util.Set s)
public boolean deepContains(IGroupMember gm) throws GroupsException
deepContains
in interface IGroupMember
gm
- 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 IGroupMember
GroupsException
public java.util.Iterator getAllEntities() throws GroupsException
getAllEntities
in interface IGroupMember
GroupsException
public java.util.Iterator getAllMembers() throws GroupsException
getAllMembers
in interface IGroupMember
GroupsException
protected 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 IGroupMember
GroupsException
private java.lang.Class getDefaultEntityType()
private java.util.Iterator getEmptyIterator()
public java.util.Iterator getEntities() throws GroupsException
getEntities
in interface IGroupMember
GroupsException
private java.util.Set getGroupKeys() throws GroupsException
GroupsException
public java.lang.String getKey()
IGroupMember
getKey
in interface IGroupMember
public IEntityGroup getMemberGroupNamed(java.lang.String name) throws GroupsException
getMemberGroupNamed
in interface IGroupMember
name
- java.lang.String
GroupsException
public java.util.Iterator getMembers() throws GroupsException
getMembers
in interface IGroupMember
GroupsException
public java.lang.Class getType()
IGroupMember
IEntityGroup
. For an entity, it will be the type of the
underlying EntityIdentifier
.
getType
in interface IGroupMember
public EntityIdentifier getUnderlyingEntityIdentifier()
IGroupMember
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.
getUnderlyingEntityIdentifier
in interface IGroupMember
public int hashCode()
hashCode
in interface IGroupMember
hashCode
in class java.lang.Object
public boolean hasMembers() throws GroupsException
hasMembers
in interface IGroupMember
GroupsException
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 IGroupMember
gm
- org.jasig.portal.groups.IGroupMember
GroupsException
public boolean isEntity()
isEntity
in interface IGroupMember
public 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 IGroupMember
gm
- 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
GroupsException
private 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 |