All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netgrif.application.engine.workflow.domain.eventoutcomes.EventOutcome Maven / Gradle / Ivy

package com.netgrif.application.engine.workflow.domain.eventoutcomes;

import com.netgrif.application.engine.petrinet.domain.I18nString;
import com.netgrif.application.engine.petrinet.domain.dataset.logic.FrontAction;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public abstract class EventOutcome implements Serializable {

    private static final long serialVersionUID = 5228218326436828485L;

//    todo doplnenie referencie na event po implementácii event loggingu

    private I18nString message;

    private List outcomes = new ArrayList<>();

    private List frontActions = new ArrayList<>();

    protected EventOutcome() {
    }

    protected EventOutcome(I18nString message) {
        this();
        this.message = message;
    }

    protected EventOutcome(I18nString message, List outcomes) {
        this(message);
        this.outcomes = outcomes;
    }

    public EventOutcome(I18nString message, List outcomes, List frontActions) {
        this(message, outcomes);
        this.frontActions = frontActions;
    }

    public void addOutcome(EventOutcome eventOutcome) {
        this.outcomes.add(eventOutcome);
    }

    public void addOutcomes(List outcomes) {
        this.outcomes.addAll(outcomes);
    }

    public void addFrontAction(FrontAction frontAction) {
        this.frontActions.add(frontAction);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy