001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kew.engine;
017
018import org.kuali.rice.kew.actionitem.ActionItem;
019import org.kuali.rice.kew.actiontaken.ActionTakenValue;
020
021import java.io.Serializable;
022import java.util.ArrayList;
023import java.util.List;
024
025/**
026 * Represents the current Activation context of the workflow engine
027 *
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030public class ActivationContext implements Serializable {
031    private static final long serialVersionUID = 5063689034941122774L;
032
033    public static final boolean CONTEXT_IS_SIMULATION = true;
034
035    boolean simulation = false;
036    boolean activateRequests = false;
037    List<ActionTakenValue> simulatedActionsTaken = new ArrayList<ActionTakenValue>();
038    List<ActionItem> generatedActionItems = new ArrayList<ActionItem>();
039
040
041        public ActivationContext(boolean simulation) {
042                super();
043                this.simulation = simulation;
044        }
045
046        public ActivationContext(boolean simulation, List<ActionTakenValue> simulatedActionsTaken) {
047                super();
048                this.simulation = simulation;
049                this.simulatedActionsTaken = simulatedActionsTaken;
050        }
051
052    public boolean isActivateRequests() {
053        return this.activateRequests;
054    }
055
056    public void setActivateRequests(boolean activateRequests) {
057        this.activateRequests = activateRequests;
058    }
059
060    public List<ActionItem> getGeneratedActionItems() {
061        return generatedActionItems;
062    }
063
064    public void setGeneratedActionItems(List<ActionItem> generatedActionItems) {
065        this.generatedActionItems = generatedActionItems;
066    }
067
068    public List<ActionTakenValue> getSimulatedActionsTaken() {
069        return simulatedActionsTaken;
070    }
071
072    public void setSimulatedActionsTaken(List<ActionTakenValue> simulatedActionsTaken) {
073        this.simulatedActionsTaken = simulatedActionsTaken;
074    }
075
076    public boolean isSimulation() {
077        return simulation;
078    }
079
080    public void setSimulation(boolean simulation) {
081        this.simulation = simulation;
082    }
083
084}