Interface ResourceAttribute


@SupportedAll public interface ResourceAttribute
Encapsulates a Strategy to derive attributes to be returned with a particular Entitlement when evaluating Privileges. For example, these may be statically defined (StaticAttributes) or derived from the Subject's account details (UserAttributes).
  • Method Details

    • setPropertyName

      void setPropertyName(String name)
      Sets property name.
      Parameters:
      name - property name.
    • getPropertyName

      String getPropertyName()
      Returns property name.
      Returns:
      name property name.
    • getPropertyValues

      Set<String> getPropertyValues()
      Returns property values.
      Returns:
      properties for this ResourceAttribute.
    • evaluate

      Map<String,Set<String>> evaluate(Subject adminSubject, String realm, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
      Returns resource attributes applicable to the request.
      Parameters:
      adminSubject - Subject who is performing the evaluation.
      realm - Realm name.
      subject - Subject who is under evaluation.
      resourceName - Resource name.
      environment - Environment parameters.
      Returns:
      applicable resource attributes.
      Throws:
      EntitlementException - if a condition decision cannot be reached.
    • setPResponseProviderName

      @Deprecated void setPResponseProviderName(String pResponseProviderName)
      Deprecated.
      Sets OpenAM policy response provider name of the object.
      Parameters:
      pResponseProviderName - response provider name as used in OpenAM policy, this is relevant only when StaticAttributes was created from OpenAM policy Subject
    • getPResponseProviderName

      @Deprecated String getPResponseProviderName()
      Deprecated.
      Returns OpenAM policy response provider name of the object
      Returns:
      response provider name as used in OpenAM policy, this is relevant only when StaticAttributes were created from OpenAM policy Subject
    • getState

      String getState()
      Returns state of the object encoded as a JSON string.
      Returns:
      state of the object encoded as a JSON string.
    • setState

      void setState(String state)
      Sets state of this object from a JSON string.
      Parameters:
      state - State of the object encoded as a JSON string