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.useSimpleErrorCollectioninstead- 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 voidaddError(String field, String message)Deprecated.Add a field-specific error message.voidaddError(String prefix, String field, String message)Deprecated.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"voidaddErrorCollection(@NotNull ErrorCollection errors)Deprecated.Populate this ErrorCollection with general and field-specific errors.StringaddErrorMessage(String message)Deprecated.Add error message relating to system state (not field-specific).StringaddErrorMessage(String message, Exception e)Deprecated.voidaddErrorMessages(Collection<String> incomingMessages)Deprecated.Append new error messages to those already collected.voidaddErrors(Map<String,?> incomingErrors)Deprecated.Append new field-specific errors to those already collected.voidaddFieldErrors(@NotNull Map<String,List<String>> errors)Deprecated.Append new field-specific errors to those already collected.booleanequals(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.intgetTotalErrors()Deprecated.booleanhasAnyErrors()Deprecated.Whether any errors (of any type - field-specific or otherwise) have been collected.inthashCode()Deprecated.voidsetErrorMessages(Collection<String> errorMessages)Deprecated.Populate this ErrorCollection with a new set of messages (existing errors are lost).StringtoString()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:ErrorCollectionAdd a field-specific error message.- Specified by:
addErrorin interfaceErrorCollection- Parameters:
field- Field name, eg. "assignee"message- Error message.
-
addErrorMessage
public String addErrorMessage(String message)
Deprecated.Description copied from interface:ErrorCollectionAdd error message relating to system state (not field-specific).- Specified by:
addErrorMessagein interfaceErrorCollection- Parameters:
message- Error message.
-
getErrorMessages
public Collection<String> getErrorMessages()
Deprecated.Description copied from interface:ErrorCollectionGet all non field-specific error messages.- Specified by:
getErrorMessagesin interfaceErrorCollection- Returns:
- Collection of error Strings.
-
setErrorMessages
public void setErrorMessages(Collection<String> errorMessages)
Deprecated.Description copied from interface:ErrorCollectionPopulate this ErrorCollection with a new set of messages (existing errors are lost).- Specified by:
setErrorMessagesin interfaceErrorCollection- Parameters:
errorMessages- List of error messageStrings.
-
getFlushedErrorMessages
public Collection<String> getFlushedErrorMessages()
Deprecated.Description copied from interface:ErrorCollectionGet error messages, then get rid of them.- Specified by:
getFlushedErrorMessagesin interfaceErrorCollection- Returns:
- The (now cleared) error messages.
-
getErrors
public Map<String,List<String>> getErrors()
Deprecated.Description copied from interface:ErrorCollectionGet all field-specific errors.- Specified by:
getErrorsin 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:ErrorCollectionPopulate this ErrorCollection with general and field-specific errors.- Specified by:
addErrorCollectionin interfaceErrorCollection- Parameters:
errors- ErrorCollection whose errors/messages we obtain.
-
addErrorMessages
public void addErrorMessages(Collection<String> incomingMessages)
Deprecated.Description copied from interface:ErrorCollectionAppend new error messages to those already collected.- Specified by:
addErrorMessagesin interfaceErrorCollection- Parameters:
incomingMessages- Collection of error strings.
-
addErrorMessage
public String addErrorMessage(String message, Exception e)
Deprecated.- Specified by:
addErrorMessagein interfaceErrorCollection
-
addErrors
public void addErrors(Map<String,?> incomingErrors)
Deprecated.Description copied from interface:ErrorCollectionAppend new field-specific errors to those already collected.- Specified by:
addErrorsin interfaceErrorCollection- Parameters:
incomingErrors- AMapfromStringfield names, toStringerror messages, orCollections ofStringerror messages.
-
addFieldErrors
public void addFieldErrors(@NotNull @NotNull Map<String,List<String>> errors)Deprecated.Description copied from interface:ErrorCollectionAppend new field-specific errors to those already collected.- Specified by:
addFieldErrorsin interfaceErrorCollection- Parameters:
errors- AMapfromStringfield names, toStringerror messages, orCollections ofStringerror messages.
-
hasAnyErrors
public boolean hasAnyErrors()
Deprecated.Description copied from interface:ErrorCollectionWhether any errors (of any type - field-specific or otherwise) have been collected.- Specified by:
hasAnyErrorsin interfaceErrorCollection- Returns:
trueif there are errors;falseotherwise.
-
getFieldErrors
public Map<String,List<String>> getFieldErrors()
Deprecated.- Specified by:
getFieldErrorsin interfaceErrorCollection
-
getTotalErrors
public int getTotalErrors()
Deprecated.- Specified by:
getTotalErrorsin interfaceErrorCollection
-
addError
public void addError(String prefix, String field, String message)
Deprecated.Description copied from interface:ErrorCollectionAdds 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:
addErrorin 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
-
-