Class LeafConstraint
- java.lang.Object
-
- com.authlete.common.assurance.constraint.BaseConstraint
-
- com.authlete.common.assurance.constraint.LeafConstraint
-
- All Implemented Interfaces:
Constraint
- Direct Known Subclasses:
TimeConstraint,VerifiedClaimConstraint
public class LeafConstraint extends BaseConstraint
The class that represents the basic set of constraints defined in "5.5.1. Individual Claims Requests".{ "essential": boolean, "value": string, "values": string array }- Since:
- 2.63
-
-
Constructor Summary
Constructors Constructor Description LeafConstraint()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LeafConstraintextract(Map<?,?> map, String key)Create aLeafConstraintinstance from an object in the given map.StringgetValue()Get the value of"value".String[]getValues()Get the value of"values".booleanisEssential()Get the value of"essential"voidsetEssential(boolean essential)Set the value of"essential"voidsetValue(String value)Set the value of"value".voidsetValues(String[] values)Set the value of"values".Map<String,Object>toMap()Create aMapinstance that represents this object in the way conforming to the structure defined in 5.
-
-
-
Method Detail
-
isEssential
public boolean isEssential()
Get the value of"essential"- Returns:
- The value of
"essential".
-
setEssential
public void setEssential(boolean essential)
Set the value of"essential"- Parameters:
essential- The value of"essential".
-
getValue
public String getValue()
Get the value of"value".- Returns:
- The value of
"value".
-
setValue
public void setValue(String value)
Set the value of"value".- Parameters:
value- The value of"value".
-
getValues
public String[] getValues()
Get the value of"values".- Returns:
- The value of
"values".
-
setValues
public void setValues(String[] values)
Set the value of"values".- Parameters:
value- The value of"values".
-
extract
public static LeafConstraint extract(Map<?,?> map, String key) throws ConstraintException
Create aLeafConstraintinstance from an object in the given map.- Parameters:
map- A map that may contain a constraint.key- The key that identifies the object in the map.- Returns:
- A
LeafConstraintinstance that represents a constraint. Even if the map does not contain the given key, an instance ofLeafConstraintis returned. - Throws:
ConstraintException- The structure of the map does not conform to the specification (OpenID Connect for Identity Assurance 1.0).
-
toMap
public Map<String,Object> toMap()
Description copied from class:BaseConstraintCreate aMapinstance that represents this object in the way conforming to the structure defined in 5. Requesting Verified Claims of OpenID Connect for Identity Assurance 1.0.- Overrides:
toMapin classBaseConstraint- Returns:
- A
Mapinstance that represents this object. IfBaseConstraint.exists()returnsfalseorBaseConstraint.isNull()returnstrue, this method returns null.
-
-