Package com.atlassian.bamboo.utils.error
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.useSimpleErrorCollection
instead- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleErrorCollectionInternal()
Deprecated.SimpleErrorCollectionInternal(Iterable<String> errors)
Deprecated.SimpleErrorCollectionInternal(String... errors)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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(@NotNull 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(@NotNull 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.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.utils.error.ErrorCollection
getAllErrorMessages
-
-
-
-
Constructor Detail
-
SimpleErrorCollectionInternal
public SimpleErrorCollectionInternal()
Deprecated.
-
SimpleErrorCollectionInternal
public SimpleErrorCollectionInternal(Iterable<String> errors)
Deprecated.
-
SimpleErrorCollectionInternal
public SimpleErrorCollectionInternal(String... errors)
Deprecated.
-
-
Method Detail
-
addError
public void addError(String field, String message)
Deprecated.Description copied from interface:ErrorCollection
Add a field-specific error message.- Specified by:
addError
in interfaceErrorCollection
- 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 interfaceErrorCollection
- 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 interfaceErrorCollection
- 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 interfaceErrorCollection
- Parameters:
errorMessages
- List of error messageString
s.
-
getFlushedErrorMessages
public Collection<String> getFlushedErrorMessages()
Deprecated.Description copied from interface:ErrorCollection
Get error messages, then get rid of them.- Specified by:
getFlushedErrorMessages
in interfaceErrorCollection
- 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 interfaceErrorCollection
- 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 interfaceErrorCollection
- 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 interfaceErrorCollection
- Parameters:
incomingMessages
- Collection of error strings.
-
addErrorMessage
public String addErrorMessage(String message, Exception e)
Deprecated.- Specified by:
addErrorMessage
in interfaceErrorCollection
-
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 interfaceErrorCollection
- Parameters:
incomingErrors
- AMap
fromString
field names, toString
error messages, orCollection
s ofString
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 interfaceErrorCollection
- Parameters:
errors
- AMap
fromString
field names, toString
error messages, orCollection
s ofString
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 interfaceErrorCollection
- Returns:
true
if there are errors;false
otherwise.
-
getFieldErrors
public Map<String,List<String>> getFieldErrors()
Deprecated.- Specified by:
getFieldErrors
in interfaceErrorCollection
-
getTotalErrors
public int getTotalErrors()
Deprecated.- Specified by:
getTotalErrors
in interfaceErrorCollection
-
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 interfaceErrorCollection
- Parameters:
prefix
- The prefix of the field in . formfield
- The id of the form element in errormessage
- The error message to display to the user
-
-