org.keel.services.model
Interface Command
- All Superinterfaces:
- ResponseElement
- All Known Implementing Classes:
- CommandMessage, DefaultCommand
- public interface Command
- extends ResponseElement
Give the user a navigation option. This allows the model to provide navigation options to the UI. Note that implementations of this interface should be serializable
- Version:
- $Revision: 1.1 $ $Date: 2003/12/29 07:01:33 $
| Method Summary |
ModelResponse |
execute(ModelRequest req, ModelResponse res)
Convenience method, equivilant to execute(req, res, false, false) |
ModelResponse |
execute(ModelRequest req, ModelResponse res, boolean includeParams, boolean includeResponseElements)
Execute the model specified by this command and return the model response. |
java.lang.String |
getLabel()
|
java.lang.String |
getModel()
Return the name of the model specified for this command, in the form it would appear in the configuration file |
java.util.Map |
getParameters()
Return a map of any parameter specified for this command |
int |
getRelativeMovement()
|
void |
setLabel(java.lang.String newLabel)
|
void |
setModel(java.lang.String model)
|
void |
setParameter(java.lang.String paramName, java.lang.Object paramValue)
|
void |
setRelativeMovement(int numberOfSteps)
|
setParameter
public void setParameter(java.lang.String paramName,
java.lang.Object paramValue)
-
-
setModel
public void setModel(java.lang.String model)
-
-
getModel
public java.lang.String getModel()
-
Return the name of the model specified for this command, in the form it would appear in the configuration file
-
-
getParameters
public java.util.Map getParameters()
-
Return a map of any parameter specified for this command
-
-
execute
public ModelResponse execute(ModelRequest req,
ModelResponse res)
throws ModelException
-
Convenience method, equivilant to execute(req, res, false, false)
-
-
- Throws:
ModelException
execute
public ModelResponse execute(ModelRequest req,
ModelResponse res,
boolean includeParams,
boolean includeResponseElements)
throws ModelException
-
Execute the model specified by this command and return the model response.
-
-
- Parameters:
req - The previous request. The model being will have this request available via it's getPreviousRequest method
res - The current response. The new response will always include any errors stored in this response, but will not include any response elements already generated unless includeResponseElements is true
includeParams - Include request parameters from the old request when building the new request. Normally, a command has it's parameters set via "setParameter", just like a request, and these are the only parameters used in the new request. If this flag is true, however, any parameters that exist in the current request and that have not been specified via setParameter are populated from the current request.
includeResponseElements - Include any response elements from the current response (res) in the newly generated response. If an element in the new response has the same name as an element in the current response, use the new one only.
- Throws:
ModelException
setLabel
public void setLabel(java.lang.String newLabel)
-
-
getLabel
public java.lang.String getLabel()
-
-
setRelativeMovement
public void setRelativeMovement(int numberOfSteps)
-
-
getRelativeMovement
public int getRelativeMovement()
-
-
Please see keelframework.org for information about new Keel releases.