Package net.shibboleth.metadata.pipeline
Class AbstractItemMetadataSelectionStage<T,B>
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.AbstractStage<T>
net.shibboleth.metadata.pipeline.AbstractItemMetadataSelectionStage<T,B>
- Type Parameters:
T- the type of data included in the items being processedB- the type bound for the selection requirements set
- 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:
ItemMetadataFilterStage,ItemMetadataTerminationStage,StatusMetadataLoggingStage
An abstract
Stage that selects Items for further processing if they have a specific
type of ItemMetadata attached to them.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ItemIdentificationStrategy<T>Strategy used to generate item identifiers for logging purposes.ItemMetadataclasses that, if an item contains them, will cause theItemto be selected. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPerforms the stage processing on the given Item collection.protected abstract voiddoExecute(List<Item<T>> items, Item<T> matchingItem, net.shibboleth.shared.collection.ClassToInstanceMultiMap<B> matchingMetadata) Performs the stage's logic on the given item that contained metadata of the given type.final ItemIdentificationStrategy<T>Gets the strategy used to generateItemidentifiers for logging purposes.final Collection<Class<? extends B>>Gets theItemMetadataclasses that, if an item contains them, will cause theItemto be selected.voidsetIdentificationStrategy(ItemIdentificationStrategy<T> strategy) Sets the strategy used to generateItemidentifiers for logging purposes.voidsetSelectionRequirements(Collection<Class<? extends B>> requirements) Sets theItemMetadataclasses that, if an item contains them, will cause theItemto be selected.Methods inherited from class net.shibboleth.metadata.pipeline.AbstractStage
execute, getCollectionPredicate, setCollectionPredicateMethods 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
-
selectionRequirements
ItemMetadataclasses that, if an item contains them, will cause theItemto be selected. -
identificationStrategy
Strategy used to generate item identifiers for logging purposes.
-
-
Constructor Details
-
AbstractItemMetadataSelectionStage
public AbstractItemMetadataSelectionStage()
-
-
Method Details
-
getSelectionRequirements
@Nonnull @NonnullElements @Unmodifiable public final Collection<Class<? extends B>> getSelectionRequirements()Gets theItemMetadataclasses that, if an item contains them, will cause theItemto be selected.- Returns:
ItemMetadataclasses that, if an item contains them, will cause theItemto be selected, never null nor containing null elements
-
setSelectionRequirements
public void setSelectionRequirements(@Nonnull @NonnullElements @Unmodifiable Collection<Class<? extends B>> requirements) Sets theItemMetadataclasses that, if an item contains them, will cause theItemto be selected.- Parameters:
requirements-ItemMetadataclasses that, if an item contains them, will cause theItemto be selected
-
getItemIdentificationStrategy
Gets the strategy used to generateItemidentifiers for logging purposes.- Returns:
- strategy used to generate
Itemidentifiers for logging purposes
-
setIdentificationStrategy
Sets the strategy used to generateItemidentifiers for logging purposes.- Parameters:
strategy- strategy used to generateItemidentifiers for logging purposes, can not be null
-
doExecute
Description copied from class:AbstractStagePerforms 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:
doExecutein classAbstractStage<T>- Parameters:
items- collection to be processed- Throws:
StageProcessingException- thrown if there is an unrecoverable problem when processing the stage
-