Class MetadataFilterChain

  • All Implemented Interfaces:
    MetadataFilter

    public class MetadataFilterChain
    extends Object
    implements MetadataFilter
    A filter that allows the composition of MetadataFilters. Filters will be executed on the given metadata document in the order they were added to the chain.
    • Field Detail

      • log

        @Nonnull
        private org.slf4j.Logger log
        Class logger.
      • filters

        @Nonnull
        @NonnullElements
        private List<MetadataFilter> filters
        Registered filters.
    • Constructor Detail

      • MetadataFilterChain

        public MetadataFilterChain()
        Constructor.
    • Method Detail

      • filter

        @Nullable
        public final org.opensaml.core.xml.XMLObject filter​(@Nullable
                                                            org.opensaml.core.xml.XMLObject xmlObject,
                                                            @Nonnull
                                                            MetadataFilterContext context)
                                                     throws FilterException
        Filters the given metadata, perhaps to remove elements that are not wanted.
        Specified by:
        filter in interface MetadataFilter
        Parameters:
        xmlObject - 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
      • getFilters

        @Nonnull
        @NonnullElements
        @Live
        public List<MetadataFilter> getFilters()
        Get the list of MetadataFilters that make up this chain.
        Returns:
        the filters that make up this chain
      • setFilters

        public void setFilters​(@Nonnull @NonnullElements
                               List<MetadataFilter> newFilters)
        Set the list of MetadataFilters that make up this chain.
        Parameters:
        newFilters - list of MetadataFilters that make up this chain