Class XslErrorMessageFormatter
java.lang.Object
org.frankframework.errormessageformatters.ErrorMessageFormatter
org.frankframework.errormessageformatters.XslErrorMessageFormatter
- All Implemented Interfaces:
IConfigurable
,IErrorMessageFormatter
,IScopeProvider
,IWithParameters
public class XslErrorMessageFormatter
extends ErrorMessageFormatter
implements IWithParameters, IConfigurable
Applies an XSLT-stylesheet to the standard error generated by an
ErrorMessageFormatter
.
If the transformation does not succeed, this 'standard' error message is returned and an exception is logged.
- Author:
- Johan Verrips IOS
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Configure this component.format
(String errorMessage, Throwable t, HasName location, Message originalMessage, PipeLineSession session) Format the available parameters into a XML-message.void
setMessageFormat
(DocumentFormat messageFormat) Format the error message as XML or as JSON.void
setStyleSheet
(String newStyleSheet) Deprecated.void
setStyleSheetName
(String styleSheetName) URL to the stylesheet used to transform the output of the standardErrorMessageFormatter
void
setXpathExpression
(String string) xPathExpression to use for transformationMethods inherited from class org.frankframework.errormessageformatters.ErrorMessageFormatter
getErrorMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
-
Field Details
-
paramList
-
-
Constructor Details
-
XslErrorMessageFormatter
public XslErrorMessageFormatter()
-
-
Method Details
-
configure
Description copied from interface:IConfigurable
Configure this component.configure()
is called once at startup of the framework in the configure method of the owner of thisIConfigurable
. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure()
, to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
format
public Message format(String errorMessage, Throwable t, HasName location, Message originalMessage, PipeLineSession session) Description copied from class:ErrorMessageFormatter
Format the available parameters into a XML-message.
Override this method in subclasses to obtain the required behaviour.- Specified by:
format
in interfaceIErrorMessageFormatter
- Overrides:
format
in classErrorMessageFormatter
-
addParameter
- Specified by:
addParameter
in interfaceIWithParameters
-
getParameterList
- Specified by:
getParameterList
in interfaceIWithParameters
-
setStyleSheet
@Deprecated @ConfigurationWarning("Use attribute [styleSheetName] instead") public void setStyleSheet(String newStyleSheet) Deprecated.UsesetStyleSheetName(String)
insteadURL to the stylesheet used to transform the output of the standardErrorMessageFormatter
-
setStyleSheetName
URL to the stylesheet used to transform the output of the standardErrorMessageFormatter
-
setXpathExpression
xPathExpression to use for transformation -
setMessageFormat
Description copied from class:ErrorMessageFormatter
Format the error message as XML or as JSON. ff.default XML- Overrides:
setMessageFormat
in classErrorMessageFormatter
-
setStyleSheetName(String)
instead