Class MetadataProviderPredicates

java.lang.Object
se.swedenconnect.opensaml.saml2.metadata.provider.MetadataProviderPredicates

public class MetadataProviderPredicates extends Object
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 Type
    Method
    Description
    static Predicate<org.opensaml.saml.saml2.metadata.EntityDescriptor>
    Returns a predicate that evaluates to true if the supplied entity descriptor represents an IdP.
    static Predicate<org.opensaml.saml.saml2.metadata.EntityDescriptor>
    Returns a predicate that evaluates to true 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 to true 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • includeOnlyIDPs

      public static Predicate<org.opensaml.saml.saml2.metadata.EntityDescriptor> includeOnlyIDPs()
      Returns a predicate that evaluates to true 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 to true 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

      public static Predicate<org.opensaml.saml.saml2.metadata.EntityDescriptor> includeOnlySPs()
      Returns a predicate that evaluates to true 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 and false 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 and false otherwise