use of com.evolveum.midpoint.notifications.api.events.CertCampaignEvent in project midpoint by Evolveum.
the class SimpleCampaignNotifier method getSubject.
@Override
protected String getSubject(Event event, GeneralNotifierType generalNotifierType, String transport, Task task, OperationResult result) {
CertCampaignEvent campaignEvent = (CertCampaignEvent) event;
String change;
if (campaignEvent.isAdd()) {
change = "started";
} else if (campaignEvent.isDelete()) {
change = "closed";
} else {
throw new IllegalStateException("Unexpected campaign event type: neither ADD nor DELETE");
}
return "Campaign " + campaignEvent.getCampaignName() + " " + change;
}
Aggregations