StatePlugin Interface

You can use the StatePlugin interface to develop Brand Mobiliser application states.

The SmappStatePlugin class is a base abstract class that implements the StatePlugin interface. Most custom states should extend SmappStatePlugin, which provides basic implementations that are common to most custom states, as well as helper methods that are commonly used in state implementations.

Two important methods in the StatePlugin interface are processMessage and processState, which are integral parts of application life cycles. Some of the methods in the StatePlugin interface customize the state editor, for example, supportsOkTransition and getStateNotes.

If a custom state extends the SmappStatePlugin class, implementing the class is simplified significantly. Instead of implementing both processMessage and processState methods, you can focus on adding business logic to the processStateLogic method. This is sufficient in most custom-state implementations.
Note: Do not extend the abstract class Plugin. Instead, extend SmappStatePlugin.


StatePlugin Interface