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 LeafConstraint
extract(Map<?,?> map, String key)
Create aLeafConstraint
instance from an object in the given map.String
getValue()
Get the value of"value"
.String[]
getValues()
Get the value of"values"
.boolean
isEssential()
Get the value of"essential"
void
setEssential(boolean essential)
Set the value of"essential"
void
setValue(String value)
Set the value of"value"
.void
setValues(String[] values)
Set the value of"values"
.Map<String,Object>
toMap()
Create aMap
instance 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 aLeafConstraint
instance 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
LeafConstraint
instance that represents a constraint. Even if the map does not contain the given key, an instance ofLeafConstraint
is 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:BaseConstraint
Create aMap
instance 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:
toMap
in classBaseConstraint
- Returns:
- A
Map
instance that represents this object. IfBaseConstraint.exists()
returnsfalse
orBaseConstraint.isNull()
returnstrue
, this method returns null.
-
-