View Javadoc

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