SimpleErrorCollection
instead@Deprecated public class SimpleErrorCollectionInternal extends Object implements ErrorCollection
Constructor and Description |
---|
SimpleErrorCollectionInternal()
Deprecated.
|
SimpleErrorCollectionInternal(Iterable<String> errors)
Deprecated.
|
SimpleErrorCollectionInternal(String... errors)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addError(String field,
String message)
Deprecated.
Add a field-specific error message.
|
void |
addError(String prefix,
String field,
String message)
Deprecated.
Adds a new form validation error with a given prefix.
|
void |
addErrorCollection(ErrorCollection errors)
Deprecated.
Populate this ErrorCollection with general and field-specific errors.
|
String |
addErrorMessage(String message)
Deprecated.
Add error message relating to system state (not field-specific).
|
String |
addErrorMessage(String message,
Exception e)
Deprecated.
|
void |
addErrorMessages(Collection<String> incomingMessages)
Deprecated.
Append new error messages to those already collected.
|
void |
addErrors(Map<String,?> incomingErrors)
Deprecated.
Append new field-specific errors to those already collected.
|
void |
addFieldErrors(Map<String,List<String>> errors)
Deprecated.
Append new field-specific errors to those already collected.
|
boolean |
equals(Object o)
Deprecated.
|
Collection<String> |
getErrorMessages()
Deprecated.
Get all non field-specific error messages.
|
Map<String,List<String>> |
getErrors()
Deprecated.
Get all field-specific errors.
|
Map<String,List<String>> |
getFieldErrors()
Deprecated.
|
Collection<String> |
getFlushedErrorMessages()
Deprecated.
Get error messages, then get rid of them.
|
int |
getTotalErrors()
Deprecated.
|
boolean |
hasAnyErrors()
Deprecated.
Whether any errors (of any type - field-specific or otherwise) have been collected.
|
int |
hashCode()
Deprecated.
|
void |
setErrorMessages(Collection<String> errorMessages)
Deprecated.
Populate this ErrorCollection with a new set of messages (existing errors are lost).
|
String |
toString()
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAllErrorMessages
public SimpleErrorCollectionInternal()
public SimpleErrorCollectionInternal(Iterable<String> errors)
public SimpleErrorCollectionInternal(String... errors)
public void addError(String field, String message)
ErrorCollection
addError
in interface ErrorCollection
field
- Field name, eg. "assignee"message
- Error message.public String addErrorMessage(String message)
ErrorCollection
addErrorMessage
in interface ErrorCollection
message
- Error message.public Collection<String> getErrorMessages()
ErrorCollection
getErrorMessages
in interface ErrorCollection
public void setErrorMessages(Collection<String> errorMessages)
ErrorCollection
setErrorMessages
in interface ErrorCollection
errorMessages
- List of error message String
s.public Collection<String> getFlushedErrorMessages()
ErrorCollection
getFlushedErrorMessages
in interface ErrorCollection
public Map<String,List<String>> getErrors()
ErrorCollection
getErrors
in interface ErrorCollection
public void addErrorCollection(@NotNull ErrorCollection errors)
ErrorCollection
addErrorCollection
in interface ErrorCollection
errors
- ErrorCollection whose errors/messages we obtain.public void addErrorMessages(Collection<String> incomingMessages)
ErrorCollection
addErrorMessages
in interface ErrorCollection
incomingMessages
- Collection of error strings.public String addErrorMessage(String message, Exception e)
addErrorMessage
in interface ErrorCollection
public void addErrors(Map<String,?> incomingErrors)
ErrorCollection
addErrors
in interface ErrorCollection
incomingErrors
- A Map
from String
field names, to String
error messages, or Collection
s of
String
error messages.public void addFieldErrors(@NotNull Map<String,List<String>> errors)
ErrorCollection
addFieldErrors
in interface ErrorCollection
errors
- A Map
from String
field names, to String
error messages, or Collection
s of
String
error messages.public boolean hasAnyErrors()
ErrorCollection
hasAnyErrors
in interface ErrorCollection
true
if there are errors; false
otherwise.public Map<String,List<String>> getFieldErrors()
getFieldErrors
in interface ErrorCollection
public int getTotalErrors()
getTotalErrors
in interface ErrorCollection
public void addError(String prefix, String field, String message)
ErrorCollection
addError
in interface ErrorCollection
prefix
- The prefix of the field in . formfield
- The id of the form element in errormessage
- The error message to display to the userCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.