Search in sources :

Example 1 with AuditEventTypeDefinition

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

the class AuditEventType method initialize.

public static void initialize() {
    addEventType(TYPE_DATA_SOURCE, "event.audit.dataSource");
    addEventType(TYPE_DATA_POINT, "event.audit.dataPoint");
    addEventType(TYPE_EVENT_HANDLER, "event.audit.eventHandler");
    addEventType(TYPE_TEMPLATE, "event.audit.template");
    addEventType(TYPE_USER_COMMENT, "event.audit.userComment");
    addEventType(TYPE_USER, "event.audit.user");
    addEventType(TYPE_JSON_DATA, "event.audit.jsonData");
    addEventType(TYPE_EVENT_DETECTOR, "event.audit.eventDetector");
    addEventType(TYPE_PUBLISHER, "event.audit.publisher");
    for (AuditEventTypeDefinition def : ModuleRegistry.getDefinitions(AuditEventTypeDefinition.class)) addEventType(def.getTypeName(), def.getDescriptionKey());
}
Also used : AuditEventTypeDefinition(com.serotonin.m2m2.module.AuditEventTypeDefinition)

Example 2 with AuditEventTypeDefinition

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

the class EventInstanceDwr method getAuditEventTypeLink.

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

Aggregations

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