Search in sources :

Example 6 with CertCampaignEvent

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;
}
Also used : CertCampaignEvent(com.evolveum.midpoint.notifications.api.events.CertCampaignEvent)

Aggregations

CertCampaignEvent (com.evolveum.midpoint.notifications.api.events.CertCampaignEvent)6 AccessCertificationCampaignType (com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationCampaignType)1 Date (java.util.Date)1