|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjetbrains.buildServer.controllers.ActionErrors
public class ActionErrors
A storage for various errors that can occur during web controllers execution.
| Nested Class Summary | |
|---|---|
static class |
ActionErrors.Error
Represents an error |
| Constructor Summary | |
|---|---|
ActionErrors()
Constructs new errors storage |
|
| Method Summary | |
|---|---|
void |
addAll(ActionErrors errors)
Adds all of the errors from the specified errors storage to this storage |
void |
addError(java.lang.String id,
java.lang.String message)
Adds an error with specified id and error message to this storage. |
void |
fillErrors(PropertiesProcessor processor,
java.util.Map<java.lang.String,java.lang.String> properties)
Fills this errors storage from the invalid properties returned by PropertiesProcessor
TODO: move this method out of web openapi |
ActionErrors.Error |
findErrorById(java.lang.String id)
Searches for an error by specified id |
java.util.List<ActionErrors.Error> |
getErrors()
Returns list of errors containing in this errors storage. |
boolean |
hasErrors()
Returns true if this storage contains at least one error. |
boolean |
hasNoErrors()
Returns true if this storage does not contain errors |
void |
serialize(org.jdom.Element rootElement)
Serializes errors containing in this storage into the specified XML document. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ActionErrors()
| Method Detail |
|---|
public void addError(@NotNull
java.lang.String id,
@Nullable
java.lang.String message)
id - id of the errormessage - error message
public void addAll(@NotNull
ActionErrors errors)
errors - errors storage@NotNull public java.util.List<ActionErrors.Error> getErrors()
@Nullable
public ActionErrors.Error findErrorById(@NotNull
java.lang.String id)
id - id of the error
public boolean hasErrors()
public boolean hasNoErrors()
public void serialize(@NotNull
org.jdom.Element rootElement)
<errors>
<error id="{error id}">{error message}</error>
</errors>
rootElement - element where the errors should be attached
See javascript: BS.Util.xmlErrors
public void fillErrors(@Nullable
PropertiesProcessor processor,
@NotNull
java.util.Map<java.lang.String,java.lang.String> properties)
PropertiesProcessor
TODO: move this method out of web openapi
processor - properties processorproperties - properties to checkpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||