Class ScriptEntitlementInfoWrapper
java.lang.Object
com.sun.identity.saml2.plugins.scripted.wrappers.ScriptEntitlementInfoWrapper
This class wraps around an
EntitlementInfo
object for consumption in scripts. This prevents the script from
calling into methods that are not exposed by the EntitlementInfo interface but may be available in the concrete
class.-
Constructor Summary
ConstructorDescriptionScriptEntitlementInfoWrapper
(com.sun.identity.entitlement.EntitlementInfo entitlementInfo) Create a new ScriptEntitlementInfoWrapper that wraps the providedEntitlementInfo
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getActionValue
(String name) Returns action value.Returns action values.getActionValues
(String name) Returns action values.Returns advices.com.sun.identity.entitlement.Application
getApplication
(Subject adminSubject, String realm) Returns application for this entitlement.Returns application name.Returns attributes.getName()
Returns the name of the entitlement.Returns non normalised resource name.Returns non normalised resource names.Returns resource name.Returns resource names.long
getTTL()
Returns the TTL.boolean
Check whether this entitlement has advice.int
hashCode()
org.json.JSONObject
Returns JSONObject mapping of the object.
-
Constructor Details
-
ScriptEntitlementInfoWrapper
public ScriptEntitlementInfoWrapper(com.sun.identity.entitlement.EntitlementInfo entitlementInfo) Create a new ScriptEntitlementInfoWrapper that wraps the providedEntitlementInfo
.- Parameters:
entitlementInfo
- the entitlement info object to be wrapped
-
-
Method Details
-
getName
Returns the name of the entitlement.- Returns:
- the name of the entitlement
-
getResourceNames
Returns resource names.- Returns:
- resource names.
-
getResourceName
Returns resource name.- Returns:
- resource names.
-
getApplicationName
Returns application name.- Returns:
- application name.
-
getActionValue
Returns action value.- Parameters:
name
- Name of the action.- Returns:
- action values.
-
getActionValues
Returns action values.- Returns:
- action values.
-
getActionValues
Returns action values.- Parameters:
name
- Name of the action.- Returns:
- action values.
-
getAdvices
Returns advices.- Returns:
- Advices.
-
hasAdvice
public boolean hasAdvice()Check whether this entitlement has advice.- Returns:
- Whether this entitlement has any advice.
-
getAttributes
Returns attributes.- Returns:
- Attributes.
-
getTTL
public long getTTL()Returns the TTL.- Returns:
- The TTL in ms
-
toJSONObject
public org.json.JSONObject toJSONObject() throws org.json.JSONExceptionReturns JSONObject mapping of the object.- Returns:
- JSONObject mapping of the object
- Throws:
org.json.JSONException
- if can not map to JSONObject
-
getApplication
public com.sun.identity.entitlement.Application getApplication(Subject adminSubject, String realm) throws EntitlementException Returns application for this entitlement.- Parameters:
adminSubject
- Admin Subject.realm
- Realm Name- Returns:
- application for this entitlement.
- Throws:
EntitlementException
-
getRequestedResourceNames
Returns non normalised resource names. If this has not been set the resource names (which is most probably normalised) will be returned.- Returns:
- Non normalised resource names or if that has not been set, the normalised resource names.
-
getRequestedResourceName
Returns non normalised resource name. If this has not been set the resource name (which is most probably normalised) will be returned.- Returns:
- Non normalised resource name or if that has not been set, the normalised resource name.
-
equals
-
hashCode
public int hashCode()
-