[ONOS-4287] Persistent and distributed alarm store

Change-Id: I2fb0f5d84e563a53f036be012a8190d7df5869dc
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/faultmanagement/alarm/AlarmEvent.java b/incubator/api/src/main/java/org/onosproject/incubator/net/faultmanagement/alarm/AlarmEvent.java
index 000bfc9..f93d76f 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/faultmanagement/alarm/AlarmEvent.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/faultmanagement/alarm/AlarmEvent.java
@@ -15,50 +15,13 @@
  */
 package org.onosproject.incubator.net.faultmanagement.alarm;
 
-import java.util.Set;
 import org.onosproject.event.AbstractEvent;
-import org.onosproject.net.DeviceId;
 
 /**
- * Entity that represents Alarm events. Note: although the event will itself have a time, consumers may be more
- * interested in the times embedded in the alarms themselves.
- *
+ * Entity that represents Alarm events. Note: although the event will itself have a time,
+ * consumers may be more interested in the times embedded in the alarms themselves.
  */
-public class AlarmEvent extends AbstractEvent<AlarmEvent.Type, Set<Alarm>> {
-
-    private final DeviceId deviceRefreshed;
-
-    /**
-     * Creates an event due to one or more notification.
-     *
-     * @param alarms the set one or more of alarms.
-     */
-    public AlarmEvent(Set<Alarm> alarms) {
-        super(Type.NOTIFICATION, alarms);
-        deviceRefreshed = null;
-    }
-
-    /**
-     * Creates an event due to alarm discovery for a device.
-     *
-     * @param alarms the set of alarms.
-     * @param deviceRefreshed if of refreshed device, populated after a de-discovery
-     */
-    public AlarmEvent(Set<Alarm> alarms,
-            DeviceId deviceRefreshed) {
-        super(Type.DEVICE_DISCOVERY, alarms);
-        this.deviceRefreshed = deviceRefreshed;
-
-    }
-
-    /**
-     * Gets which device was refreshed.
-     *
-     * @return the refreshed device, or null if event related to a asynchronous notification(s)
-     */
-    public DeviceId getDeviceRefreshed() {
-        return deviceRefreshed;
-    }
+public class AlarmEvent extends AbstractEvent<AlarmEvent.Type, Alarm> {
 
     /**
      * Type of alarm event.
@@ -66,13 +29,22 @@
     public enum Type {
 
         /**
-         * Individual alarm(s) updated.
+         * Individual alarm updated.
          */
-        NOTIFICATION,
+        CREATED,
         /**
          * Alarm set updated for a given device.
          */
-        DEVICE_DISCOVERY,
+        REMOVED,
+    }
+
+    /**
+     * Creates an event due to one alarm.
+     *
+     * @param alarm the alarm related to the event.
+     */
+    public AlarmEvent(AlarmEvent.Type type, Alarm alarm) {
+        super(type, alarm);
     }
 
 }