@ThreadSafe public class XMLSchemaValidationStage extends BaseIteratingStage<Element>
DOMElementItem collection.
This stage requires the following properties be set prior to initialization:
schemaResourcesisElementRequiredToBeSchemaValid() and an Element is found to
be invalid than an ErrorStatus object is set on the element. If the Element is not required to be valid and
an Element is found to be invalid than an WarningStatus is set on the Element.| Modifier and Type | Field and Description |
|---|---|
private boolean |
elementRequiredToBeSchemaValid
Whether Elements are required to be schema valid.
|
private Logger |
log
Class logger.
|
private List<Resource> |
schemaResources
Collection of schema resources.
|
private Schema |
validationSchema
Schema used to validate Elements.
|
| Constructor and Description |
|---|
XMLSchemaValidationStage() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDestroy() |
protected boolean |
doExecute(Item<Element> item)
Processes a given Item.
|
protected void |
doInitialize() |
List<Resource> |
getSchemaResources()
Gets an unmodifiable list of schema resources against which Elements are validated.
|
boolean |
isElementRequiredToBeSchemaValid()
Gets whether Elements are required to be schema valid.
|
void |
setElementRequiredToBeSchemaValid(boolean isRequired)
Sets whether Elements are required to be schema valid.
|
void |
setSchemaResources(List<Resource> resources)
Sets the schema resources against which Elements are validated.
|
doExecuteexecute, getCollectionPredicate, setCollectionPredicatesetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedprivate final Logger log
private boolean elementRequiredToBeSchemaValid
trueprivate Schema validationSchema
@Nonnull @NonnullElements @Unmodifiable public List<Resource> getSchemaResources()
public void setSchemaResources(@Nullable@NullableElements List<Resource> resources)
resources - schema resources against which Elements are validatedpublic boolean isElementRequiredToBeSchemaValid()
public void setElementRequiredToBeSchemaValid(boolean isRequired)
isRequired - whether Elements are required to be schema validprotected boolean doExecute(@Nonnull Item<Element> item) throws StageProcessingException
doExecute in class BaseIteratingStage<Element>item - Item on which to operateStageProcessingException - thrown if there is a problem with the stage processingprotected void doDestroy()
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationExceptionCopyright © 1999–2016. All rights reserved.