|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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(java.lang.Object o)
Answers if Object o is an IGroupMember that refers to the same underlying
entity(ies) as this . |
java.util.Iterator |
getAllContainingGroups()
Returns an Iterator over the Set of this
IGroupMember's recursively-retrieved parent groups. |
java.util.Iterator |
getAllEntities()
Returns an Iterator over the Set of this
IGroupMember's recursively-retrieved members that are
IEntities . |
java.util.Iterator |
getAllMembers()
Returns an Iterator over the Set of recursively-retrieved
IGroupMembers that are members of this . |
java.util.Iterator |
getContainingGroups()
Returns an Iterator over this IGroupMember's parent groups. |
java.util.Iterator |
getEntities()
Returns an Iterator over this IGroupMember's
members that are IEntities . |
java.lang.Class |
getEntityType()
Returns the underlying entity type. |
java.lang.String |
getKey()
Returns the key of the underlying entity. |
java.lang.Class |
getLeafType()
|
IEntityGroup |
getMemberGroupNamed(java.lang.String name)
Returns the named IEntityGroup from our members Collection . |
java.util.Iterator |
getMembers()
Returns an Iterator over the IGroupMembers in our
member Collection . |
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()
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 |
public boolean contains(IGroupMember gm) throws GroupsException
IGroupMember
gm is a member of this
.
gm
- org.jasig.portal.groups.IGroupMember
GroupsException
public boolean deepContains(IGroupMember gm) throws GroupsException
IGroupMember
gm is a recursive member of this
.
gm
- org.jasig.portal.groups.IGroupMember
GroupsException
public boolean equals(java.lang.Object o)
IGroupMember
that refers to the same underlying
entity(ies) as this
.
o
-
public java.util.Iterator getAllContainingGroups() throws GroupsException
Iterator
over the Set
of this
IGroupMember's
recursively-retrieved parent groups.
GroupsException
public java.util.Iterator getAllEntities() throws GroupsException
Iterator
over the Set
of this
IGroupMember's
recursively-retrieved members that are
IEntities
.
GroupsException
public java.util.Iterator getAllMembers() throws GroupsException
Iterator
over the Set
of recursively-retrieved
IGroupMembers
that are members of this
.
GroupsException
public java.util.Iterator getContainingGroups() throws GroupsException
Iterator
over this IGroupMember's
parent groups.
GroupsException
public java.util.Iterator getEntities() throws GroupsException
Iterator
over this IGroupMember's
members that are IEntities
.
GroupsException
public java.lang.Class 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
.
public java.lang.String getKey()
public java.lang.Class getLeafType()
getEntityType()
public IEntityGroup getMemberGroupNamed(java.lang.String name) throws GroupsException
IEntityGroup
from our members Collection
.
name
- java.lang.String
GroupsException
public java.util.Iterator getMembers() throws GroupsException
Iterator
over the IGroupMembers
in our
member Collection
.
GroupsException
public java.lang.Class getType()
IEntityGroup
. For an entity, it will be the type of the
underlying EntityIdentifier
.
public 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.
public int hashCode()
public boolean hasMembers() throws GroupsException
IGroupMember
has any members.
GroupsException
public boolean isDeepMemberOf(IGroupMember gm) throws GroupsException
this
is a recursive member of IGroupMember
gm.
gm
- org.jasig.portal.groups.IGroupMember
GroupsException
public boolean isEntity()
public boolean isGroup()
public boolean isMemberOf(IGroupMember gm) throws GroupsException
this
is a member of IGroupMember
gm.
gm
- org.jasig.portal.groups.IGroupMember
GroupsException
|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |