Class FixedErrorMessageFormatter
java.lang.Object
org.frankframework.errormessageformatters.ErrorMessageFormatter
org.frankframework.errormessageformatters.FixedErrorMessageFormatter
- All Implemented Interfaces:
IErrorMessageFormatter
,IScopeProvider
ErrorMessageFormatter that returns a fixed message with replacements.
The fixed message is loaded from a file or a string configured on the formatter. If neither
is set, then the default ErrorMessageFormatter
is used to create the error message.
Fixed strings in the generated error message can be replaced using replaceFrom
/ replaceTo
. As
last step, an optional XSLT stylesheet transformation is applied.
- Since:
- 4.3
- Author:
- Peter Leeuwenburgh
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat
(String errorMessage, Throwable t, HasName location, Message originalMessage, PipeLineSession session) Format the available parameters into an XML or JSON message.void
setFilename
(String filename) name of the file containing the result messagevoid
setReplaceFrom
(String replaceFrom) The string to replacevoid
setReplaceTo
(String replaceTo) What to replace thereplaceFrom
with.void
setReturnString
(String string) returned messagevoid
setStyleSheetName
(String styleSheetName) Methods inherited from class org.frankframework.errormessageformatters.ErrorMessageFormatter
getErrorMessage, setMessageFormat
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
-
Constructor Details
-
FixedErrorMessageFormatter
public FixedErrorMessageFormatter()
-
-
Method Details
-
format
@Nonnull public Message format(@Nullable String errorMessage, @Nullable Throwable t, @Nullable HasName location, @Nullable Message originalMessage, @Nonnull PipeLineSession session) Description copied from class:ErrorMessageFormatter
Format the available parameters into an XML or JSON message.
Override this method in subclasses to obtain the required behaviour.- Specified by:
format
in interfaceIErrorMessageFormatter
- Overrides:
format
in classErrorMessageFormatter
-
setReturnString
returned message -
setFilename
name of the file containing the result message -
setReplaceFrom
The string to replace -
setReplaceTo
What to replace thereplaceFrom
with. -
setStyleSheetName
-