|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.app.xmlui.aspect.administrative.FlowResult
public class FlowResult
This class represents the results that may be generated during a flow script in this administrative section. Typicaly, some method preforms an operation and returns an object of type FlowResult, then the flow script can inspect the results object to determine what the next course of action is. Basicaly, this results object stores all the errors and contiunation states that need to be represented. There are four types of information stored: 1) Continuation, this is a simple boolean variable that indicates wheather the required operation is complete and the user may continue on to the next step. 2) Notice information, this is a simple encoding of a notice message to be displayed to the user on their next step. There are four parts: outcome, header, message, and characters. See each field for more description on each part. Note: either a message or characters are required. 3) Errors, this is a list of errors that were encountered during processing. Typical, it just consists of a list of errored fields. However occasionaly there may be other specialized errors listed. 4) Parameters, this is a map of attached parameters that may be relevnt to the result. This should be used for things such as generated id's when objects are newly created.
| Constructor Summary | |
|---|---|
FlowResult()
|
|
| Method Summary | |
|---|---|
void |
addError(java.lang.String newError)
Add a new single error to the error list. |
java.lang.String |
getCharacters()
Return the notice characters |
boolean |
getContinue()
Determine if the user should progress to the next step in the flow. |
java.util.List<java.lang.String> |
getErrors()
Return the current list of errors. |
java.lang.String |
getErrorString()
Return the list of errors in string form, i.e. |
java.lang.String |
getHeader()
Return the notice header |
java.lang.String |
getMessage()
return the notice message |
java.lang.String |
getOutcome()
Get the notice outcome in string form, either success or failure. |
java.lang.Object |
getParameter(java.lang.String name)
Find the attached parameter with the given name. |
void |
setCharacters(java.lang.String characters)
Set the notice characters |
void |
setContinue(boolean continuep)
Set the continuation parameter determining if the user should progress to the next step in the flow. |
void |
setErrors(java.util.List<java.lang.String> errors)
Set the results errors, note this will remove any previous errors. |
void |
setHeader(Message header)
Set the notice header. |
void |
setMessage(Message message)
Set the notice message This must be an i18n dictionary key |
void |
setOutcome(boolean success)
Set the notice outcome to either success or failure. |
void |
setParameter(java.lang.String name,
java.lang.Object value)
Attatch a new parameter to this result object with the specified name & value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FlowResult()
| Method Detail |
|---|
public void setContinue(boolean continuep)
public boolean getContinue()
public void setOutcome(boolean success)
success - True for success, false for failure.public java.lang.String getOutcome()
public void setHeader(Message header)
public java.lang.String getHeader()
public void setMessage(Message message)
public java.lang.String getMessage()
public void setCharacters(java.lang.String characters)
public java.lang.String getCharacters()
public void setErrors(java.util.List<java.lang.String> errors)
errors - New error list.public void addError(java.lang.String newError)
newError - New error.public java.util.List<java.lang.String> getErrors()
public java.lang.String getErrorString()
public void setParameter(java.lang.String name,
java.lang.Object value)
name - The parameter's namevalue - The parameter's value.public java.lang.Object getParameter(java.lang.String name)
name - The parameter's name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||