package ua.be.wee.model.pt;

import ua.be.wee.controller.PMTrigger;
import ua.be.wee.model.pm.PM;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

public class ExecutionToken {
    private String tokenId;
    private PM pm;
    private Event lastEvent;
    private List<PMTrigger> nextActivities;
    private String parentTokenId;

    public ExecutionToken(String tokenId, PM pm, Event lastEvent) {
        this.tokenId = tokenId;
        this.pm = pm;
        this.lastEvent = lastEvent;
        this.nextActivities = new ArrayList<>();
        this.parentTokenId = null;
    }

    public String getTokenId() {
        return tokenId;
    }

    public void setTokenId(String tokenId) {
        this.tokenId = tokenId;
    }

    public PM getPm() {
        return pm;
    }

    public void setPm(PM pm) {
        this.pm = pm;
    }

    public Event getLastEvent() {
        return lastEvent;
    }

    public void setLastEvent(Event lastEvent) {
        this.lastEvent = lastEvent;
    }

    public List<PMTrigger> getNextActivities() {
        return nextActivities;
    }

    public void setNextActivities(List<PMTrigger> nextActivities) {
        this.nextActivities = nextActivities;
    }

    public String getParentTokenId() {
        return parentTokenId;
    }

    public void setParentTokenId(String parentTokenId) {
        this.parentTokenId = parentTokenId;
    }

    public void updateNextActivities(List<PMTrigger> nextActs) {
        this.nextActivities = new ArrayList<>(nextActs);
    }
}