|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| Method Summary | |
void |
add(ResponseElement re)The Model (only) uses the method below to add new response elements to this response. |
void |
addCommand(java.lang.String model, java.lang.String label)Convenience add method for creating a simple command If you need to specify additional information about the command, such as parameters use createCommand, populate the object, then use add. |
void |
addError(java.lang.String errorName, java.lang.String errorMessage)Add an error with a specific name. |
void |
addError(java.lang.String errorName, java.lang.String errorMessage, java.lang.Throwable t)Just like addError above, but including an actual throwable with details about the error |
void |
addError(java.lang.String errorName, java.lang.Throwable t)Just like addError above, but including a throwable but no message. |
void |
addErrors(java.util.Map errors)Add a whole set of errors to the current error set. |
void |
addInput(java.lang.String name, java.lang.String label)Convenience add method for creating a simple input. |
void |
addOutput(java.lang.String content)Convenience add method for creating a simple string output with a name assigned by the ModelResponse |
void |
addOutput(java.lang.String name, java.lang.String content)Convenience add method for creating a simple string output with a specific name |
void |
clearErrors()Clear the current errors Map |
Command |
createCommand(java.lang.String model)Create a Command with the specified name |
Command |
createCommandRelativeSequence(int numberOfSteps) |
Input |
createInput(java.lang.String name)Create an Input with the specified name |
Output |
createOutput(java.lang.String name)Create an Output with the specified name |
Output |
createOutput(java.lang.String name, java.lang.String content)Create an output with the specified name and content |
KeelResponse |
deserialize(byte[] bytes) |
ResponseElement |
get(java.lang.String elementLocator)Return a specific element |
java.util.Iterator |
getAll()Return an iterator over all of the ResponseElements in this response |
java.lang.Object |
getAttribute(java.lang.String key) |
java.util.Map |
getAttributes() |
java.util.Map |
getErrors()Return a map of error names and error messages. |
java.lang.String |
getErrorType(java.lang.String errorName)Get the type of the specified error, where the type is the classname of the exception contained in the error. |
java.lang.String |
getStackTrace(java.lang.String errorName)If there is a stack trace related to the error, it can be accessed via this method. |
java.lang.Throwable |
getThrowable(java.lang.String oneKey) |
void |
remove(ResponseElement re) |
void |
removeAttribute(java.lang.String key) |
byte[] |
serialize() |
void |
setAttribute(java.lang.String key, java.lang.Object value)Set the value of an attribute of this response |
void |
setDefaultsFromPrevious()This method is used to facilitate a "repeat request" where the default values of Inputs are set from the values entered in the previous request by the user. |
void |
setRequest(ModelRequest req)Used *only* by the ModelRequest to associate the originating request with the response. |
| Method Detail |
public ResponseElement get(java.lang.String elementLocator)
public void remove(ResponseElement re)
throws ModelException
ModelExceptionpublic java.util.Iterator getAll()
public void add(ResponseElement re)
throws ModelException
ModelException
public void addOutput(java.lang.String name,
java.lang.String content)
throws ModelException
ModelException
public void addOutput(java.lang.String content)
throws ModelException
ModelException
public void addInput(java.lang.String name,
java.lang.String label)
throws ModelException
ModelException
public void addCommand(java.lang.String model,
java.lang.String label)
throws ModelException
ModelException
public Output createOutput(java.lang.String name)
throws ModelException
ModelException
public Output createOutput(java.lang.String name,
java.lang.String content)
throws ModelException
ModelException
public Input createInput(java.lang.String name)
throws ModelException
ModelException
public Command createCommand(java.lang.String model)
throws ModelException
ModelException
public Command createCommandRelativeSequence(int numberOfSteps)
throws ModelException
ModelException
public void addError(java.lang.String errorName,
java.lang.String errorMessage)
errorName - A name for this error message, which may (or may not) correspond to the UI element from which the error originated.errorMessage - A human-readable error message to be displayed to the user. Messages beginning with "$" will be taken to be internationalized keys to look up in the appropriate message bundle for this locale.
public void addError(java.lang.String errorName,
java.lang.String errorMessage,
java.lang.Throwable t)
errorName - A name for this error message, which may (or may not) correspond to the UI element from which the error originated.errorMessage - A human-readable error message to be displayed to the user. Messages beginning with "$" will be taken to be internationalized keys to look up in the appropriate message bundle for this locale.t - A Throwable that caused this error to be recorded.
public void addError(java.lang.String errorName,
java.lang.Throwable t)
errorName - A name for this error message, which may (or may not) correspond to the UI element from which the error originated.t - A Throwable that caused this error to be recorded.public void addErrors(java.util.Map errors)
public java.util.Map getErrors()
public void clearErrors()
public java.lang.String getStackTrace(java.lang.String errorName)
errorName - The name of the error, as used when addError logged the error originallypublic java.lang.String getErrorType(java.lang.String errorName)
errorName - Name of the error to be checkedpublic void setRequest(ModelRequest req)
public void setDefaultsFromPrevious()
public void setAttribute(java.lang.String key,
java.lang.Object value)
public void removeAttribute(java.lang.String key)
public java.lang.Object getAttribute(java.lang.String key)
public java.util.Map getAttributes()
public byte[] serialize()
throws java.io.IOException
java.io.IOException
public KeelResponse deserialize(byte[] bytes)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Throwable getThrowable(java.lang.String oneKey)
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||