public interface ErrorCollection extends Serializable
addError(String, String)), and general errors (addErrorMessage(String)) that
 aren't field-specific (eg. permission problems).| Modifier and Type | Method and Description | 
|---|---|
void | 
addError(String field,
        String message)
Add a field-specific error message. 
 | 
void | 
addError(String prefix,
        String field,
        String message)
Adds a new form validation error with a given prefix. 
 | 
void | 
addErrorCollection(ErrorCollection errors)
Populate this ErrorCollection with general and field-specific errors. 
 | 
String | 
addErrorMessage(String message)
Add error message relating to system state (not field-specific). 
 | 
String | 
addErrorMessage(String message,
               Exception e)  | 
void | 
addErrorMessages(Collection<String> errorMessages)
Append new error messages to those already collected. 
 | 
void | 
addErrors(Map<String,?> errors)
Deprecated. 
 
since 5.1 use  
addFieldErrors(java.util.Map) instead | 
void | 
addFieldErrors(Map<String,List<String>> errors)
Append new field-specific errors to those already collected. 
 | 
default List<String> | 
getAllErrorMessages()
Get all error messages from this error collection. 
 | 
Collection<String> | 
getErrorMessages()
Get all non field-specific error messages. 
 | 
Map<String,List<String>> | 
getErrors()
Get all field-specific errors. 
 | 
Map<String,List<String>> | 
getFieldErrors()  | 
Collection<String> | 
getFlushedErrorMessages()
Get error messages, then get rid of them. 
 | 
int | 
getTotalErrors()  | 
boolean | 
hasAnyErrors()
Whether any errors (of any type - field-specific or otherwise) have been collected. 
 | 
void | 
setErrorMessages(Collection<String> errorMessages)
Populate this ErrorCollection with a new set of messages (existing errors are lost). 
 | 
void addError(String field, String message)
field - Field name, eg. "assignee"message - Error message.void addError(String prefix, String field, String message)
prefix - The prefix of the field in . formfield - The id of the form element in errormessage - The error message to display to the userString addErrorMessage(String message)
message - Error message.Collection<String> getErrorMessages()
void setErrorMessages(Collection<String> errorMessages)
errorMessages - List of error message Strings.Collection<String> getFlushedErrorMessages()
Map<String,List<String>> getErrors()
void addErrorCollection(@NotNull
                        ErrorCollection errors)
errors - ErrorCollection whose errors/messages we obtain.void addErrorMessages(Collection<String> errorMessages)
errorMessages - Collection of error strings.@Deprecated void addErrors(Map<String,?> errors)
addFieldErrors(java.util.Map) insteaderrors - A Map from String field names, to String error messages, or Collections of
  String error messages.void addFieldErrors(Map<String,List<String>> errors)
errors - A Map from String field names, to String error messages, or Collections of
  String error messages.boolean hasAnyErrors()
true if there are errors; false otherwise.int getTotalErrors()
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.