Coverage Report - org.kuali.rice.kew.engine.EngineState
 
Classes in this File Line Coverage Branch Coverage Complexity
EngineState
0%
0/19
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 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 java.io.Serializable;
 19  
 import java.util.ArrayList;
 20  
 import java.util.List;
 21  
 
 22  
 import org.kuali.rice.kew.engine.node.RouteNodeInstance;
 23  
 
 24  
 
 25  
 /**
 26  
  * Represents the current state of the workflow engine.
 27  
  * 
 28  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 29  
  */
 30  0
 public class EngineState implements Serializable {
 31  
     
 32  
         private static final long serialVersionUID = 2405363802483005090L;
 33  
 
 34  0
         private static int currentSimulationId = -10;
 35  
     
 36  
     private RouteNodeInstance transitioningFrom;
 37  
     private RouteNodeInstance transitioningTo;
 38  0
     private List completeNodeInstances = new ArrayList();
 39  0
     private List generatedRequests = new ArrayList();
 40  
     
 41  
     public List getCompleteNodeInstances() {
 42  0
         return completeNodeInstances;
 43  
     }
 44  
     public void setCompleteNodeInstances(List completeNodeInstances) {
 45  0
         this.completeNodeInstances = completeNodeInstances;
 46  0
     }
 47  
     public RouteNodeInstance getTransitioningFrom() {
 48  0
         return transitioningFrom;
 49  
     }
 50  
     public void setTransitioningFrom(RouteNodeInstance transitioningFrom) {
 51  0
         this.transitioningFrom = transitioningFrom;
 52  0
     }
 53  
     public RouteNodeInstance getTransitioningTo() {
 54  0
         return transitioningTo;
 55  
     }
 56  
     public void setTransitioningTo(RouteNodeInstance transitioningTo) {
 57  0
         this.transitioningTo = transitioningTo;
 58  0
     }
 59  
     public List getGeneratedRequests() {
 60  0
         return generatedRequests;
 61  
     }
 62  
     public void setGeneratedRequests(List generatedRequests) {
 63  0
         this.generatedRequests = generatedRequests;
 64  0
     }
 65  
     
 66  
     /**
 67  
      * Gets the next id to be used for simulation purposes.  Since, during simulation, we cannot save to the database and get primary keys
 68  
      * assigned to our data beans, this method will be used to get a new simulation id which is guaranteed to be a negative number
 69  
      * which will be unique for at least the lifetime of the simulation.
 70  
      */
 71  
     public String getNextSimulationId() {
 72  0
         synchronized (EngineState.class) {
 73  0
             return String.valueOf(currentSimulationId--);
 74  0
         }
 75  
     }
 76  
     
 77  
 }