use of com.evolveum.midpoint.notifications.api.events.CertCampaignStageEvent in project midpoint by Evolveum.
the class CertificationListener method onCampaignStageStart.
@Override
public void onCampaignStageStart(AccessCertificationCampaignType campaign, Task task, OperationResult result) {
CertCampaignStageEvent event = certEventFactory.createOnCampaignStageStartEvent(campaign, task, result);
processEvent(event, task, result);
}
use of com.evolveum.midpoint.notifications.api.events.CertCampaignStageEvent in project midpoint by Evolveum.
the class CertEventFactory method createOnCampaignStageEndEvent.
public CertCampaignStageEvent createOnCampaignStageEndEvent(AccessCertificationCampaignType campaign, Task task, OperationResult result) {
CertCampaignStageEvent event = new CertCampaignStageEvent(idGenerator, campaign, EventOperationType.DELETE);
fillInEvent(campaign, task, event);
return event;
}
use of com.evolveum.midpoint.notifications.api.events.CertCampaignStageEvent in project midpoint by Evolveum.
the class CertEventFactory method createOnCampaignStageDeadlineApproachingEvent.
public CertCampaignStageEvent createOnCampaignStageDeadlineApproachingEvent(AccessCertificationCampaignType campaign, Task task, OperationResult result) {
CertCampaignStageEvent event = new CertCampaignStageEvent(idGenerator, campaign, EventOperationType.MODIFY);
fillInEvent(campaign, task, event);
return event;
}
use of com.evolveum.midpoint.notifications.api.events.CertCampaignStageEvent in project midpoint by Evolveum.
the class SimpleCampaignStageNotifier method getSubject.
@Override
protected String getSubject(Event event, GeneralNotifierType generalNotifierType, String transport, Task task, OperationResult result) {
CertCampaignStageEvent csEvent = (CertCampaignStageEvent) event;
String change;
if (csEvent.isAdd()) {
change = "started";
} else if (csEvent.isDelete()) {
change = "closed";
} else if (csEvent.isModify()) {
change = "about to be closed";
} else {
throw new IllegalStateException("Unexpected campaign event type: neither ADD nor MODIFY nor DELETE");
}
return "Campaign " + csEvent.getCampaignName() + " " + certHelper.getStageShortName(csEvent.getCampaign()) + " " + change;
}
use of com.evolveum.midpoint.notifications.api.events.CertCampaignStageEvent in project midpoint by Evolveum.
the class CertificationListener method onCampaignStageDeadlineApproaching.
@Override
public void onCampaignStageDeadlineApproaching(AccessCertificationCampaignType campaign, Task task, OperationResult result) {
CertCampaignStageEvent event = certEventFactory.createOnCampaignStageDeadlineApproachingEvent(campaign, task, result);
processEvent(event, task, result);
}
Aggregations