com.serotonin.m2m2.module
Class SystemEventTypeDefinition

java.lang.Object
  extended by com.serotonin.m2m2.module.ModuleElementDefinition
      extended by com.serotonin.m2m2.module.SystemEventTypeDefinition

public abstract class SystemEventTypeDefinition
extends ModuleElementDefinition

Used for creating custom system event types.


Constructor Summary
SystemEventTypeDefinition()
           
 
Method Summary
 int getDefaultAlarmLevel()
          The default alarm level of the event.
abstract  java.lang.String getDescriptionKey()
          A reference to a human readable and translatable name of the system event type.
abstract  java.lang.String getEventListLink(int ref1, int ref2, com.serotonin.m2m2.i18n.Translations translations)
          This method provides an opportunity for the client code to return HTML code that will be used verbatim in the events list snippet.
abstract  java.lang.String getTypeName()
          The type name of the system event.
 
Methods inherited from class com.serotonin.m2m2.module.ModuleElementDefinition
getModule, initialize, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemEventTypeDefinition

public SystemEventTypeDefinition()
Method Detail

getTypeName

public abstract java.lang.String getTypeName()
The type name of the system event. Must be unique within the instance, and should be less than 30 characters.


getDescriptionKey

public abstract java.lang.String getDescriptionKey()
A reference to a human readable and translatable name of the system event type. Key reference values in i18n.properties files.

Returns:
the reference key to the system event short description.

getDefaultAlarmLevel

public int getDefaultAlarmLevel()
The default alarm level of the event. Defaults to AlarmLevels.URGENT. Override as necessary, but note that users can override within the instance.


getEventListLink

public abstract java.lang.String getEventListLink(int ref1,
                                                  int ref2,
                                                  com.serotonin.m2m2.i18n.Translations translations)
This method provides an opportunity for the client code to return HTML code that will be used verbatim in the events list snippet.

Parameters:
ref1 - the first reference id of the event
ref2 - the second reference id of the event
translations - the translations object with which to translate translatable messages
Returns:
the link, or null if none is to be displayed.