org.mule.module.xml.filters
Class SchemaValidationFilter
java.lang.Object
org.mule.module.xml.filters.AbstractJaxpFilter
org.mule.module.xml.filters.SchemaValidationFilter
- All Implemented Interfaces:
- Initialisable, Filter
public class SchemaValidationFilter
- extends AbstractJaxpFilter
- implements Filter, Initialisable
Filter for schema validation.
- Author:
- Ryan Heaton
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_SCHEMA_LANGUAGE
public static final String DEFAULT_SCHEMA_LANGUAGE
- See Also:
- Constant Field Values
logger
protected transient Log logger
SchemaValidationFilter
public SchemaValidationFilter()
accept
public boolean accept(MuleMessage message)
- Accepts the message if schema validation passes.
- Specified by:
accept
in interface Filter
- Parameters:
message
- The message.
- Returns:
- Whether the message passes schema validation.
getDelayedResult
protected Object getDelayedResult(Source source)
- Get a delayed result.
- Parameters:
source
- The source.
- Returns:
- The result.
loadSource
protected Source loadSource(MuleMessage msg)
throws Exception
- Load the source from the specified object.
- Parameters:
msg
- Encompassing message
- Returns:
- The source
- Throws:
Exception
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise
in interface Initialisable
- Overrides:
initialise
in class AbstractJaxpFilter
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
loadSchemaStream
protected InputStream loadSchemaStream(String schemaLocation)
throws IOException
- Throws:
IOException
createValidator
public Validator createValidator()
throws SAXException
- Create a validator.
- Returns:
- The validator.
- Throws:
SAXException
getSchemaLocations
public String getSchemaLocations()
setSchemaLocations
public void setSchemaLocations(String schemaLocations)
getSchemaLanguage
public String getSchemaLanguage()
setSchemaLanguage
public void setSchemaLanguage(String schemaLanguage)
getSchemaObject
public Schema getSchemaObject()
setSchemaObject
public void setSchemaObject(Schema schemaObject)
getErrorHandler
public ErrorHandler getErrorHandler()
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
getResourceResolver
public LSResourceResolver getResourceResolver()
setResourceResolver
public void setResourceResolver(LSResourceResolver resourceResolver)
getValidatorFeatures
public Map<String,Boolean> getValidatorFeatures()
setValidatorFeatures
public void setValidatorFeatures(Map<String,Boolean> validatorFeatures)
getValidatorProperties
public Map<String,Object> getValidatorProperties()
setValidatorProperties
public void setValidatorProperties(Map<String,Object> validatorProperties)
getXMLInputFactory
public javax.xml.stream.XMLInputFactory getXMLInputFactory()
setXMLInputFactory
public void setXMLInputFactory(javax.xml.stream.XMLInputFactory xmlInputFactory)
isUseStaxSource
public boolean isUseStaxSource()
setUseStaxSource
public void setUseStaxSource(boolean useStaxSource)
isReturnResult
public boolean isReturnResult()
setReturnResult
public void setReturnResult(boolean returnResult)
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.