Class AbstractStage<T>

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.AbstractStage<T>
Type Parameters:
T - type of item this stage operates upon
All Implemented Interfaces:
Stage<T>, net.shibboleth.shared.component.Component, net.shibboleth.shared.component.DestructableComponent, net.shibboleth.shared.component.IdentifiableComponent, net.shibboleth.shared.component.IdentifiedComponent, net.shibboleth.shared.component.InitializableComponent
Direct Known Subclasses:
AbstractFilteringStage, AbstractItemMetadataSelectionStage, AbstractIteratingStage, AbstractXSLProcessingStage, CompositeStage, DOMFilesystemSourceStage, DOMResourceSourceStage, EntitiesDescriptorAssemblerStage, EntitiesDescriptorDisassemblerStage, EntityAttributeAddingStage, ItemOrderingStage, PipelineDemultiplexerStage, PipelineMergeStage, ScriptletStage, SerializationStage, SplitMergeStage, StaticItemSourceStage, XMLSignatureSigningStage, XMLSignatureValidationStage, XPathFilteringStage

@ThreadSafe public abstract class AbstractStage<T> extends net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent implements Stage<T>
A base class for Stage implementations.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The Predicate applied to the supplied item collection to determine whether the stage will be executed.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    doExecute(List<Item<T>> items)
    Performs the stage processing on the given Item collection.
    void
    execute(List<Item<T>> items)
    Transforms the given input data.
    Gets the Predicate being applied to the supplied item collection to determine whether the stage will be executed.
    void
    Sets the Predicate applied to the supplied item collection to determine whether the stage will be executed.

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

    setId

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

    doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.shibboleth.shared.component.DestructableComponent

    destroy, isDestroyed

    Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

    getId

    Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

    initialize, isInitialized
  • Field Details

    • collectionPredicate

      @Nonnull private Predicate<Collection<Item<T>>> collectionPredicate
      The Predicate applied to the supplied item collection to determine whether the stage will be executed. Default value: always true.
  • Constructor Details

    • AbstractStage

      public AbstractStage()
  • Method Details

    • setCollectionPredicate

      public void setCollectionPredicate(@Nonnull Predicate<Collection<Item<T>>> pred)
      Sets the Predicate applied to the supplied item collection to determine whether the stage will be executed.
      Parameters:
      pred - the Predicate applied to the supplied item collection to determine whether the stage will be executed
    • getCollectionPredicate

      @Nonnull public final Predicate<Collection<Item<T>>> getCollectionPredicate()
      Gets the Predicate being applied to the supplied item collection to determine whether the stage will be executed.
      Returns:
      the Predicate being applied to the supplied item collection to determine whether the stage will be executed.
    • execute

      public void execute(@Nonnull @NonnullElements List<Item<T>> items) throws StageProcessingException
      Description copied from interface: Stage
      Transforms the given input data.
      Specified by:
      execute in interface Stage<T>
      Parameters:
      items - the data to be transformed
      Throws:
      StageProcessingException - thrown if there is a problem running this stage on the given input
    • doExecute

      protected abstract void doExecute(@Nonnull @NonnullElements List<Item<T>> items) throws StageProcessingException
      Performs the stage processing on the given Item collection.

      The stage is guaranteed to be have been initialized and not destroyed when this is invoked.

      Parameters:
      items - collection to be processed
      Throws:
      StageProcessingException - thrown if there is an unrecoverable problem when processing the stage