argos/dmp-backend/data/src/main/java/eu/eudat/data/enumeration/notification/NotificationType.java

28 lines
467 B
Java

package eu.eudat.data.enumeration.notification;
public enum NotificationType {
DMP_MODIFIED(0),
DATASET_MODIFIED(1);
private int type;
NotificationType(int type) {
this.type = type;
}
public int getType() {
return type;
}
public NotificationType fromInteger(int type) {
switch (type) {
case 0:
return DMP_MODIFIED;
case 1:
return DATASET_MODIFIED;
default:
throw new RuntimeException("Unsupported Notification Type");
}
}
}