Class Role

java.lang.Object
oracle.iam.identity.rolemgmt.vo.Role
All Implemented Interfaces:
Serializable, Identity

public class Role extends Object implements Identity
The Role class is a value object class to hold the id, attribute name-value pairs of a Role.
In addition to the setters/getters, you can use the following constants from RoleManagerConstants in setAttribute/getAttribute to pass values: {@link #RoleManagerConstants.ROLE_KEY ROLE_KEY}
ROLE_UNIQUE_NAME
ROLE_NAME
ROLE_NAMESPACE
ROLE_DISPLAY_NAME
ROLE_EMAIL
ROLE_DESCRIPTION
ROLE_OWNER_KEY
ROLE_PARENTS
ROLE_MEMBERSHIPS
ACCESS_POLICIES
ORGANIZATIONS_PUBLISHED_TO
CATALOG_ATTRIBUTES
ROLE_USER_MEMBERSHIP_RULE
ROLE_USER_MEMBERSHIP_RULE_SQL
ROLE_PARENT_KEY
ROLE_PARENT_KEY_OPERATION
ROLE_LDAP_GUID
ROLE_LDAP_DN
ROLE_CREATE_DATE
ROLE_UPDATE_DATE
ROLE_UPDATED_BY
ROLE_TID
ROLE_TNAME
ROLE_MTID
See Also:
  • Constructor Details

    • Role

      public Role(String entityId)
      Constructs a Role object with id entityId.
      Parameters:
      entityId - The id of the Role.
    • Role

      public Role(HashMap<String,Object> attrs)
      Constructs a Role object with a map of attribute name-value pairs.
      Parameters:
      attrs - The map of attribute name-value pairs.
    • Role

      public Role(String entityId, HashMap<String,Object> attrs)
      Constructs a Role object with id entityId and a map of attribute name-value pairs.
      Parameters:
      entityId - The id of the Role.
      attrs - The map of attribute name-value pairs.
  • Method Details

    • setAttribute

      public void setAttribute(String attr, Object val)
      Sets the attribute attr and it's value val.
      Specified by:
      setAttribute in interface Identity
      Parameters:
      attr - The attribute that needs to be set.
      val - The value of the attribute.
    • getAttribute

      public Object getAttribute(String attr)
      Get the value of the specified Role attribute attr.
      Specified by:
      getAttribute in interface Identity
      Parameters:
      attr - The attribute whose value is to be returned.
      Returns:
      The value of the attribute.
    • getEntityId

      public String getEntityId()
      Returns id of the Role.
      Specified by:
      getEntityId in interface Identity
      Returns:
      id of the Role.
    • setName

      public void setName(String roleName)
      Set the Role Name attribute with a value roleName.
      Parameters:
      roleName - The Role Name value to be set.
    • getName

      public String getName()
      Get the value of Role Name attribute.
      Returns:
      The value of Role Name attribute
    • setDescription

      public void setDescription(String description)
      Set the Role Description attribute with a value description.
      Parameters:
      description - The Role Description value to be set.
    • getDescription

      public String getDescription()
      Get the value of Role Description attribute.
      Returns:
      The value of Role Description attribute.
    • setDisplayName

      public void setDisplayName(String displayName)
      Set the Role Display Name attribute with a value displayName in the MLS map as base value.
      Parameters:
      displayName - The base Role Display Name value to be set.
    • getDisplayName

      public String getDisplayName()
      Get the base value of Role Display Name attribute.
      Returns:
      The base value of Role Display Name attribute.
    • getUniqueName

      public String getUniqueName()
      Get the value of Role Unique Name attribute.
      Returns:
      The value of Role Unique Name attribute.
    • getNamespace

      public String getNamespace()
      Get the value of Role Namespace attribute.
      Returns:
      The value of Role Namespace attribute.
    • getAttributes

      public HashMap<String,Object> getAttributes()
      Returns a map of all attribute-value pairs for this Role.
      Specified by:
      getAttributes in interface Identity
      Returns:
      A map of all attribute-value pairs for this Role.
    • getAttributeNames

      public Set getAttributeNames()
      Returns a Set of all attribute names for this Role.
      Specified by:
      getAttributeNames in interface Identity
      Returns:
      A Set of all attribute names for this Role.
    • toString

      public String toString()
      Returns the string representation of this Role.
      Specified by:
      toString in interface Identity
      Overrides:
      toString in class Object
      Returns:
      The string representation of this Role.
    • equals

      public boolean equals(Object other)
      Compares if passed object is an instance of Role and has the same id as the passed object.
      Overrides:
      equals in class Object
      Parameters:
      other - The object whose value is to be compared.
      Returns:
      True if other is an instance of Role and has the same id, false otherwise.