Class DefaultOperation
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.federation.policy.operations.DefaultOperation
-
- All Implemented Interfaces:
BooleanConfiguration
,PolicyConfiguration
,PolicyOperation
,StringConfiguration
,StringListConfiguration
,UntypedOperation
public class DefaultOperation extends Object implements PolicyOperation, BooleanConfiguration, StringConfiguration, StringListConfiguration, UntypedOperation
Default (default) value operation.Example policy:
"require_auth_time": { "default" : true }
Related specifications:
- OpenID Connect Federation 1.0, section 4.1.6.
-
-
Field Summary
Fields Modifier and Type Field Description static OperationName
NAME
-
Constructor Summary
Constructors Constructor Description DefaultOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
apply(Object value)
Applies an untyped operation.void
configure(boolean parameter)
Configures.void
configure(String parameter)
Configure.void
configure(List<String> parameter)
Configures.boolean
getBooleanConfiguration()
Gets the boolean configuration.OperationName
getOperationName()
Returns the name identifying the policy operation.String
getStringConfiguration()
Gets the string configuration.List<String>
getStringListConfiguration()
Gets the string list configuration.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
-
DefaultOperation
public DefaultOperation()
-
-
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 parameter)
Description copied from interface:BooleanConfiguration
Configures.- Specified by:
configure
in interfaceBooleanConfiguration
- Parameters:
parameter
- The parameter.
-
configure
public void configure(String parameter)
Description copied from interface:StringConfiguration
Configure.- Specified by:
configure
in interfaceStringConfiguration
- Parameters:
parameter
- The string configuration parameter. Must not benull
.
-
configure
public void configure(List<String> parameter)
Description copied from interface:StringListConfiguration
Configures.- Specified by:
configure
in interfaceStringListConfiguration
- Parameters:
parameter
- The string list configuration parameter. Must not benull
.
-
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.
-
getStringConfiguration
public String getStringConfiguration()
Description copied from interface:StringConfiguration
Gets the string configuration.- Specified by:
getStringConfiguration
in interfaceStringConfiguration
- Returns:
- The string configuration parameter.
-
getStringListConfiguration
public List<String> getStringListConfiguration()
Description copied from interface:StringListConfiguration
Gets the string list configuration.- Specified by:
getStringListConfiguration
in interfaceStringListConfiguration
- Returns:
- The string list 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)
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.
-
-