Interface AMRole

  • All Superinterfaces:
    AMConstants, AMObject
    All Known Subinterfaces:
    AMFilteredRole

    public interface AMRole
    extends AMObject
    Deprecated.
    As of Sun Java System Access Manager 7.1.

    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 Detail

      • TOP_LEVEL_ADMIN_ROLE

        static final int TOP_LEVEL_ADMIN_ROLE
        Deprecated.
        Represents a Top Level Administrative Role
        See Also:
        Constant Field Values
      • GENERAL_ADMIN_ROLE

        static final int GENERAL_ADMIN_ROLE
        Deprecated.
        Represents a General Administrative Role
        See Also:
        Constant Field Values
      • USER_ROLE

        static final int USER_ROLE
        Deprecated.
        Represents a User Role
        See Also:
        Constant Field Values
    • Method Detail

      • getRoleType

        int getRoleType()
                 throws AMException,
                        SSOException
        Deprecated.
        Gets the type of the role.
        Returns:
        One of the possible values:
        • USER_ROLE
        • GENERAL_ADMIN_ROLE
        • TOP_LEVEL_ADMIN_ROLE
        Throws:
        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
      • setRoleType

        void setRoleType​(int roleType)
                  throws AMException,
                         SSOException
        Deprecated.
        Sets the type of the role.
        Parameters:
        roleType - The type of the role.
        Throws:
        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
      • addUsers

        void addUsers​(Set users)
               throws AMException,
                      SSOException
        Deprecated.
        Adds users to the role.
        Parameters:
        users - The set of user DN's to be added to the role.
        Throws:
        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
      • removeUsers

        void removeUsers​(Set users)
                  throws AMException,
                         SSOException
        Deprecated.
        Removes users from the role.
        Parameters:
        users - The set of user DN's to be removed from the role.
        Throws:
        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
      • getNumberOfUsers

        long getNumberOfUsers()
                       throws AMException,
                              SSOException
        Deprecated.
        Gets number of users in the role.
        Returns:
        Number of users in the role.
        Throws:
        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
      • getUserDNs

        Set getUserDNs()
                throws AMException,
                       SSOException
        Deprecated.
        Gets the DNs of users in the role.
        Returns:
        The DNs of users in the role.
        Throws:
        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
      • searchUsers

        Set searchUsers​(String wildcard,
                        int level)
                 throws AMException,
                        SSOException
        Deprecated.
        Searches for users in this role using wildcards and attribute values. 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_SUB)
        Returns:
        Set 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 single sign on token is no longer valid
      • searchUsers

        AMSearchResults searchUsers​(String wildcard,
                                    AMSearchControl searchControl)
                             throws AMException,
                                    SSOException
        Deprecated.
        Searches for users in this people container using wildcards and attribute values. Wildcards can be specified such as a*, *, *a.
        Parameters:
        wildcard - wildcard pattern to be used in the search
        searchControl - specifies the search scope to be used, VLV ranges etc.,
        Returns:
        AMSearchResults which contains a Set 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 single sign on token is no longer valid
      • searchUsers

        Set searchUsers​(String wildcard,
                        Map avPairs,
                        int level)
                 throws AMException,
                        SSOException
        Deprecated.
        Searches for users in this role using wildcards and attribute values. Wildcards can be specified such as a*, *, *a. To further refine the search, attribute-value pairs can be specified so that DNs of users with matching attribute-value pairs will be returned.
        Parameters:
        wildcard - wildcard pattern to be used in the search
        avPairs - attribute-value pairs to match when searching users
        level - the search level that needs to be used ( AMConstants.SCOPE_ONE or AMConstants.SCOPE_SUB)
        Returns:
        Set 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 single sign on token is no longer valid
      • searchUsers

        AMSearchResults searchUsers​(String wildcard,
                                    Map avPairs,
                                    AMSearchControl searchControl)
                             throws AMException,
                                    SSOException
        Deprecated.
        Searches for users in this group using wildcards and attribute values. Wildcards can be specified such as a*, *, *a. To further refine the search, attribute-value pairs can be specified so that DNs of users with matching attribute-value pairs will be returned.
        Parameters:
        wildcard - wildcard pattern to be used in the search
        avPairs - attribute-value pairs to match when searching users
        searchControl - specifies the search scope to be used, VLV ranges etc.
        Returns:
        AMSearchResults which contains a 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 single sign on token is no longer valid
      • searchUsers

        AMSearchResults searchUsers​(AMSearchControl searchControl,
                                    String avfilter)
                             throws AMException,
                                    SSOException
        Deprecated.
        Searches for users in this role 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 logical AND 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 single sign on token is no longer valid.
      • getTemplates

        Set getTemplates​(Map templateReqs)
                  throws AMException,
                         SSOException
        Deprecated.
        Get requested templates defined for this role.
        Parameters:
        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_TEMPLATES
        Returns:
        a Set of AMTemplate 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.
        Throws:
        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.
      • getPolicyTemplates

        Set getPolicyTemplates​(Set serviceNames)
                        throws AMException,
                               SSOException
        Deprecated.
        Get requested policy templates defined for this role.
        Parameters:
        serviceNames - a Set of services names, each specified as a java.lang.String.
        Returns:
        set of 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.
        Throws:
        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.
      • getAssignedPolicyDNs

        Set getAssignedPolicyDNs()
                          throws AMException,
                                 SSOException
        Deprecated.
        Gets all the assigned policies created for this role
        Returns:
        Set a set of assigned policy DNs
        Throws:
        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.