Class MetadataProviderPredicates
java.lang.Object
se.swedenconnect.opensaml.saml2.metadata.provider.MetadataProviderPredicates
A number of predicates that may be installed as filters for a metadata provider.
- Author:
- Martin Lindström (martin@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionstatic Predicate
<org.opensaml.saml.saml2.metadata.EntityDescriptor> Returns a predicate that evaluates totrue
if the supplied entity descriptor represents an IdP.static Predicate
<org.opensaml.saml.saml2.metadata.EntityDescriptor> includeOnlyIDPsAndMe
(String entityID) Returns a predicate that evaluates totrue
if the supplied entity descriptor represents an IdP or if the entity descriptor is "my" entry (typically the SP).static Predicate
<org.opensaml.saml.saml2.metadata.EntityDescriptor> Returns a predicate that evaluates totrue
if the supplied entity descriptor represents an SP.static boolean
isIDP
(org.opensaml.saml.saml2.metadata.EntityDescriptor ed) Tells whether the supplied entity descriptor is an IdP.static boolean
isSP
(org.opensaml.saml.saml2.metadata.EntityDescriptor ed) Tells whether the supplied entity descriptor is an SP.
-
Method Details
-
includeOnlyIDPs
Returns a predicate that evaluates totrue
if the supplied entity descriptor represents an IdP.- Returns:
- predicate for filtering IdPs
-
includeOnlyIDPsAndMe
public static Predicate<org.opensaml.saml.saml2.metadata.EntityDescriptor> includeOnlyIDPsAndMe(String entityID) Returns a predicate that evaluates totrue
if the supplied entity descriptor represents an IdP or if the entity descriptor is "my" entry (typically the SP).- Parameters:
entityID
- the entityID for the entity descriptor to include even if it's not an IdP- Returns:
- predicate for filtering IdPs and "my" entity
-
includeOnlySPs
Returns a predicate that evaluates totrue
if the supplied entity descriptor represents an SP.- Returns:
- predicate for filtering SPs
-
isIDP
public static boolean isIDP(org.opensaml.saml.saml2.metadata.EntityDescriptor ed) Tells whether the supplied entity descriptor is an IdP.- Parameters:
ed
- the entity descriptor to test- Returns:
true
if the entity descriptor represents an IdP andfalse
otherwise
-
isSP
public static boolean isSP(org.opensaml.saml.saml2.metadata.EntityDescriptor ed) Tells whether the supplied entity descriptor is an SP.- Parameters:
ed
- the entity descriptor to test- Returns:
true
if the entity descriptor represents an SP andfalse
otherwise
-