Class EgressFilterSequence

java.lang.Object
org.faceless.publisher.type.EgressFilterSequence
All Implemented Interfaces:
EgressFilter

public class EgressFilterSequence extends Object implements EgressFilter
An implementation of EgressFilter which delegates to chain of other filters. The filters will be run in sequence, and if any reject the URI it will be rejected, otherwise the rewrite(org.faceless.publisher.type.URL2, org.faceless.publisher.type.URL2) method will be called on each and the final value returned.
  • Constructor Details

    • EgressFilterSequence

      public EgressFilterSequence(Collection<EgressFilter> filters)
      Create a new EgressFilter from the supplied sequence
      Parameters:
      filters - the filters
    • EgressFilterSequence

      public EgressFilterSequence(EgressFilter... filters)
      Create a new EgressFilter from the supplied sequence
      Parameters:
      filters - the filters
  • Method Details

    • rewrite

      public URL2 rewrite(URL2 uri, URL2 base)
      Description copied from interface: EgressFilter
      This method will be supplied with the URL about to be loaded, and the base URL of the Document loading it. It can return the URL as it is to load it, a rewritten URL to load a new resource instead, or null to disallow the load.
      Specified by:
      rewrite in interface EgressFilter
      Parameters:
      uri - the destination URL
      base - the URL of the document, or null if we're testing the base URL of the document
      Returns:
      the URL to load, or null to disallow access
    • getEgressFilters

      public List<EgressFilter> getEgressFilters()
      Return the list of Filters supplied to the constructor
    • toString

      public String toString()
      Overrides:
      toString in class Object