Package com.sun.identity.entitlement
Interface ResourceAttribute
Encapsulates a Strategy to derive attributes to be returned with a particular
Entitlement
when evaluating Privilege
s.
For example, these may be statically defined (StaticAttributes
)
or derived from the Subject
's account details (UserAttributes
).-
Method Summary
Modifier and TypeMethodDescriptionevaluate
(Subject adminSubject, String realm, Subject subject, String resourceName, Map<String, Set<String>> environment) Returns resource attributes applicable to the request.Deprecated.Returns property name.Returns property values.getState()
Returns state of the object encoded as a JSON string.void
setPResponseProviderName
(String pResponseProviderName) Deprecated.void
setPropertyName
(String name) Sets property name.void
Sets state of this object from a JSON string.
-
Method Details
-
setPropertyName
Sets property name.- Parameters:
name
- property name.
-
getPropertyName
String getPropertyName()Returns property name.- Returns:
- name property name.
-
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 EntitlementExceptionReturns 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.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.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
Sets state of this object from a JSON string.- Parameters:
state
- State of the object encoded as a JSON string
-