net.shibboleth.metadata.pipeline
Class StatusMetadataLoggingStage

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<Item<?>>
              extended by net.shibboleth.metadata.pipeline.AbstractItemMetadataSelectionStage
                  extended by net.shibboleth.metadata.pipeline.StatusMetadataLoggingStage
All Implemented Interfaces:
Stage<Item<?>>, 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

@ThreadSafe
public class StatusMetadataLoggingStage
extends AbstractItemMetadataSelectionStage

A Stage that logs StatusMetadata associated with an Item.


Field Summary
private  Logger log
          Class logger.
 
Constructor Summary
StatusMetadataLoggingStage()
           
 
Method Summary
protected  void doExecute(Collection<Item<?>> itemCollection, Item<?> matchingItem, Map<Class<? extends ItemMetadata>,List<? extends ItemMetadata>> matchingMetadata)
          Performs the stage's logic on the given item that contained metadata of the given type.
private  void logErrors(String itemId, List<StatusMetadata> statuses)
          Logs error messages.
private  void logInfos(String itemId, List<StatusMetadata> statuses)
          Logs info messages.
private  void logWarnings(String itemId, List<StatusMetadata> statuses)
          Logs warning messages.
 
Methods inherited from class net.shibboleth.metadata.pipeline.AbstractItemMetadataSelectionStage
doDestroy, doExecute, getItemIdentifierStrategy, getSelectionRequirements, setIdentifierStrategy, setSelectionRequirements
 
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, 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
 

Field Detail

log

private final Logger log
Class logger.

Constructor Detail

StatusMetadataLoggingStage

public StatusMetadataLoggingStage()
Method Detail

doExecute

protected void doExecute(@Nonnull@NonnullElements
                         Collection<Item<?>> itemCollection,
                         @Nonnull
                         Item<?> matchingItem,
                         @Nonnull@NonnullElements
                         Map<Class<? extends ItemMetadata>,List<? extends ItemMetadata>> matchingMetadata)
                  throws StageProcessingException
Performs the stage's logic on the given item that contained metadata of the given type.

Specified by:
doExecute in class AbstractItemMetadataSelectionStage
Parameters:
itemCollection - current item collection
matchingItem - matching item
matchingMetadata - all the ItemMetadata instances that match a selection criteria
Throws:
StageProcessingException - thrown if there is a problem processing the item

logInfos

private void logInfos(@Nonnull
                      String itemId,
                      @Nonnull@NonnullElements
                      List<StatusMetadata> statuses)
Logs info messages.

Parameters:
itemId - ID of the item
statuses - status messages to log

logWarnings

private void logWarnings(@Nonnull
                         String itemId,
                         @Nonnull@NonnullElements
                         List<StatusMetadata> statuses)
Logs warning messages.

Parameters:
itemId - ID of the item
statuses - status messages to log

logErrors

private void logErrors(@Nonnull
                       String itemId,
                       @Nonnull@NonnullElements
                       List<StatusMetadata> statuses)
Logs error messages.

Parameters:
itemId - ID of the item
statuses - status messages to log


Copyright © 1999-2012. All Rights Reserved.