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 Details

    • includeOnlyIDPs

      public static Predicate<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<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<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(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(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