View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kew.engine;
17  
18  import org.kuali.rice.kew.actionitem.ActionItem;
19  import org.kuali.rice.kew.actiontaken.ActionTakenValue;
20  
21  import java.io.Serializable;
22  import java.util.ArrayList;
23  import java.util.List;
24  
25  /**
26   * Represents the current Activation context of the workflow engine
27   *
28   * @author Kuali Rice Team (rice.collab@kuali.org)
29   */
30  public class ActivationContext implements Serializable {
31      private static final long serialVersionUID = 5063689034941122774L;
32  
33      public static final boolean CONTEXT_IS_SIMULATION = true;
34  
35      boolean simulation = false;
36      boolean activateRequests = false;
37      List<ActionTakenValue> simulatedActionsTaken = new ArrayList<ActionTakenValue>();
38      List<ActionItem> generatedActionItems = new ArrayList<ActionItem>();
39  
40  
41  	public ActivationContext(boolean simulation) {
42  		super();
43  		this.simulation = simulation;
44  	}
45  
46  	public ActivationContext(boolean simulation, List<ActionTakenValue> simulatedActionsTaken) {
47  		super();
48  		this.simulation = simulation;
49  		this.simulatedActionsTaken = simulatedActionsTaken;
50  	}
51  
52      public boolean isActivateRequests() {
53          return this.activateRequests;
54      }
55  
56      public void setActivateRequests(boolean activateRequests) {
57          this.activateRequests = activateRequests;
58      }
59  
60      public List<ActionItem> getGeneratedActionItems() {
61          return generatedActionItems;
62      }
63  
64      public void setGeneratedActionItems(List<ActionItem> generatedActionItems) {
65          this.generatedActionItems = generatedActionItems;
66      }
67  
68      public List<ActionTakenValue> getSimulatedActionsTaken() {
69          return simulatedActionsTaken;
70      }
71  
72      public void setSimulatedActionsTaken(List<ActionTakenValue> simulatedActionsTaken) {
73          this.simulatedActionsTaken = simulatedActionsTaken;
74      }
75  
76      public boolean isSimulation() {
77          return simulation;
78      }
79  
80      public void setSimulation(boolean simulation) {
81          this.simulation = simulation;
82      }
83  
84  }