Search in sources :

Example 1 with DaoEventType

use of com.infiniteautomation.mango.spring.events.DaoEventType in project ma-modules-public by infiniteautomation.

the class DaoNotificationWebSocketHandler method notify.

protected void notify(DaoEvent<? extends T> event) {
    DaoEventType type = event.getType();
    String action = null;
    switch(type) {
        case CREATE:
            action = "create";
            break;
        case DELETE:
            action = "delete";
            break;
        case UPDATE:
            action = "update";
            break;
    }
    this.notify(action, event.getVo(), event.getOriginalVo(), event);
}
Also used : DaoEventType(com.infiniteautomation.mango.spring.events.DaoEventType)

Aggregations

DaoEventType (com.infiniteautomation.mango.spring.events.DaoEventType)1