use of net.nemerosa.ontrack.model.events.EventType in project ontrack by nemerosa.
the class EventFactoryTest method custom_event_type.
@Test
public void custom_event_type() {
EventFactory factory = new EventFactoryImpl();
factory.register(SimpleEventType.of("custom-type", "My custom event type"));
EventType eventType = factory.toEventType("custom-type");
assertEquals("custom-type", eventType.getId());
assertEquals("My custom event type", eventType.getTemplate());
}
use of net.nemerosa.ontrack.model.events.EventType in project ontrack by nemerosa.
the class ConfigurationPropertyCleanupListener method onEvent.
@Override
public void onEvent(Event event) {
// For configuration being deleted
EventType eventType = event.getEventType();
if (eventType == EventFactory.DELETE_CONFIGURATION) {
String configurationName = event.getValue("configuration");
cleanup(configurationName);
}
}
Aggregations