public interface DMXController
Controller represents one piece of application logic that performs some operation. Think of it as Controller part of MVC pattern.
In general. controller is a link between View and Model parts of MVC. In most cases, controller performs one operation, but can contain arbitrary number of operations. The workflow of controller should be the following:
DMXController
acts as a facade for specific controller types, such as event listeners.
Modifier and Type | Method and Description |
---|---|
void |
execute(Object... params)
Execute action associated with this controller.
|
Map<String,Object> |
getControllerDataMap()
Returns a map of model data that this controller is interested in.
|
Set<String> |
getControllerDataNames()
Returns a set of names of data registered with this controller.
|
String |
getMapping()
Returns a mapping string for which this controller will be invoked.
|
String |
getNextViewId()
Name of the view that should be displayed after this controller terminates
it's operation.
|
void |
updateFromModel(Map<String,Object> modelData)
This method will update controller data with current data from model.
|
Map<String,Object> |
updateModel()
This method is called after controller is invoked to update model
data with any changes made by controller.
|
String getNextViewId()
String getMapping()
Returns a mapping string for which this controller will be invoked. Mapping depends on a context in which controller operates. For example, in Swing application, it can be component name, while in web application it can be an URL.
void updateFromModel(Map<String,Object> modelData)
modelData
- model dataMap<String,Object> updateModel()
Map<String,Object> getControllerDataMap()
Set<String> getControllerDataNames()
void execute(Object... params) throws ExecutionException
params
- operation parametersExecutionException
- if an error occurs during executionCopyright © 2012-2014 Vektor Software. All Rights Reserved.