public abstract class FilterStep
extends java.lang.Object
Represents a single step in an XML processing pipeline. This abstract class is the supertype for the different implementations of pipeline steps.
FilterStep
instances can be chained together in a FilterChain
to form an XML processing pipeline through which
XML input flows, being transformed in some way by each step.
To create an instance of a FilterStep
, use the various createFilterStep
methods on
FilterStepHelper
.
FilterChain
,
FilterStepHelper.newFilterStep(Class, String)
,
FilterStepHelper.newFilterStep(java.io.File, String)
,
FilterStepHelper.newFilterStep(java.net.URL, String)
,
FilterStepHelper.newFilterStep(org.xml.sax.helpers.XMLFilterImpl, String)
,
FilterStepHelper.newFilterStep(net.sf.saxon.s9api.XsltExecutable, String)
Constructor and Description |
---|
FilterStep() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getParameterNames()
Returns a
Set containing all of the parameter names for the FilterStep . |
java.lang.Class<?> |
getParameterType(java.lang.String parameterName)
Returns the Class type of the parameter with the name supplied.
|
java.lang.String |
getParameterTypeName(java.lang.String parameterName)
Returns a String representation of the type of a parameter.
|
java.lang.Object |
getParameterValue(java.lang.String parameterName)
Returns the Object value of the requested parameter.
|
java.lang.String |
getStepName()
Returns the name of the
FilterStep . |
java.lang.String |
getStepSource()
Returns a String representation of the underlying source of the
FilterStep . |
abstract java.lang.Object |
getUnderlyingFilter()
Returns the filter Object that this
FilterStep wraps. |
boolean |
isEnabled()
Returns the enabled state of this
FilterStep . |
void |
setEnabled(boolean value)
Sets the enabled state of this
FilterStep . |
abstract void |
setParameterValue(java.lang.String paramName,
java.lang.Object value)
Sets a parameter on this
FilterStep . |
public abstract void setParameterValue(java.lang.String paramName, java.lang.Object value) throws java.lang.IllegalArgumentException, FilterParameterizationException
FilterStep
.paramName
- the name of the parameter to setvalue
- the value to set the parameter tojava.lang.IllegalArgumentException
- if the parameter name is nullFilterParameterizationException
- if the parameter name provided is not a valid parameter for this FilterStep
or if there is a problem setting the valuepublic abstract java.lang.Object getUnderlyingFilter()
FilterStep
wraps.XMLFilterImpl
or an
XsltExecutable
public java.lang.Object getParameterValue(java.lang.String parameterName) throws java.lang.IllegalArgumentException, FilterParameterizationException
parameterName
- the name of the parameter value to return a value forjava.lang.IllegalArgumentException
- if the parameterName is nullFilterParameterizationException
- if the parameter does not exist on this FilterStep
public java.lang.Class<?> getParameterType(java.lang.String parameterName) throws java.lang.IllegalArgumentException, FilterParameterizationException
N.B. The type returned will depend not only on the parameter type but also on the underlying implementation class of the
FilterStep
. If the step is an XMLFilter
implementation, the type will be the Java type required
by the implementation class for its set method. However, if the underlying implementation is XSLT based, the type returned
may not be specific enough to determine what the xs:type of the parameter is.
parameterName
- the name of the parameter for which to return the type informationjava.lang.IllegalArgumentException
- if the parameterName is nullFilterParameterizationException
- if the parameter does not exist on this FilterStep
public java.lang.String getParameterTypeName(java.lang.String parameterName) throws java.lang.IllegalArgumentException, FilterParameterizationException
parameterName
- the name of the parameter for which to return the type informationjava.lang.IllegalArgumentException
- if the parameterName is nullFilterParameterizationException
- if the parameter does not exist on this FilterStep
public void setEnabled(boolean value)
Sets the enabled state of this FilterStep
.
A FilterStep
that is NOT enabled will be skipped when run within a FilterChain
.
value
- whether the FilterStep
should be enabled or notpublic boolean isEnabled()
Returns the enabled state of this FilterStep
.
FilterStep
is enabledpublic java.util.Set<java.lang.String> getParameterNames()
Set
containing all of the parameter names for the FilterStep
.public java.lang.String getStepName()
FilterStep
.FilterStep
public java.lang.String getStepSource()
FilterStep
.
This could be a Class name, an Object hashCode, a URL or a File path, depending on which underlying implementation is being
used for the FilterStep
.
FilterStep