Package net.shibboleth.metadata.pipeline
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
FieldsModifier and TypeFieldDescriptionprivate Predicate<Collection<Item<T>>>ThePredicateapplied to the supplied item collection to determine whether the stage will be executed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidPerforms the stage processing on the given Item collection.voidTransforms the given input data.final Predicate<Collection<Item<T>>>Gets thePredicatebeing applied to the supplied item collection to determine whether the stage will be executed.voidsetCollectionPredicate(Predicate<Collection<Item<T>>> pred) Sets thePredicateapplied to the supplied item collection to determine whether the stage will be executed.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
collectionPredicate
ThePredicateapplied to the supplied item collection to determine whether the stage will be executed. Default value: alwaystrue.
-
-
Constructor Details
-
AbstractStage
public AbstractStage()
-
-
Method Details
-
setCollectionPredicate
Sets thePredicateapplied to the supplied item collection to determine whether the stage will be executed.- Parameters:
pred- thePredicateapplied to the supplied item collection to determine whether the stage will be executed
-
getCollectionPredicate
Gets thePredicatebeing applied to the supplied item collection to determine whether the stage will be executed.- Returns:
- the
Predicatebeing applied to the supplied item collection to determine whether the stage will be executed.
-
execute
Description copied from interface:StageTransforms the given input data.- Specified by:
executein interfaceStage<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
-