public class StaticGroup extends PersistentObject implements IAssignableMembership
Modifier and Type | Field and Description |
---|---|
static int |
LEVEL_ALL
Level indicator for expanding nested membership to the fullest.
|
static int |
LEVEL_DIRECT
Level indicator for no nesting of group membership.
|
Constructor and Description |
---|
StaticGroup(CreationTemplate template,
AttrSet attrSet)
Constructs a StaticGroup object in memory with
a given template.
|
Modifier and Type | Method and Description |
---|---|
void |
addMember(Guid guid)
Adds a member to the group.
|
void |
addMember(PersistentObject member)
Adds a member to the group.
|
void |
addMembers(Guid[] guids)
Adds a list of members to the group.
|
int |
getMemberCount()
Gets the member count.
|
int |
getMemberCount(int level)
Gets the member count.
|
Guid |
getMemberIDAt(int index)
Gets a member given an index (zero-based).
|
Guid |
getMemberIDAt(int index,
int level)
Gets a member given an index (zero-based).
|
SearchResults |
getMemberIDs()
Gets the members of the group.
|
SearchResults |
getMembers(int level)
Get members of the group.
|
boolean |
hasMember(Guid guid)
Checks if a given identifier is a member of the group.
|
boolean |
hasMember(Guid guid,
int level)
Checks if a given identifier is a member of the group.
|
void |
removeAllMembers()
Removes all members of the group.
|
void |
removeMember(Guid guid)
Removes a member from the group.
|
void |
removeMember(PersistentObject member)
Removes a member from the group.
|
addACI, addAttributeValue, addChild, deleteACI, getACI, getACI, getAttribute, getAttribute, getAttributeNames, getAttributes, getAttributes, getAttributes, getChildren, getChildren, getChildren, getGuid, getNamingAttribute, getParentObject, getRoles, isMemberOf, modify, modify, modify, remove, removeAttribute, removeAttributeValue, removeChild, removeChild, rename, replaceACI, save, search, search, search, setAttribute, setAttribute, toString
getParentGuid
public static final int LEVEL_DIRECT
public static final int LEVEL_ALL
public StaticGroup(CreationTemplate template, AttrSet attrSet) throws UMSException
template
- Template for creating a groupattrSet
- Attribute/value setUMSException
- on failure to instantiate from persistent storagepublic void addMember(Guid guid) throws UMSException
addMember
in interface IAssignableMembership
guid
- Globally unique identifier for the member to be addedUMSException
- on failure to save to persistent storagepublic void addMember(PersistentObject member) throws UMSException
addMember
in interface IAssignableMembership
member
- Object to be added as memberUMSException
- on failure to save to persistent storagepublic void addMembers(Guid[] guids) throws UMSException
addMembers
in interface IAssignableMembership
guids
- Array of member guids to be added as members to the groupUMSException
- on failure to save to persistent storagepublic SearchResults getMemberIDs() throws UMSException
getMemberIDs
in interface IMembership
Not
- thrown by this classUMSException
public SearchResults getMembers(int level) throws UMSException
level
- Nesting levelNot
- thrown by this classUMSException
public int getMemberCount() throws UMSException
getMemberCount
in interface IMembership
Not
- thrown by this classUMSException
public int getMemberCount(int level) throws UMSException
level
- Nesting levelNot
- thrown by this classUMSException
public Guid getMemberIDAt(int index) throws UMSException
getMemberIDAt
in interface IMembership
index
- Zero-based index into the group containerNot
- thrown by this classUMSException
public Guid getMemberIDAt(int index, int level) throws UMSException
index
- Zero-based index into the group containerlevel
- Nesting levelNot
- thrown by this classUMSException
public void removeMember(Guid guid) throws UMSException
removeMember
in interface IAssignableMembership
guid
- Unique identifier for the member to be removedUMSException
- on failure to save to persistent storagepublic void removeMember(PersistentObject member) throws UMSException
removeMember
in interface IAssignableMembership
member
- Object to be removedUMSException
- on failure to save to persistent storagepublic void removeAllMembers() throws UMSException
removeAllMembers
in interface IAssignableMembership
UMSException
- on failure to save to persistent storagepublic boolean hasMember(Guid guid) throws UMSException
hasMember
in interface IMembership
guid
- Identity of member to be checked for membershiptrue if it is a member
Not
- thrown by this classUMSException
- on failure to evaluate membershippublic boolean hasMember(Guid guid, int level) throws UMSException
guid
- Identity of member to be checked for membershiplevel
- Nesting leveltrue
if it is a memberNot
- thrown by this classUMSException
Copyright © 2010-2013, ForgeRock All Rights Reserved.