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.voidsetFilename(String filename) name of the file containing the result messagevoidsetReplaceFrom(String replaceFrom) The string to replacevoidsetReplaceTo(String replaceTo) What to replace thereplaceFromwith.voidsetReturnString(String string) returned messagevoidsetStyleSheetName(String styleSheetName) Methods inherited from class org.frankframework.errormessageformatters.ErrorMessageFormatter
getErrorMessage, getMessageAsString, setMessageFormatMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ErrorMessageFormatterFormat the available parameters into an XML or JSON message.
Override this method in subclasses to obtain the required behaviour.- Specified by:
formatin interfaceIErrorMessageFormatter- Overrides:
formatin classErrorMessageFormatter
-
setReturnString
returned message -
setFilename
name of the file containing the result message -
setReplaceFrom
The string to replace -
setReplaceTo
What to replace thereplaceFromwith. -
setStyleSheetName
-