Search in sources :

Example 1 with SystemEventTypeDefinition

use of com.serotonin.m2m2.module.SystemEventTypeDefinition in project ma-core-public by infiniteautomation.

the class EventInstanceDwr method getSystemEventTypeLink.

// Utility Methods for help with rendering some strings
/**
 * @param divId - Id of link to place div on return
 * @param subtype
 * @param ref1
 * @param ref2
 * @return
 */
@DwrPermission(user = true)
public static ProcessResult getSystemEventTypeLink(String divId, String subtype, int ref1, int ref2) {
    ProcessResult result = new ProcessResult();
    result.addData("divId", divId);
    SystemEventTypeDefinition def = ModuleRegistry.getSystemEventTypeDefinition(subtype);
    if (def != null)
        result.addData("link", def.getEventListLink(ref1, ref2, Common.getTranslations()));
    return result;
}
Also used : ProcessResult(com.serotonin.m2m2.i18n.ProcessResult) SystemEventTypeDefinition(com.serotonin.m2m2.module.SystemEventTypeDefinition) DwrPermission(com.serotonin.m2m2.web.dwr.util.DwrPermission)

Example 2 with SystemEventTypeDefinition

use of com.serotonin.m2m2.module.SystemEventTypeDefinition in project ma-core-public by infiniteautomation.

the class SystemEventType method initialize.

public static void initialize() {
    addEventType(TYPE_SYSTEM_STARTUP, "event.system.startup");
    addEventType(TYPE_SYSTEM_SHUTDOWN, "event.system.shutdown");
    addEventType(TYPE_MAX_ALARM_LEVEL_CHANGED, "event.system.maxAlarmChanged");
    addEventType(TYPE_USER_LOGIN, "event.system.userLogin");
    addEventType(TYPE_FAILED_USER_LOGIN, "event.system.failedUserLogin");
    addEventType(TYPE_SET_POINT_HANDLER_FAILURE, "event.system.setPoint");
    addEventType(TYPE_EMAIL_SEND_FAILURE, "event.system.email");
    addEventType(TYPE_PROCESS_FAILURE, "event.system.process");
    addEventType(TYPE_LICENSE_CHECK, "event.system.licenseCheck");
    addEventType(TYPE_BACKUP_FAILURE, "event.system.backupFailure");
    addEventType(TYPE_UPGRADE_CHECK, "event.system.upgradeCheck");
    addEventType(TYPE_REJECTED_WORK_ITEM, "event.system.rejectedWorkItem");
    addEventType(TYPE_MISSING_MODULE_DEPENDENCY, "event.system.missingModuleDepDesc");
    for (SystemEventTypeDefinition def : ModuleRegistry.getDefinitions(SystemEventTypeDefinition.class)) addEventType(def.getTypeName(), def.getDescriptionKey());
}
Also used : SystemEventTypeDefinition(com.serotonin.m2m2.module.SystemEventTypeDefinition)

Aggregations

SystemEventTypeDefinition (com.serotonin.m2m2.module.SystemEventTypeDefinition)2 ProcessResult (com.serotonin.m2m2.i18n.ProcessResult)1 DwrPermission (com.serotonin.m2m2.web.dwr.util.DwrPermission)1