Class EssentialOperation
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.federation.policy.operations.EssentialOperation
-
- All Implemented Interfaces:
BooleanConfiguration
,PolicyConfiguration
,PolicyOperation
,UntypedOperation
public class EssentialOperation extends Object implements PolicyOperation, BooleanConfiguration, UntypedOperation
Default (default) value operation.Example policy:
"tos_uri" : { "essential" : true }
Related specifications:
- OpenID Connect Federation 1.0, section 4.1.7.
-
-
Field Summary
Fields Modifier and Type Field Description static OperationName
NAME
-
Constructor Summary
Constructors Constructor Description EssentialOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
apply(Object value)
Applies an untyped operation.void
configure(boolean enable)
Configures.boolean
getBooleanConfiguration()
Gets the boolean configuration.OperationName
getOperationName()
Returns the name identifying the policy operation.PolicyOperation
merge(PolicyOperation other)
Merges a policy operation.void
parseConfiguration(Object jsonEntity)
Parses a federation policy operation configuration from the specified JSON entity.Map.Entry<String,Object>
toJSONObjectEntry()
Returns a JSON object entry representation of the policy operation.
-
-
-
Field Detail
-
NAME
public static final OperationName NAME
-
-
Constructor Detail
-
EssentialOperation
public EssentialOperation()
-
-
Method Detail
-
getOperationName
public OperationName getOperationName()
Description copied from interface:PolicyOperation
Returns the name identifying the policy operation.- Specified by:
getOperationName
in interfacePolicyOperation
- Returns:
- The operation name.
-
configure
public void configure(boolean enable)
Description copied from interface:BooleanConfiguration
Configures.- Specified by:
configure
in interfaceBooleanConfiguration
- Parameters:
enable
- The parameter.
-
parseConfiguration
public void parseConfiguration(Object jsonEntity) throws ParseException
Description copied from interface:PolicyOperation
Parses a federation policy operation configuration from the specified JSON entity.- Specified by:
parseConfiguration
in interfacePolicyOperation
- Parameters:
jsonEntity
- The JSON entity, must represent a boolean, number, string, array or object.null
if not specified.- Throws:
ParseException
- On a parse exception.
-
toJSONObjectEntry
public Map.Entry<String,Object> toJSONObjectEntry()
Description copied from interface:PolicyOperation
Returns a JSON object entry representation of the policy operation.- Specified by:
toJSONObjectEntry
in interfacePolicyOperation
- Returns:
- The JSON object entry, with a boolean, number, string, array or object value.
-
getBooleanConfiguration
public boolean getBooleanConfiguration()
Description copied from interface:BooleanConfiguration
Gets the boolean configuration.- Specified by:
getBooleanConfiguration
in interfaceBooleanConfiguration
- Returns:
- The boolean configuration parameter.
-
merge
public PolicyOperation merge(PolicyOperation other) throws PolicyViolationException
Description copied from interface:PolicyOperation
Merges a policy operation.- Specified by:
merge
in interfacePolicyOperation
- Parameters:
other
- The policy to merge. Must be of the same type and notnull
.- Returns:
- The resulting new policy operation.
- Throws:
PolicyViolationException
- On a merge exception.
-
apply
public Object apply(Object value) throws PolicyViolationException
Description copied from interface:UntypedOperation
Applies an untyped operation.- Specified by:
apply
in interfaceUntypedOperation
- Parameters:
value
- The value,null
if not specified.- Returns:
- The resulting value, must represent a valid JSON entity such as boolean, number, string, array or object.
- Throws:
PolicyViolationException
- On a policy violation.
-
-