Class EndpointMetadataIndex

java.lang.Object
org.opensaml.saml.metadata.resolver.index.impl.EndpointMetadataIndex
All Implemented Interfaces:
MetadataIndex

public class EndpointMetadataIndex extends Object implements MetadataIndex
An implementation of MetadataIndex which indexes entities by their role endpoint locations.

The indexed endpoint location keys are scoped by the containing RoleDescriptor type, Endpoint type, and whether or not the endpoint value was a standard location (Endpoint.getLocation()) or a response location (Endpoint.getResponseLocation()).

  • Field Details

    • log

      @Nonnull private org.slf4j.Logger log
      Logger.
    • endpointSelectionPredicate

      @Nonnull private Predicate<Endpoint> endpointSelectionPredicate
      The predicate which selects which endpoints to index.
  • Constructor Details

    • EndpointMetadataIndex

      public EndpointMetadataIndex()
      Constructor.

      All entity descriptor endpoints will be indexed.

    • EndpointMetadataIndex

      public EndpointMetadataIndex(@Nonnull @ParameterName(name="endpointPredicate") Predicate<Endpoint> endpointPredicate)
      Constructor.
      Parameters:
      endpointPredicate - the predicate which selects which endpoints to index
  • Method Details

    • generateKeys

      @Nullable @Unmodifiable @NotLive public Set<MetadataIndexKey> generateKeys(@Nonnull EntityDescriptor descriptor)
      Generate a set of one or more MetadataIndexKey instances based on the input EntityDescriptor.

      These index key instances reflect the type of indexing performed and "understood" by the implementation, and as such should complement the MetadataIndexKey types generated for descriptor lookup via MetadataIndex.generateKeys(CriteriaSet).

      Specified by:
      generateKeys in interface MetadataIndex
      Parameters:
      descriptor - the entity descriptor set to process
      Returns:
      the set of index keys generated from the criteria. May be null or empty, but will not contain null elements.
    • generateKeys

      @Nullable @Unmodifiable @NotLive public Set<MetadataIndexKey> generateKeys(@Nullable CriteriaSet criteriaSet)
      Generate a set of one or more MetadataIndexKey instances based on the input CriteriaSet.

      These index key instances reflect the type of indexing performed and "understood" by the implementation, and as such should complement the MetadataIndexKey types generated for descriptor indexing via MetadataIndex.generateKeys(EntityDescriptor).

      Specified by:
      generateKeys in interface MetadataIndex
      Parameters:
      criteriaSet - the criteria set to process
      Returns:
      the set of index keys generated from the criteria. May be null or empty, but will not contain null elements.
    • processCriteria

      @Nonnull private Set<MetadataIndexKey> processCriteria(@Nullable CriteriaSet criteriaSet, @Nonnull QName roleType, @Nonnull Endpoint endpoint)
      Process the specified role and endpoint.
      Parameters:
      criteriaSet - the criteria being processed
      roleType - the type of role containing the endpoint
      endpoint - the endpoint to process
      Returns:
      the set of metadata index keys for the endpoint
    • processLocation

      @Nonnull private Set<String> processLocation(@Nullable CriteriaSet criteriaSet, @Nonnull String location)
      Process the specified location.
      Parameters:
      criteriaSet - the criteria being processed
      location - the location to process
      Returns:
      the variants of the location to be indexed