Class LeafEntityTypeConstraint
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.federation.trust.constraints.LeafEntityTypeConstraint
-
@Immutable public final class LeafEntityTypeConstraint extends Object
Leaf entity type constraint.Related specifications:
- OpenID Connect Federation 1.0, section 5.2.3.
-
-
Field Summary
Fields Modifier and Type Field Description static LeafEntityTypeConstraint
ANY
Any leaf entity types allowed constant.
-
Constructor Summary
Constructors Constructor Description LeafEntityTypeConstraint(Set<EntityType> allowed)
Creates a new leaf entity type constraint.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowsAny()
Returnstrue
if any leaf entity types are allowed.boolean
equals(Object o)
Set<EntityType>
getAllowed()
Returns the allowed leaf entity types.List<String>
getAllowedAsStringList()
Returns the allowed leaf entity types as a string list.int
hashCode()
boolean
isAllowed(EntityType type)
Returnstrue
if the specified entity type is allowed for a leaf entity.static LeafEntityTypeConstraint
parse(List<String> values)
Parses a leaf entity type constraint.String
toString()
-
-
-
Field Detail
-
ANY
public static final LeafEntityTypeConstraint ANY
Any leaf entity types allowed constant.
-
-
Constructor Detail
-
LeafEntityTypeConstraint
public LeafEntityTypeConstraint(Set<EntityType> allowed)
Creates a new leaf entity type constraint.- Parameters:
allowed
- The allowed leaf entity types,null
or empty for any.
-
-
Method Detail
-
allowsAny
public boolean allowsAny()
Returnstrue
if any leaf entity types are allowed.- Returns:
true
if any leaf entity types are allowed.
-
getAllowed
public Set<EntityType> getAllowed()
Returns the allowed leaf entity types.- Returns:
- The allowed leaf entity types,
null
for any.
-
getAllowedAsStringList
public List<String> getAllowedAsStringList()
Returns the allowed leaf entity types as a string list.- Returns:
- The allowed leaf entity types as a string list,
null
for any.
-
isAllowed
public boolean isAllowed(EntityType type)
Returnstrue
if the specified entity type is allowed for a leaf entity.- Parameters:
type
- The entity type.- Returns:
true
if the entity type is allowed, elsefalse
.
-
parse
public static LeafEntityTypeConstraint parse(List<String> values) throws ParseException
Parses a leaf entity type constraint.- Parameters:
values
- The string values,null
if not specified.- Returns:
- The parsed leaf entity type constraint.
- Throws:
ParseException
- If parsing failed.
-
-