Class SchemaValidationFilter

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, MetadataFilter

public class SchemaValidationFilter extends AbstractMetadataFilter
A metadata filter that schema validates an incoming metadata file.
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • samlSchemaBuilder

      @Nonnull private SAMLSchemaBuilder samlSchemaBuilder
      SAML schema source.
  • Constructor Details

    • SchemaValidationFilter

      public SchemaValidationFilter(@Nonnull @ParameterName(name="builder") SAMLSchemaBuilder builder)
      Constructor.
      Parameters:
      builder - SAML schema source to use
  • Method Details

    • filter

      @Nullable public XMLObject filter(@Nullable XMLObject metadata, @Nonnull MetadataFilterContext context) throws FilterException
      Filters the given metadata, perhaps to remove elements that are not wanted.
      Parameters:
      metadata - the metadata to be filtered.
      context - the metadata filter context
      Returns:
      the filtered XMLObject, which may or may not be the same as the XMLObject instance passed in to the method. Maybe be null, for example if the top-level element was removed by the filter.
      Throws:
      FilterException - thrown if an error occurs during the filtering process