private AlarmEvent createEvent( Identity alarmId, AlarmStatus oldStatus, AlarmStatus newStatus, String eventSystemName) { ValueBuilder<AlarmEvent> builder = vbf.newValueBuilder(AlarmEvent.class); AlarmEvent prototype = builder.prototype(); prototype.alarmIdentity().set(alarmId.identity().get()); prototype.eventTime().set(new Date()); prototype.newStatus().set(newStatus); prototype.oldStatus().set(oldStatus); prototype.systemName().set(eventSystemName); return builder.newInstance(); }
public void create() throws LifecycleException { description().set(identity.identity().get()); }