|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.module.xml.filters.AbstractJaxpFilter
org.mule.module.xml.filters.SchemaValidationFilter
public class SchemaValidationFilter
Filter for schema validation.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_SCHEMA_LANGUAGE
|
protected Log |
logger
|
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
SchemaValidationFilter()
|
Method Summary | |
---|---|
boolean |
accept(MuleMessage message)
Accepts the message if schema validation passes. |
javax.xml.validation.Validator |
createValidator()
Create a validator. |
protected java.lang.Object |
getDelayedResult(javax.xml.transform.Source source)
Get a delayed result. |
org.xml.sax.ErrorHandler |
getErrorHandler()
|
org.w3c.dom.ls.LSResourceResolver |
getResourceResolver()
|
java.lang.String |
getSchemaLanguage()
|
java.lang.String |
getSchemaLocations()
|
javax.xml.validation.Schema |
getSchemaObject()
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getValidatorFeatures()
|
java.util.Map<java.lang.String,java.lang.Object> |
getValidatorProperties()
|
javax.xml.stream.XMLInputFactory |
getXMLInputFactory()
|
void |
initialise()
Method used to perform any initialisation work. |
boolean |
isReturnResult()
|
boolean |
isUseStaxSource()
|
protected java.io.InputStream |
loadSchemaStream(java.lang.String schemaLocation)
|
protected javax.xml.transform.Source |
loadSource(MuleMessage msg)
Load the source from the specified object. |
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
|
void |
setResourceResolver(org.w3c.dom.ls.LSResourceResolver resourceResolver)
|
void |
setReturnResult(boolean returnResult)
|
void |
setSchemaLanguage(java.lang.String schemaLanguage)
|
void |
setSchemaLocations(java.lang.String schemaLocations)
|
void |
setSchemaObject(javax.xml.validation.Schema schemaObject)
|
void |
setUseStaxSource(boolean useStaxSource)
|
void |
setValidatorFeatures(java.util.Map<java.lang.String,java.lang.Boolean> validatorFeatures)
|
void |
setValidatorProperties(java.util.Map<java.lang.String,java.lang.Object> validatorProperties)
|
void |
setXMLInputFactory(javax.xml.stream.XMLInputFactory xmlInputFactory)
|
Methods inherited from class org.mule.module.xml.filters.AbstractJaxpFilter |
---|
getDocumentBuilderFactory, setDocumentBuilderFactory, toDOMNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_SCHEMA_LANGUAGE
protected transient Log logger
Constructor Detail |
---|
public SchemaValidationFilter()
Method Detail |
---|
public boolean accept(MuleMessage message)
accept
in interface Filter
message
- The message.
protected java.lang.Object getDelayedResult(javax.xml.transform.Source source)
source
- The source.
protected javax.xml.transform.Source loadSource(MuleMessage msg) throws java.lang.Exception
msg
- Encompassing message
java.lang.Exception
public void initialise() throws InitialisationException
Initialisable
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.
initialise
in interface Initialisable
initialise
in class AbstractJaxpFilter
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered fromprotected java.io.InputStream loadSchemaStream(java.lang.String schemaLocation) throws java.io.IOException
java.io.IOException
public javax.xml.validation.Validator createValidator() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public java.lang.String getSchemaLocations()
public void setSchemaLocations(java.lang.String schemaLocations)
public java.lang.String getSchemaLanguage()
public void setSchemaLanguage(java.lang.String schemaLanguage)
public javax.xml.validation.Schema getSchemaObject()
public void setSchemaObject(javax.xml.validation.Schema schemaObject)
public org.xml.sax.ErrorHandler getErrorHandler()
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
public org.w3c.dom.ls.LSResourceResolver getResourceResolver()
public void setResourceResolver(org.w3c.dom.ls.LSResourceResolver resourceResolver)
public java.util.Map<java.lang.String,java.lang.Boolean> getValidatorFeatures()
public void setValidatorFeatures(java.util.Map<java.lang.String,java.lang.Boolean> validatorFeatures)
public java.util.Map<java.lang.String,java.lang.Object> getValidatorProperties()
public void setValidatorProperties(java.util.Map<java.lang.String,java.lang.Object> validatorProperties)
public javax.xml.stream.XMLInputFactory getXMLInputFactory()
public void setXMLInputFactory(javax.xml.stream.XMLInputFactory xmlInputFactory)
public boolean isUseStaxSource()
public void setUseStaxSource(boolean useStaxSource)
public boolean isReturnResult()
public void setReturnResult(boolean returnResult)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |