|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.library.alarm.SimpleAlarmModelService.SimpleAlarmModelMixin
public static class SimpleAlarmModelService.SimpleAlarmModelMixin
The Simple AlarmPoint Model is centered around the Normal and Activated. The triggers "activate" and "deactivate". The following matrix details the resulting grid;
Initial State | Trigger | Resulting State | Event Generated |
---|---|---|---|
Normal | activate | Activated | activation |
Normal | deactivate | Normal | - |
Activated | activate | Activated | - |
Activated | deactivate | Deactivated | deactivation |
Field Summary |
---|
Fields inherited from interface org.qi4j.library.alarm.AlarmModel |
---|
MODEL_BUNDLE_NAME |
Constructor Summary | |
---|---|
SimpleAlarmModelService.SimpleAlarmModelMixin()
|
Method Summary | |
---|---|
java.util.List<java.lang.String> |
alarmTriggers()
Returns all the supported AlarmPoint triggers. |
boolean |
computeCondition(AlarmStatus status)
|
java.lang.String |
computeTrigger(AlarmStatus status,
boolean condition)
|
AlarmEvent |
evaluate(AlarmPoint alarm,
java.lang.String trigger)
Execute the required changes upon an AlarmTrigger. |
java.lang.String |
modelDescription()
Returns a Description of the AlarmModel in the default Locale. |
java.lang.String |
modelDescription(java.util.Locale locale)
Returns a Description of the AlarmModel. |
java.lang.String |
modelName()
Returns the Name of the AlarmModel. |
java.util.List<java.lang.String> |
statusList()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleAlarmModelService.SimpleAlarmModelMixin()
Method Detail |
---|
public java.lang.String modelName()
modelName
in interface AlarmModel
public java.lang.String modelDescription()
modelDescription
in interface AlarmModel
public java.lang.String modelDescription(java.util.Locale locale)
null
, then the
default Locale is used.
modelDescription
in interface AlarmModel
locale
- The locale for which the description is wanted.
public java.util.List<java.lang.String> statusList()
statusList
in interface AlarmModel
public AlarmEvent evaluate(AlarmPoint alarm, java.lang.String trigger)
evaluate
in interface AlarmModel
trigger
- the AlarmTrigger that was used.alarm
- The AlarmPoint the trigger is for.
public java.util.List<java.lang.String> alarmTriggers()
alarmTriggers
in interface AlarmModel
public java.lang.String computeTrigger(AlarmStatus status, boolean condition)
computeTrigger
in interface AlarmModel
public boolean computeCondition(AlarmStatus status)
computeCondition
in interface AlarmModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |