Class SimpleErrorCollectionInternal

java.lang.Object
com.atlassian.bamboo.utils.error.SimpleErrorCollectionInternal
All Implemented Interfaces:
ErrorCollection, Serializable
Direct Known Subclasses:
SimpleErrorCollection

@Deprecated public class SimpleErrorCollectionInternal extends Object implements ErrorCollection
Deprecated.
See Also:
  • Constructor Details

    • SimpleErrorCollectionInternal

      public SimpleErrorCollectionInternal()
      Deprecated.
    • SimpleErrorCollectionInternal

      public SimpleErrorCollectionInternal(Iterable<String> errors)
      Deprecated.
    • SimpleErrorCollectionInternal

      public SimpleErrorCollectionInternal(String... errors)
      Deprecated.
  • Method Details

    • addError

      public void addError(String field, String message)
      Deprecated.
      Description copied from interface: ErrorCollection
      Add a field-specific error message.
      Specified by:
      addError in interface ErrorCollection
      Parameters:
      field - Field name, eg. "assignee"
      message - Error message.
    • addErrorMessage

      public String addErrorMessage(String message)
      Deprecated.
      Description copied from interface: ErrorCollection
      Add error message relating to system state (not field-specific).
      Specified by:
      addErrorMessage in interface ErrorCollection
      Parameters:
      message - Error message.
    • getErrorMessages

      public Collection<String> getErrorMessages()
      Deprecated.
      Description copied from interface: ErrorCollection
      Get all non field-specific error messages.
      Specified by:
      getErrorMessages in interface ErrorCollection
      Returns:
      Collection of error Strings.
    • setErrorMessages

      public void setErrorMessages(Collection<String> errorMessages)
      Deprecated.
      Description copied from interface: ErrorCollection
      Populate this ErrorCollection with a new set of messages (existing errors are lost).
      Specified by:
      setErrorMessages in interface ErrorCollection
      Parameters:
      errorMessages - List of error message Strings.
    • getFlushedErrorMessages

      public Collection<String> getFlushedErrorMessages()
      Deprecated.
      Description copied from interface: ErrorCollection
      Get error messages, then get rid of them.
      Specified by:
      getFlushedErrorMessages in interface ErrorCollection
      Returns:
      The (now cleared) error messages.
    • getErrors

      public Map<String,List<String>> getErrors()
      Deprecated.
      Description copied from interface: ErrorCollection
      Get all field-specific errors.
      Specified by:
      getErrors in interface ErrorCollection
      Returns:
      Map of String: String pairs, eg. {"assignee": "Assignee is required"}
    • addErrorCollection

      public void addErrorCollection(@NotNull @NotNull ErrorCollection errors)
      Deprecated.
      Description copied from interface: ErrorCollection
      Populate this ErrorCollection with general and field-specific errors.
      Specified by:
      addErrorCollection in interface ErrorCollection
      Parameters:
      errors - ErrorCollection whose errors/messages we obtain.
    • addErrorMessages

      public void addErrorMessages(Collection<String> incomingMessages)
      Deprecated.
      Description copied from interface: ErrorCollection
      Append new error messages to those already collected.
      Specified by:
      addErrorMessages in interface ErrorCollection
      Parameters:
      incomingMessages - Collection of error strings.
    • addErrorMessage

      public String addErrorMessage(String message, Exception e)
      Deprecated.
      Specified by:
      addErrorMessage in interface ErrorCollection
    • addErrors

      public void addErrors(Map<String,?> incomingErrors)
      Deprecated.
      Description copied from interface: ErrorCollection
      Append new field-specific errors to those already collected.
      Specified by:
      addErrors in interface ErrorCollection
      Parameters:
      incomingErrors - A Map from String field names, to String error messages, or Collections of String error messages.
    • addFieldErrors

      public void addFieldErrors(@NotNull @NotNull Map<String,List<String>> errors)
      Deprecated.
      Description copied from interface: ErrorCollection
      Append new field-specific errors to those already collected.
      Specified by:
      addFieldErrors in interface ErrorCollection
      Parameters:
      errors - A Map from String field names, to String error messages, or Collections of String error messages.
    • hasAnyErrors

      public boolean hasAnyErrors()
      Deprecated.
      Description copied from interface: ErrorCollection
      Whether any errors (of any type - field-specific or otherwise) have been collected.
      Specified by:
      hasAnyErrors in interface ErrorCollection
      Returns:
      true if there are errors; false otherwise.
    • getFieldErrors

      public Map<String,List<String>> getFieldErrors()
      Deprecated.
      Specified by:
      getFieldErrors in interface ErrorCollection
    • getTotalErrors

      public int getTotalErrors()
      Deprecated.
      Specified by:
      getTotalErrors in interface ErrorCollection
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • addError

      public void addError(String prefix, String field, String message)
      Deprecated.
      Description copied from interface: ErrorCollection
      Adds a new form validation error with a given prefix. ie. prefix of "builder.ant" and field "target" will result in a key of "builder.ant.target"
      Specified by:
      addError in interface ErrorCollection
      Parameters:
      prefix - The prefix of the field in . form
      field - The id of the form element in error
      message - The error message to display to the user