|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IGroupMember
An IGroupMember defines common behavior for both the leaf
IEntity and composite IEntityGroup sub-types
that together make up a Groups structure.
An IGroupMember can answer both its parents and its children but
has no api for adding or removing them. These methods are defined on
the composite type, IEntityGroup, since you add a member to a
group, and not vice versa.
Because it extends IBasicEntity, an IGroupMember has
an EntityIdentifier that can be used to cache and lock it. A leaf
IGroupMember also has a separate EntityIdentifier for
its underlying entity. This second EntityIdentifier is used to
create and record group memberships. In the case of a composite (non-leaf)
IGroupMember, both EntityIdentifiers are the same.
Take care to implement equals() and hashCode() so
that duplicates returned from "deep" methods can be recognized.
| Method Summary | |
|---|---|
boolean |
contains(IGroupMember gm)
Answers if IGroupMember gm is a member of this. |
boolean |
deepContains(IGroupMember gm)
Answers if IGroupMember gm is a recursive member of this. |
boolean |
equals(Object o)
Answers if Object o is an IGroupMember that refers to the same underlying
entity(ies) as this. |
Iterator |
getAllContainingGroups()
Returns an Iterator over the Set of this
IGroupMember's recursively-retrieved parent groups. |
Iterator |
getAllEntities()
Returns an Iterator over the Set of this
IGroupMember's recursively-retrieved members that are
IEntities. |
Iterator |
getAllMembers()
Returns an Iterator over the Set of recursively-retrieved
IGroupMembers that are members of this. |
Iterator |
getContainingGroups()
Returns an Iterator over this IGroupMember's parent groups. |
Iterator |
getEntities()
Returns an Iterator over this IGroupMember's
members that are IEntities. |
Class |
getEntityType()
Returns the underlying entity type. |
String |
getKey()
Returns the key of the underlying entity. |
Class |
getLeafType()
|
IEntityGroup |
getMemberGroupNamed(String name)
Returns the named IEntityGroup from our members Collection. |
Iterator |
getMembers()
Returns an Iterator over the IGroupMembers in our
member Collection. |
Class |
getType()
Returns the type of the underlying entity. |
EntityIdentifier |
getUnderlyingEntityIdentifier()
Returns EntityIdentifier for this IGroupMember's
underlying entity. |
int |
hashCode()
|
boolean |
hasMembers()
Answers if this IGroupMember has any members. |
boolean |
isDeepMemberOf(IGroupMember gm)
Answers if this is a recursive member of IGroupMember gm. |
boolean |
isEntity()
|
boolean |
isGroup()
|
boolean |
isMemberOf(IGroupMember gm)
Answers if this is a member of IGroupMember gm. |
| Methods inherited from interface org.jasig.portal.IBasicEntity |
|---|
getEntityIdentifier |
| Method Detail |
|---|
boolean contains(IGroupMember gm)
throws GroupsException
IGroupMember gm is a member of this.
gm - org.jasig.portal.groups.IGroupMember
GroupsException
boolean deepContains(IGroupMember gm)
throws GroupsException
IGroupMember gm is a recursive member of this.
gm - org.jasig.portal.groups.IGroupMember
GroupsExceptionboolean equals(Object o)
IGroupMember that refers to the same underlying
entity(ies) as this.
equals in class Objecto -
Iterator getAllContainingGroups()
throws GroupsException
Iterator over the Set of this
IGroupMember's recursively-retrieved parent groups.
GroupsException
Iterator getAllEntities()
throws GroupsException
Iterator over the Set of this
IGroupMember's recursively-retrieved members that are
IEntities.
GroupsException
Iterator getAllMembers()
throws GroupsException
Iterator over the Set of recursively-retrieved
IGroupMembers that are members of this.
GroupsException
Iterator getContainingGroups()
throws GroupsException
Iterator over this IGroupMember's parent groups.
GroupsException
Iterator getEntities()
throws GroupsException
Iterator over this IGroupMember's
members that are IEntities.
GroupsExceptionClass getEntityType()
IEntityGroup, this is
analagous to Class as applied to an Array; it is an
attribute of the group object. For an IEntity, it is the entity
type of the group the entity belongs to, which may be any Class
the underlying entity can be legally cast to. Thus, an IEntity
with an underlying entity of type Manager could have an entity
type of Employee as long as Employee was a
superclass of Manager.
String getKey()
Class getLeafType()
getEntityType()
IEntityGroup getMemberGroupNamed(String name)
throws GroupsException
IEntityGroup from our members Collection.
name - java.lang.String
GroupsException
Iterator getMembers()
throws GroupsException
Iterator over the IGroupMembers in our
member Collection.
GroupsExceptionClass getType()
IEntityGroup. For an entity, it will be the type of the
underlying EntityIdentifier.
EntityIdentifier getUnderlyingEntityIdentifier()
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.
int hashCode()
hashCode in class Object
boolean hasMembers()
throws GroupsException
IGroupMember has any members.
GroupsException
boolean isDeepMemberOf(IGroupMember gm)
throws GroupsException
this is a recursive member of IGroupMember gm.
gm - org.jasig.portal.groups.IGroupMember
GroupsExceptionboolean isEntity()
boolean isGroup()
boolean isMemberOf(IGroupMember gm)
throws GroupsException
this is a member of IGroupMember gm.
gm - org.jasig.portal.groups.IGroupMember
GroupsException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||