public static AuditRecord forChangeNotification(String auditServerId, long timestamp, boolean userTriggered, ChangeNotification<InstanceInfo> changeNotification) { switch (changeNotification.getKind()) { case Add: return forInstanceAdd(auditServerId, timestamp, userTriggered, changeNotification.getData()); case Modify: ModifyNotification<InstanceInfo> modifyNotification = (ModifyNotification<InstanceInfo>) changeNotification; return forInstanceUpdate(auditServerId, timestamp, userTriggered, modifyNotification.getData(), modifyNotification.getDelta()); case Delete: return forInstanceDelete(auditServerId, timestamp, userTriggered, changeNotification.getData()); } throw new IllegalStateException("unhadled enum value " + changeNotification.getKind()); }
public static AuditRecord forChangeNotification(String auditServerId, long timestamp, boolean userTriggered, ChangeNotification<InstanceInfo> changeNotification) { switch (changeNotification.getKind()) { case Add: return forInstanceAdd(auditServerId, timestamp, userTriggered, changeNotification.getData()); case Modify: ModifyNotification<InstanceInfo> modifyNotification = (ModifyNotification<InstanceInfo>) changeNotification; return forInstanceUpdate(auditServerId, timestamp, userTriggered, modifyNotification.getData(), modifyNotification.getDelta()); case Delete: return forInstanceDelete(auditServerId, timestamp, userTriggered, changeNotification.getData()); } throw new IllegalStateException("unhadled enum value " + changeNotification.getKind()); }