Class FixedErrorMessageFormatter

java.lang.Object
org.frankframework.errormessageformatters.ErrorMessageFormatter
org.frankframework.errormessageformatters.FixedErrorMessageFormatter
All Implemented Interfaces:
IErrorMessageFormatter, IScopeProvider

public class FixedErrorMessageFormatter extends ErrorMessageFormatter
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 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 interface IErrorMessageFormatter
      Overrides:
      format in class ErrorMessageFormatter
    • setReturnString

      public void setReturnString(String string)
      returned message
    • setFilename

      public void setFilename(String filename)
      name of the file containing the result message
    • setReplaceFrom

      public void setReplaceFrom(String replaceFrom)
      The string to replace
    • setReplaceTo

      public void setReplaceTo(String replaceTo)
      What to replace the replaceFrom with.
    • setStyleSheetName

      public void setStyleSheetName(String styleSheetName)