Class InvalidValueException

java.lang.Object
java.lang.Throwable
java.lang.Exception
de.espirit.firstspirit.client.common.locale.LocalizableException
de.espirit.firstspirit.access.editor.value.InvalidValueException
All Implemented Interfaces:
de.espirit.firstspirit.client.common.locale.Localizable, Serializable

public class InvalidValueException extends de.espirit.firstspirit.client.common.locale.LocalizableException
Generic exception on setting invalid values.
Since:
4.0.17
See Also:
  • Field Details

    • INVALID_VALUE_DESCRIPTOR

      public static final String INVALID_VALUE_DESCRIPTOR
      Resource key for error message.
      Since:
      4.0.17
      See Also:
    • DEFAULT_FALLBACK_FORMAT

      public static final String DEFAULT_FALLBACK_FORMAT
      Fallback message.
      Since:
      4.0.17
      See Also:
  • Constructor Details

    • InvalidValueException

      public InvalidValueException(EditorValue<?> editorValue, String descriptor)
      Constructor on editor and descriptor.
      Parameters:
      editorValue - The editor.
      descriptor - The resource key.
      Since:
      4.0.17
    • InvalidValueException

      public InvalidValueException(EditorValue<?> editorValue, String descriptor, String fallbackFormat)
      Constructor on editor, descriptor and fallback.
      Parameters:
      editorValue - The editor.
      descriptor - The resource key.
      fallbackFormat - The fallback formatting text.
      Since:
      4.0.17
    • InvalidValueException

      public InvalidValueException(EditorValue<?> editorValue)
      Constructor on editor only taking default error key.
      Parameters:
      editorValue - The editor.
      Since:
      4.0.17
  • Method Details

    • getMessage

      public String getMessage()
      Provides the formatted error message.
      Overrides:
      getMessage in class Throwable
      Returns:
      The message.
      Since:
      4.0.17
    • getMessage

      public String getMessage(ResourceBundle bundle)
      Provides the formatted error message based on the given resource bundle.
      Parameters:
      bundle - A resource bundle.
      Returns:
      The message.
      Since:
      4.0.25
    • getEditorValue

      @Nullable public @Nullable EditorValue<?> getEditorValue()
      Provides the editor.
      Returns:
      The editor value. Will return null if this exception has been serialized.
      Since:
      4.0.17
    • getEditorLabel

      public String getEditorLabel()
      Provides the editor's label.
      Returns:
      The editor's label.
      Since:
      4.0.17
    • getEditorName

      public String getEditorName()
      Provides the editor's variable name.
      Returns:
      The editor's variable name.
      Since:
      4.0.17
    • mappedExceptions

      public static Map<String,InvalidValueException> mappedExceptions(Iterator<Throwable> iterator)
      Detect all InvalidValueExceptions provided by the given iterator and return them as named map.
      Parameters:
      iterator - The iterator to scan.
      Returns:
      A map containng editorname-exception pairs.
      Since:
      4.0.17