com.ibm.jarm.api.security

Interface RMRole



  • public interface RMRole
    Represents a function access control role consisting of a collection of RMPrincipal members for the custom Role class.
    • Method Detail

      • getObjectIdentity

        java.lang.String getObjectIdentity()
        Provides a unique, repository-specific ID for the role. This value typically takes the form of a GUID String.
        Returns:
        A String value.
      • getRoleName

        java.lang.String getRoleName()
        Returns the RoleName property value.
        Returns:
        A String value.
      • getApplicationName

        java.lang.String getApplicationName()
        Returns the ApplicationName property value.
        Returns:
        A String value.
      • getRoleType

        java.lang.String getRoleType()
        Returns the RoleType property value.
        Returns:
        A String value.
      • getDescription

        java.lang.String getDescription()
        Returns the Description property value.
        Returns:
        A String value.
      • setDescription

        void setDescription(java.lang.String description)
        Defines an optional description.
        Parameters:
        description - a String value. This entry can be null.
        Throws:
        RAL_INSUFFICIENT_RIGHTS_TO_ACCESS_ROLE - if the current user does not have permission to access or update this role.
        RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED - if an unexpected retrieval error occurred.
      • addMember

        void addMember(RMPrincipal principal)
        Adds given RMPrincipal to this RMRole. This entry has no effect if the given principal is already in this role.
        Parameters:
        principal - the RMPrincipal to add. Cannot be null.
        Throws:
        RAL_INSUFFICIENT_RIGHTS_TO_ACCESS_ROLE - if the current user does not have permission to access or update this role.
        RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED - if an unexpected retrieval error occurred.
      • removeMember

        void removeMember(RMPrincipal principal)
        Removes the specified RMPrincipal from this RMRole. This entry has no effect if the given principal is not a member of this role.
        Parameters:
        principal - the RMPrincipal to remove. Cannot be null.
        Throws:
        RAL_INSUFFICIENT_RIGHTS_TO_ACCESS_ROLE - if the current user does not have permission to access or update this role.
        RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED - if an unexpected retrieval error occurred.
      • getMembers

        java.util.List<RMPrincipal> getMembers()
        Returns the collection of RMPrincipal instances belonging to this RMRole.
        Returns:
        A List of RMPrincipal. Can be empty.
        Throws:
        RAL_INSUFFICIENT_RIGHTS_TO_ACCESS_ROLE - if the current user does not have permission to retrieve roles.
        RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED - if an unexpected retrieval error occurred.
      • isCurrentUserInRole

        boolean isCurrentUserInRole()
        Indicates whether the current user is a member of this RMRole. The current user is defined as the javax.security.auth.Subject instance associated with the current thread.
        Returns:
        true if the current user is a member of this role, false otherwise.
        Throws:
        RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED - if an unexpected retrieval error occurred.
      • isPrincipalInRole

        boolean isPrincipalInRole(RMPrincipal principal)
        Indicates whether a specific principal is a member of this RMRole.
        Parameters:
        principal - the RMPrincipal to be checked against the role membership.
        Returns:
        true if the principal is a member of this role, false otherwise.
      • delete

        void delete()
        Deletes this RMRole from the repository.
        Throws:
        RAL_INSUFFICIENT_RIGHTS_TO_ACCESS_ROLE - if the current user does not have permission to retrieve or update roles.
        RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED - if an unexpected retrieval error occurred.
      • getPrivileges

        java.lang.String getPrivileges()
        Returns a String version of the Privileges property value.
        Returns:
        A String value.
      • setPrivileges

        void setPrivileges(java.lang.String privileges)
        Sets the Privileges property value.
        Parameters:
        privileges - the String version of the Privileges property value.
        Throws:
        RAL_INSUFFICIENT_RIGHTS_TO_ACCESS_ROLE - if the current user does not have permission to retrieve or update roles.
        RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED - if an unexpected retrieval error occurred.

© Copyright IBM Corp. 2010, 2013. All Rights Reserved.