net.shibboleth.metadata.pipeline
Class BaseIteratingStage<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>
              extended by net.shibboleth.metadata.pipeline.BaseIteratingStage<ItemType>
Type Parameters:
ItemType - type of Items 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:
ContactPersonFilterStage, EntityDescriptorItemIdPopulationStage, EntityFilterStage, EntityRegistrationAuthorityFilterStage, EntityRoleFilterStage, GenerateIdStage, PullUpCacheDurationStage, PullUpValidUntilStage, RemoveOrganizationStage, SetCacheDurationStage, SetValidUntilStage, ValidateValidUntilStage, XMLSchemaValidationStage, XMLSignatureSigningStage, XMLSignatureValidationStage

@ThreadSafe
public abstract class BaseIteratingStage<ItemType extends Item<?>>
extends BaseStage<ItemType>

Base class for Stage implementations that iterate over each Item in a collection and do something.


Constructor Summary
BaseIteratingStage()
           
 
Method Summary
protected  void doExecute(Collection<ItemType> itemCollection)
          Iterates over each element of the Item collection and delegates the processing of that element to doExecute(Item).
protected abstract  boolean doExecute(ItemType item)
          Processes a given Item.
 
Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage
execute, setId
 
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

BaseIteratingStage

public BaseIteratingStage()
Method Detail

doExecute

protected void doExecute(@Nonnull@NonnullElements
                         Collection<ItemType> itemCollection)
                  throws StageProcessingException
Iterates over each element of the Item collection and delegates the processing of that element to doExecute(Item). 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.

Specified by:
doExecute in class BaseStage<ItemType extends Item<?>>
Parameters:
itemCollection - collection to be processed
Throws:
StageProcessingException - thrown if there is an unrecoverable problem when processing the stage

doExecute

protected abstract boolean doExecute(@Nonnull
                                     ItemType item)
                              throws StageProcessingException
Processes a given Item.

Parameters:
item - Item on which to operate
Returns:
true if the Item should be retained in the collection, false if not
Throws:
StageProcessingException - thrown if there is a problem with the stage processing


Copyright © 1999-2012. All Rights Reserved.