com.iplanet.am.sdk
Interface AMGroup

All Superinterfaces:
AMConstants, AMObject
All Known Subinterfaces:
AMAssignableDynamicGroup, AMDynamicGroup, AMStaticGroup

public interface AMGroup
extends AMObject

The AMGroup interface provides methods to manage group


Fields inherited from interface com.iplanet.am.sdk.AMObject
ASSIGNABLE_DYNAMIC_GROUP, DYNAMIC_GROUP, FILTERED_ROLE, GROUP, GROUP_CONTAINER, GROUP_PROFILE, MANAGED_ROLE, ORGANIZATION, ORGANIZATIONAL_UNIT, PEOPLE_CONTAINER, POLICY, ROLE, ROLE_PROFILE, SERVICE, STATIC_GROUP, TEMPLATE, UNKNOWN_OBJECT_TYPE, USER
 
Fields inherited from interface com.iplanet.am.sdk.AMConstants
SCOPE_BASE, SCOPE_ONE, SCOPE_SUB, SUBSCRIBABLE_ATTRIBUTE, UNIQUE_MEMBER_ATTRIBUTE
 
Method Summary
 java.util.Set createAssignableDynamicGroups(java.util.Map groups)
          Creates assignable dynamic groups and initializes their attributes.
 java.util.Set createAssignableDynamicGroups(java.util.Set groupNames)
          Creates assignable dynamic groups in this group.
 java.util.Set createDynamicGroups(java.util.Map groups)
          Creates dynamic groups and initializes their attributes.
 java.util.Set createDynamicGroups(java.util.Set groupNames)
          Creates dynamic groups in this group.
 java.util.Set createStaticGroups(java.util.Map groups)
          Creates static groups and initializes their attributes.
 java.util.Set createStaticGroups(java.util.Set groupNames)
          Creates static groups in this group.
 void deleteAssignableDynamicGroups(java.util.Set groupDNs)
          Deletes assignable dynamic groups in this group.
 void deleteDynamicGroups(java.util.Set groupDNs)
          Deletes dynamic groups in this group.
 void deleteStaticGroups(java.util.Set groupDNs)
          Deletes static groups in this group.
 java.util.Set getGroupDNs(int level)
          Gets the groups in this group.
 long getNumberOfGroups(int level)
          Gets number of groups in the group.
 long getNumberOfUsers()
          Gets number of users in the group.
 java.util.Set getUserDNs()
          Gets the DNs of users in the group.
 java.util.Set searchGroups(java.lang.String wildcard, int level)
          Searches for groups in this group using wildcards.
 AMSearchResults searchGroups(java.lang.String wildcard, java.util.Map avPairs, com.iplanet.am.sdk.AMSearchControl searchControl)
          Searches for groups in this group using wildcards and attribute values.
 java.util.Set searchGroups(java.lang.String wildcard, java.util.Map avPairs, int level)
          Searches for groups in this group using wildcards and attribute values.
 AMSearchResults searchUsers(com.iplanet.am.sdk.AMSearchControl searchControl, java.lang.String avfilter)
          Searches for users in this group using attribute values.
 java.util.Set searchUsers(java.lang.String wildcard)
          Searches for users in this group using wildcards and attribute values.
 AMSearchResults searchUsers(java.lang.String wildcard, java.util.Map avPairs, com.iplanet.am.sdk.AMSearchControl searchControl)
          Searches for users in this group using wildcards.
 
Methods inherited from interface com.iplanet.am.sdk.AMObject
addEventListener, assignPolicies, createPolicyTemplate, createPolicyTemplate, createTemplate, createTemplate, delete, delete, getAttribute, getAttributeByteArray, getAttributes, getAttributes, getAttributesByteArray, getAttributesByteArray, getDN, getOrganizationDN, getParentDN, getPolicy, getPolicyTemplate, getServiceAttributes, getStringAttribute, getTemplate, isExists, removeAttributes, removeEventListener, search, setAttributes, setStringAttribute, store, unassignPolicies
 

Method Detail

getNumberOfUsers

public long getNumberOfUsers()
                      throws AMException,
                             SSOException
Gets number of users in the group.
Returns:
Number of users in the group.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

getUserDNs

public java.util.Set getUserDNs()
                         throws AMException,
                                SSOException
Gets the DNs of users in the group.
Returns:
The names of users' DNs in the group.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

searchUsers

public java.util.Set searchUsers(java.lang.String wildcard)
                          throws AMException,
                                 SSOException
Searches for users in this group using wildcards and attribute values. Wildcards can be specified such as a*, *, *a.
Parameters:
wildcard - wildcard pattern to be used in the search
Returns:
Set of DNs of Users matching the search
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

searchUsers

public AMSearchResults searchUsers(java.lang.String wildcard,
                                   java.util.Map avPairs,
                                   com.iplanet.am.sdk.AMSearchControl searchControl)
                            throws AMException,
                                   SSOException
Searches for users in this group using wildcards. Wildcards can be specified such as a*, *, *a.
Parameters:
wildcard - wildcard pattern to be used in the search
avPairs - attribute-value pairs to match when searching users
searchControl - specifies the size limit and time limit
Returns:
AMSearchResults which contains a Set DNs of Users matching the search
Throws:
AMException - if there is an internal error in the AM Store
SSOException - if the sign on is no longer valid

searchUsers

public AMSearchResults searchUsers(com.iplanet.am.sdk.AMSearchControl searchControl,
                                   java.lang.String avfilter)
                            throws AMException,
                                   SSOException
Searches for users in this group using attribute values. Wildcards such as a*, *, *a can be specified for the attribute values. The DNs of users with matching attribute-value pairs will be returned.
Parameters:
searchControl - specifies the search scope to be used, VLV ranges etc.,
avfilter - this attribute-value pairs filter will be & with user search filter
Returns:
AMSearchResults which contains a Set DNs of Users matching the search
Throws:
AMException - if there is an internal error in the AM Store
SSOException - if the sign on is no longer valid

createStaticGroups

public java.util.Set createStaticGroups(java.util.Set groupNames)
                                 throws AMException,
                                        SSOException
Creates static groups in this group.
Parameters:
groupNames - The set of static groups' names to be created in this group.
Returns:
Set set of static group objects created
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

createStaticGroups

public java.util.Set createStaticGroups(java.util.Map groups)
                                 throws AMException,
                                        SSOException
Creates static groups and initializes their attributes.
Parameters:
users - Map where the key is the name of the static group, and the value is a Map to represent Attribute-Value Pairs
Returns:
Set Set of group objects created.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

createDynamicGroups

public java.util.Set createDynamicGroups(java.util.Set groupNames)
                                  throws AMException,
                                         SSOException
Creates dynamic groups in this group.
Parameters:
groupNames - The set of dynamic groups' names to be created in this group.
Returns:
Set of dynamic group objects created
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

createDynamicGroups

public java.util.Set createDynamicGroups(java.util.Map groups)
                                  throws AMException,
                                         SSOException
Creates dynamic groups and initializes their attributes.
Parameters:
groups - Map where the key is the name of the dynamic group, and the value is a Map to represent Attribute-Value Pairs
Returns:
Set of dynamic group objects created
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

createAssignableDynamicGroups

public java.util.Set createAssignableDynamicGroups(java.util.Set groupNames)
                                            throws AMException,
                                                   SSOException
Creates assignable dynamic groups in this group.
Parameters:
groupNames - The set of assignable dynamic groups' names to be created in this group.
Returns:
Set of assignable dynamic group objects created
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

createAssignableDynamicGroups

public java.util.Set createAssignableDynamicGroups(java.util.Map groups)
                                            throws AMException,
                                                   SSOException
Creates assignable dynamic groups and initializes their attributes.
Parameters:
groups - Map where the key is the name of the assignable dynamic group, and the value is a Map to represent Attribute-Value Pairs
Returns:
Set of assignable dynamic group objects created
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

getGroupDNs

public java.util.Set getGroupDNs(int level)
                          throws AMException,
                                 SSOException
Gets the groups in this group. It returns groups either at one level or a whole subtree.
Parameters:
level - the level (AMConstants.SCOPE_ONE or AMConstants.SCOPE_SUB) for returning groups
Returns:
The group DNs in this group.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store or if the level is invalid
SSOException - if the sign on is no longer valid

getNumberOfGroups

public long getNumberOfGroups(int level)
                       throws AMException,
                              SSOException
Gets number of groups in the group. It returns number of groups either at one level or a whole subtree.
Parameters:
level - the level(AMConstants.SCOPE_ONE or AMConstants.SCOPE_SUB) for returning groups
Returns:
Number of groups in the group.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

deleteStaticGroups

public void deleteStaticGroups(java.util.Set groupDNs)
                        throws AMException,
                               SSOException
Deletes static groups in this group.
Parameters:
groups - The set of static group DN's to be deleted from this group.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

deleteDynamicGroups

public void deleteDynamicGroups(java.util.Set groupDNs)
                         throws AMException,
                                SSOException
Deletes dynamic groups in this group.
Parameters:
groups - The set of dynamic group DN's to be deleted from this group.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

deleteAssignableDynamicGroups

public void deleteAssignableDynamicGroups(java.util.Set groupDNs)
                                   throws AMException,
                                          SSOException
Deletes assignable dynamic groups in this group.
Parameters:
groups - The set of assignable dynamic group DN's to be deleted from this group.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

searchGroups

public java.util.Set searchGroups(java.lang.String wildcard,
                                  int level)
                           throws AMException,
                                  SSOException
Searches for groups in this group using wildcards. Wildcards can be specified such as a*, *, *a.
Parameters:
wildcard - wildcard pattern to be used in the search
level - the search level that needs to be used (AMConstants.SCOPE_ONE or AMConstants.SCOPE_TREE)
Returns:
Set of DNs of sub groups matching the search
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

searchGroups

public java.util.Set searchGroups(java.lang.String wildcard,
                                  java.util.Map avPairs,
                                  int level)
                           throws AMException,
                                  SSOException
Searches for groups in this group using wildcards and attribute values. Wildcards can be specified such as a*, *, *a.
Parameters:
wildcard - wildcard pattern to be used in the search
avPairs - attribute-value pairs to match when searching groups
level - the search level that needs to be used (AMConstants.SCOPE_ONE or AMConstants.SCOPE_TREE)
Returns:
Set of DNs of groups matching the search
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

searchGroups

public AMSearchResults searchGroups(java.lang.String wildcard,
                                    java.util.Map avPairs,
                                    com.iplanet.am.sdk.AMSearchControl searchControl)
                             throws AMException,
                                    SSOException
Searches for groups in this group using wildcards and attribute values. Wildcards can be specified such as a*, *, *a.
Parameters:
wildcard - wildcard pattern to be used in the search
avPairs - attribute-value pairs to match when searching groups
searchControl - specifies the search scope to be used
Returns:
AMSearchResults which contains Set a of DNs of groups matching the search
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid