public class DynamicGroup extends PersistentObject implements IDynamicMembership
Constructor and Description |
---|
DynamicGroup(CreationTemplate template,
AttrSet attrSet)
Constructs a
DynamicGroup in memory with a given template
for DynamicGroup . |
DynamicGroup(CreationTemplate template,
AttrSet attrSet,
Guid baseGuid,
String filter,
int scope)
Constructs a
DynamicGroup in memory given a template for
DynamicGroup . |
Modifier and Type | Method and Description |
---|---|
int |
getMemberCount()
Returns the member count.
|
Guid |
getMemberIDAt(int index)
Returns a member given an index (zero-based).
|
SearchResults |
getMemberIDs()
Returns the members of the group.
|
Guid |
getSearchBase()
Returns the search base used to evaluate this dynamic group.
|
String |
getSearchFilter()
Returns the search filter used to evaluate this dynamic group.
|
int |
getSearchScope()
Returns the search scope used to evaluate this dynamic group.
|
boolean |
hasMember(Guid guid)
Returns
true if a given identifier is a member of the
group. |
void |
setSearchBase(Guid baseGuid)
Sets the search base used to evaluate this dynamic group.
|
void |
setSearchFilter(String filter)
Sets the search filter used to evaluate this dynamic group.
|
void |
setSearchScope(int scope)
Sets the search scope used to evaluate this dynamic 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 DynamicGroup(CreationTemplate template, AttrSet attrSet) throws UMSException
DynamicGroup
in memory with a given template
for DynamicGroup
. This is an in-memory representation of a
new object; the save
method must be called to save this
new object to persistent storage.template
- Template for creating a group.attrSet
- Attribute/value set, which should contain
memberUrl
.UMSException
- if fail to instantiate from persistent storage.public DynamicGroup(CreationTemplate template, AttrSet attrSet, Guid baseGuid, String filter, int scope) throws UMSException
DynamicGroup
in memory given a template for
DynamicGroup
. This is an in-memory representation of a new
object and the save
method must be called to save this new
object to persistent storage.template
- Template for creating a group.attrSet
- Attribute/value set, which should not contain member Url;
any values of memberUrl will be overwritten by the explicit search
criteria arguments.baseGuid
- Search base for evaluating members of the group.filter
- Search filter for evaluating members of the group.scope
- Search scope for evaluating members of the group has to be
LDAPv2.SCOPE_ONE
or LDAPv2.SCOPE_SUB
.UMSException
- if fail to instantiate from persistent storage.public void setSearchFilter(String filter)
setSearchFilter
in interface IDynamicMembership
filter
- Search filter for evaluating members of the group.public String getSearchFilter()
getSearchFilter
in interface IDynamicMembership
LDAPv2.SCOPE_ONE
or
LDAPv2.SCOPE_SUB
.public void setSearchBase(Guid baseGuid)
setSearchBase
in interface IDynamicMembership
baseGuid
- Search base for evaluating members of the group.public Guid getSearchBase()
getSearchBase
in interface IDynamicMembership
public void setSearchScope(int scope)
setSearchScope
in interface IDynamicMembership
scope
- Search scope for evaluating members of the group. Use one of
the search scope SCOPE_BASE
,
SCOPE_ONE
, or SCOPE_SUB
.public int getSearchScope()
getSearchScope
in interface IDynamicMembership
public SearchResults getMemberIDs() throws UMSException
getMemberIDs
in interface IMembership
UMSException
- if fail to search.public int getMemberCount() throws UMSException
getMemberCount
in interface IMembership
UMSException
- if fail to search.public Guid getMemberIDAt(int index) throws UMSException
getMemberIDAt
in interface IMembership
index
- Zero-based index into the group container.UMSException
- if fail to search.public boolean hasMember(Guid guid) throws UMSException
true
if a given identifier is a member of the
group.hasMember
in interface IMembership
guid
- Identity of member to be checked for membership.true
if it is a member.UMSException
- if fail to evaluate groupCopyright © 2010-2014, ForgeRock All Rights Reserved.