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 5.1.2.
-
-
Field Summary
Fields Modifier and Type Field Description static OperationNameNAME
-
Constructor Summary
Constructors Constructor Description EssentialOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectapply(Object value)Applies an untyped operation.voidconfigure(boolean enable)Configures.booleangetBooleanConfiguration()Gets the boolean configuration.OperationNamegetOperationName()Returns the name identifying the policy operation.PolicyOperationmerge(PolicyOperation other)Merges a policy operation.voidparseConfiguration(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:PolicyOperationReturns the name identifying the policy operation.- Specified by:
getOperationNamein interfacePolicyOperation- Returns:
- The operation name.
-
configure
public void configure(boolean enable)
Description copied from interface:BooleanConfigurationConfigures.- Specified by:
configurein interfaceBooleanConfiguration- Parameters:
enable- The parameter.
-
parseConfiguration
public void parseConfiguration(Object jsonEntity) throws ParseException
Description copied from interface:PolicyOperationParses a federation policy operation configuration from the specified JSON entity.- Specified by:
parseConfigurationin interfacePolicyOperation- Parameters:
jsonEntity- The JSON entity, must represent a boolean, number, string, array or object.nullif not specified.- Throws:
ParseException- On a parse exception.
-
toJSONObjectEntry
public Map.Entry<String,Object> toJSONObjectEntry()
Description copied from interface:PolicyOperationReturns a JSON object entry representation of the policy operation.- Specified by:
toJSONObjectEntryin interfacePolicyOperation- Returns:
- The JSON object entry, with a boolean, number, string, array or object value.
-
getBooleanConfiguration
public boolean getBooleanConfiguration()
Description copied from interface:BooleanConfigurationGets the boolean configuration.- Specified by:
getBooleanConfigurationin interfaceBooleanConfiguration- Returns:
- The boolean configuration parameter.
-
merge
public PolicyOperation merge(PolicyOperation other) throws PolicyViolationException
Description copied from interface:PolicyOperationMerges a policy operation.- Specified by:
mergein 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:UntypedOperationApplies an untyped operation.- Specified by:
applyin interfaceUntypedOperation- Parameters:
value- The value,nullif 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.
-
-