/** * Created by robin on 12/11/16. */ (function () { 'use strict'; angular.module('luticate2Utils') .factory('luNotificationsBusiness', ['luNotificationsDataAccess', function(luNotificationsDataAccess) { var luNotificationsBusiness = {}; luNotificationsBusiness.EVENT_CREATE = 'EVENT_CREATE'; luNotificationsBusiness.EVENT_UPDATE = 'EVENT_UPDATE'; luNotificationsBusiness.EVENT_DELETE = 'EVENT_DELETE'; luNotificationsBusiness.init = function () { luNotificationsDataAccess.init(); }; luNotificationsBusiness.addEventCreateCallback = function (entityType, callback) { luNotificationsDataAccess.addCallback(luNotificationsBusiness.EVENT_CREATE, entityType, callback); }; luNotificationsBusiness.addEventUpdateCallback = function (entityType, callback) { luNotificationsDataAccess.addCallback(luNotificationsBusiness.EVENT_UPDATE, entityType, callback); }; luNotificationsBusiness.addEventDeleteCallback = function (entityType, callback) { luNotificationsDataAccess.addCallback(luNotificationsBusiness.EVENT_DELETE, entityType, callback); }; luNotificationsBusiness.addEventCrudCallback = function (entityType, callback) { luNotificationsBusiness.addEventCreateCallback(entityType, callback); luNotificationsBusiness.addEventUpdateCallback(entityType, callback); luNotificationsBusiness.addEventDeleteCallback(entityType, callback); }; return luNotificationsBusiness; }]); })();