net.shibboleth.metadata.pipeline
Class BaseStage<ItemType extends Item<?>>

java.lang.Object
  extended by net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
      extended by net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
          extended by net.shibboleth.metadata.pipeline.BaseStage<ItemType>
Type Parameters:
ItemType - type of Item this stage operates upon
All Implemented Interfaces:
Stage<ItemType>, net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.IdentifiableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent
Direct Known Subclasses:
AbstractItemMetadataSelectionStage, AbstractXSLProcessingStage, BaseIteratingStage, DomFilesystemSourceStage, DomResourceSourceStage, ElementFormattingStage, ElementStrippingStage, EmptyContainerStrippingStage, EntitiesDescriptorAssemblerStage, EntitiesDescriptorDisassemblerStage, EntityPublisherPathFilterStage, NamespaceStrippingStage, PipelineDemultiplexerStage, PipelineMergeStage, PushDownCacheDurationStage, PushDownValidUntilStage, ScriptletStage, SerializationStage, SetPublicationInfo, SplitMergeStage, StaticItemSourceStage, XPathFilteringStage

@ThreadSafe
public abstract class BaseStage<ItemType extends Item<?>>
extends net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
implements Stage<ItemType>

A base class for Stage implementations.


Constructor Summary
BaseStage()
           
 
Method Summary
protected abstract  void doExecute(Collection<ItemType> itemCollection)
          Performs the stage processing on the given Item collection.
 void execute(Collection<ItemType> itemCollection)
          Creates an ComponentInfo, delegates actual work on the collection to doExecute(Collection), adds the ComponentInfo to all the resultant Item elements and then sets its completion time.
 void setId(String componentId)
          
 
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
doInitialize, getId
 
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
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.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
 
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiableComponent
getId
 
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
 

Constructor Detail

BaseStage

public BaseStage()
Method Detail

setId

public void setId(@Nonnull@NotEmpty
                  String componentId)

Overrides:
setId in class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent

execute

public void execute(@Nonnull@NonnullElements
                    Collection<ItemType> itemCollection)
             throws StageProcessingException
Creates an ComponentInfo, delegates actual work on the collection to doExecute(Collection), adds the ComponentInfo to all the resultant Item elements and then sets its completion time. Transforms the given input data.

Specified by:
execute in interface Stage<ItemType extends Item<?>>
Parameters:
itemCollection - 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
                                  Collection<ItemType> itemCollection)
                           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:
itemCollection - collection to be processed
Throws:
StageProcessingException - thrown if there is an unrecoverable problem when processing the stage


Copyright © 1999-2012. All Rights Reserved.