Package net.shibboleth.metadata.dom
Class AbstractDOMValidationStage<V,C extends DOMTraversalContext>
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.AbstractIteratingStage<Element>
net.shibboleth.metadata.dom.AbstractDOMTraversalStage<C>
net.shibboleth.metadata.dom.AbstractDOMValidationStage<V,C>
- Type Parameters:
V- type of the values to be validatedC- the context to carry through the traversal
- All Implemented Interfaces:
Stage<Element>,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:
AbstractElementVisitingValidationStage,ScopeValidationStage,X509ValidationStage
@ThreadSafe
public abstract class AbstractDOMValidationStage<V,C extends DOMTraversalContext>
extends AbstractDOMTraversalStage<C>
An abstract stage extending
AbstractDOMTraversalStage to manage a collection of
Validators to individual values.- Since:
- 0.9.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ValidatorSequence<V>The validator sequence to apply. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyValidators(V obj, C context) Apply each of the configured validators in turn to the provided object.protected voidprotected voidGets the list of validators being applied to each item.voidsetValidators(List<Validator<V>> newValidators) Set the list of validators to apply to each item.Methods inherited from class net.shibboleth.metadata.dom.AbstractDOMTraversalStage
addError, applicable, buildContext, doExecute, errorPrefix, visitMethods inherited from class net.shibboleth.metadata.pipeline.AbstractIteratingStage
doExecuteMethods 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
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, 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
-
validators
The validator sequence to apply.Thread safety: as a
finalfield, access tovalidatorsdoes not need to be synchronised for thread safety. The referenced object is itself thread-safe.
-
-
Constructor Details
-
AbstractDOMValidationStage
public AbstractDOMValidationStage()
-
-
Method Details
-
setValidators
Set the list of validators to apply to each item.- Parameters:
newValidators- the list of validators to set
-
getValidators
Gets the list of validators being applied to each item.- Returns:
- list of validators
-
applyValidators
Apply each of the configured validators in turn to the provided object.- Parameters:
obj- object to be validatedcontext- context for the validation- Throws:
StageProcessingException- if errors occur during processing
-
doDestroy
protected void doDestroy()- Overrides:
doDestroyin classnet.shibboleth.shared.component.AbstractInitializableComponent
-
doInitialize
protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException- Overrides:
doInitializein classnet.shibboleth.shared.component.AbstractIdentifiedInitializableComponent- Throws:
net.shibboleth.shared.component.ComponentInitializationException
-