| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
 The Role interface provides methods to manage role
 AMRole objects can be obtained by using 
 AMStoreConnection.
 A handle to this object can be obtained by using the DN of the object.
 
          AMStoreConnection amsc = new AMStoreConnection(ssotoken);
          if (amsc.doesEntryExist(rDN)) {
              AMRole role = amsc.getRole(rDN);
          }
 
| Field Summary | |
| static int | GENERAL_ADMIN_ROLERepresents a General Administrative Role | 
| static int | TOP_LEVEL_ADMIN_ROLERepresents a Top Level Administrative Role | 
| static int | USER_ROLERepresents a User Role | 
| Fields inherited from interface com.iplanet.am.sdk.AMObject | 
| ACTIVE, ACTIVE_VALUE, ASSIGNABLE_DYNAMIC_GROUP, DELETED, DELETED_VALUE, DYNAMIC_GROUP, FILTERED_ROLE, GROUP, GROUP_CONTAINER, GROUP_PROFILE, INACTIVE, INACTIVE_VALUE, MANAGED_ROLE, ORGANIZATION, ORGANIZATIONAL_UNIT, PEOPLE_CONTAINER, POLICY, RESOURCE, ROLE, ROLE_PROFILE, SERVICE, STATIC_GROUP, TEMPLATE, UNDETERMINED_OBJECT_TYPE, UNKNOWN_OBJECT_TYPE, USER | 
| Method Summary | |
|  void | addUsers(java.util.Set users)Adds users to the role. | 
|  java.util.Set | getAssignedPolicyDNs()Gets all the assigned policies created for this role | 
|  long | getNumberOfUsers()Gets number of users in the role. | 
|  java.util.Set | getPolicyTemplates(java.util.Set serviceNames)Get requested policy templates defined for this role. | 
|  int | getRoleType()Gets the type of the role. | 
|  java.util.Set | getTemplates(java.util.Map templateReqs)Get requested templates defined for this role. | 
|  java.util.Set | getUserDNs()Gets the DNs of users in the role. | 
|  void | removeUsers(java.util.Set users)Removes users from the role. | 
|  AMSearchResults | searchUsers(AMSearchControl searchControl,
            java.lang.String avfilter)Searches for users in this role using attribute values. | 
|  AMSearchResults | searchUsers(java.lang.String wildcard,
            AMSearchControl searchControl)Searches for users in this people container using wildcards and attribute values. | 
|  java.util.Set | searchUsers(java.lang.String wildcard,
            int level)Searches for users in this role using wildcards and attribute values. | 
|  AMSearchResults | searchUsers(java.lang.String wildcard,
            java.util.Map avPairs,
            AMSearchControl searchControl)Searches for users in this group using wildcards and attribute values. | 
|  java.util.Set | searchUsers(java.lang.String wildcard,
            java.util.Map avPairs,
            int level)Searches for users in this role using wildcards and attribute values. | 
|  void | setRoleType(int roleType)Sets the type of the role. | 
| Field Detail | 
public static final int TOP_LEVEL_ADMIN_ROLE
public static final int GENERAL_ADMIN_ROLE
public static final int USER_ROLE
| Method Detail | 
public int getRoleType()
                throws AMException,
                       SSOException
USER_ROLE
   GENERAL_ADMIN_ROLE
   TOP_LEVEL_ADMIN_ROLE
 AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public void setRoleType(int roleType)
                 throws AMException,
                        SSOException
roleType - The type of the role.AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public void addUsers(java.util.Set users)
              throws AMException,
                     SSOException
users - The set of user DN's to be added to the role.AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public void removeUsers(java.util.Set users)
                 throws AMException,
                        SSOException
users - The set of user DN's to be removed from the role.AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public long getNumberOfUsers()
                      throws AMException,
                             SSOException
AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public java.util.Set getUserDNs()
                         throws AMException,
                                SSOException
AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public java.util.Set searchUsers(java.lang.String wildcard,
                                 int level)
                          throws AMException,
                                 SSOException
wildcard - wildcard pattern to be used in the searchlevel - the search level that needs to be used
        (AMConstants.SCOPE_ONE or 
        AMConstants.SCOPE_SUB)AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public AMSearchResults searchUsers(java.lang.String wildcard,
                                   AMSearchControl searchControl)
                            throws AMException,
                                   SSOException
wildcard - wildcard pattern to be used in the searchsearchControl - specifies the search scope to be used, VLV
        ranges etc.,AMSearchResults which contains a Set DNs of
         Users matching the search.AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public java.util.Set searchUsers(java.lang.String wildcard,
                                 java.util.Map avPairs,
                                 int level)
                          throws AMException,
                                 SSOException
wildcard - wildcard pattern to be used in the searchavPairs - attribute-value pairs to match when searching userslevel - the search level that needs to be used
        (AMConstants.SCOPE_ONE or 
        AMConstants.SCOPE_SUB)AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public AMSearchResults searchUsers(java.lang.String wildcard,
                                   java.util.Map avPairs,
                                   AMSearchControl searchControl)
                            throws AMException,
                                   SSOException
wildcard - wildcard pattern to be used in the searchavPairs - attribute-value pairs to match when searching userssearchControl - specifies the search scope to be used, VLV
        ranges etc.AMSearchResults which contains a DNs of Users
         matching the search.AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid
public AMSearchResults searchUsers(AMSearchControl searchControl,
                                   java.lang.String avfilter)
                            throws AMException,
                                   SSOException
searchControl - specifies the search scope to be used, VLV
 ranges etc.avfilter - this attribute-value pairs filter will be logical AND
        with user search filter.AMSearchResults which contains a Set DNs of
         Users matching the search.AMException - if there is an internal error in the AM Store.SSOException - if the single sign on token is no longer valid.
public java.util.Set getTemplates(java.util.Map templateReqs)
                           throws AMException,
                                  SSOException
templateReqs - a Map of services names and template types. 
        The key in the Map entry is the service name 
        as a String, and the value of the Map entry 
        is a java.lang.Integer whose integer value is one of
        AMTemplate.DYNAMIC_TEMPLATE
        AMTemplate.POLICY_TEMPLATE
        AMTemplate.ORGANIZATION_TEMPLATE
        AMTemplate.ALL_TEMPLATESAMTemplate objects representing the 
         templates requested. If the templateReqs argument
         is null or empty, the returned set will contain the 
         AMTemplates for each registered service which 
         has a template defined. If there is no template defined for
         any registered services for this role, an empty Set will be
         returned.AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid.
public java.util.Set getPolicyTemplates(java.util.Set serviceNames)
                                 throws AMException,
                                        SSOException
serviceNames - a Set of services names, each specified as a
        java.lang.String.AMTemplate objects representing the
         policy templates requested. If the
         serviceNames argument is null or
         empty, the returned set will contain the
         AMTemplates for each registered service which
         has a policy template defined. If there is no
         policy template defined for any registered 
         services for this role, an empty Set will be returned.AMException - if an error is encountered when trying to
         access/retrieve data from the data store.SSOException - if the single sign on token is no longer valid.
public java.util.Set getAssignedPolicyDNs()
                                   throws AMException,
                                          SSOException
AMException - if an error is encountered when trying to
 access/retrieve data from the data storeSSOException - if the single sign on token is no longer valid.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||