Search in sources :

Example 1 with CertCampaignStageEvent

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

Example 2 with CertCampaignStageEvent

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

Example 3 with CertCampaignStageEvent

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

Example 4 with CertCampaignStageEvent

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

Example 5 with CertCampaignStageEvent

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

Aggregations

CertCampaignStageEvent (com.evolveum.midpoint.notifications.api.events.CertCampaignStageEvent)8 AccessCertificationCampaignType (com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationCampaignType)1 AccessCertificationStageType (com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationStageType)1 Date (java.util.Date)1