Package org.javarosa.core.model.actions
Class ActionController
java.lang.Object
org.javarosa.core.model.actions.ActionController
- All Implemented Interfaces:
Externalizable
public class ActionController extends Object implements Externalizable
Registers actions that should be triggered by certain events, and handles the triggering
of those actions when an event occurs.
- Author:
- Aliza Stone
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceActionController.ActionResultProcessor -
Constructor Summary
Constructors Constructor Description ActionController() -
Method Summary
Modifier and Type Method Description List<Action>getListenersForEvent(String event)voidreadExternal(DataInputStream inStream, PrototypeFactory pf)voidregisterEventListener(String event, Action action)Deprecated.voidregisterEventListener(List<String> eventList, Action action)Register an action to be triggered by the specified event(s).voidtriggerActionsFromEvent(String event, FormDef model)voidtriggerActionsFromEvent(String event, FormDef model, TreeReference contextForAction, ActionController.ActionResultProcessor resultProcessor)voidwriteExternal(DataOutputStream outStream)
-
Constructor Details
-
ActionController
public ActionController()
-
-
Method Details
-
getListenersForEvent
-
registerEventListener
Deprecated.Register an action to be triggered by the specified event(s).- Parameters:
event- the event name defined inActionaction- the action to associate with the events.
-
registerEventListener
Register an action to be triggered by the specified event(s).- Parameters:
eventList- list of event names defined inAction. All names must be valid.action- the action to associate with each of the events.
-
triggerActionsFromEvent
-
triggerActionsFromEvent
public void triggerActionsFromEvent(String event, FormDef model, TreeReference contextForAction, ActionController.ActionResultProcessor resultProcessor) -
readExternal
public void readExternal(DataInputStream inStream, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-