Coverage Report - org.kuali.rice.kew.postprocessor.DocumentRouteLevelChange
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentRouteLevelChange
0%
0/26
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2009 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.postprocessor;
 17  
 
 18  
 
 19  
 
 20  
 /**
 21  
  * <p><Title> </p>
 22  
  * <p><Description> </p>
 23  
  * <p><p><p>Copyright: Copyright (c) 2002</p>
 24  
  * <p><p>Company: UIS - Indiana University</p>
 25  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 26  
  */
 27  
 public class DocumentRouteLevelChange implements IDocumentEvent {
 28  
         
 29  
         // TODO for now we will include the new node-based routing fields onto this object to avoid an interface
 30  
         // change to the PostProcessor interface.
 31  
         
 32  
   private static final long serialVersionUID = 785552701611174468L;
 33  
 
 34  
   private String documentId;
 35  
   private String appDocId;
 36  
   private Integer oldRouteLevel;
 37  
   private Integer newRouteLevel;
 38  
   private String oldNodeName;
 39  
   private String newNodeName;
 40  
   private Long oldNodeInstanceId;
 41  
   private Long newNodeInstanceId;
 42  
   
 43  
   //  this constructor is for backwards compatibility
 44  
   public DocumentRouteLevelChange(String documentId, String appDocId, Integer oldRouteLevel, Integer newRouteLevel) {
 45  0
           this(documentId, appDocId, oldRouteLevel, newRouteLevel, null, null, null, null);
 46  0
   }
 47  
   
 48  
   public DocumentRouteLevelChange(String documentId, String appDocId, Integer oldRouteLevel,
 49  0
     Integer newRouteLevel, String oldNodeName, String newNodeName, Long oldNodeInstanceId, Long newNodeInstanceId) {
 50  0
     this.documentId = documentId;
 51  0
     this.oldRouteLevel = oldRouteLevel;
 52  0
     this.newRouteLevel = newRouteLevel;
 53  0
     this.oldNodeName = oldNodeName;
 54  0
     this.newNodeName = newNodeName;
 55  0
     this.oldNodeInstanceId = oldNodeInstanceId;
 56  0
     this.newNodeInstanceId = newNodeInstanceId;
 57  0
     this.appDocId = appDocId;
 58  0
   }
 59  
 
 60  
   public String getDocumentEventCode() {
 61  0
     return ROUTE_LEVEL_CHANGE;
 62  
   }
 63  
 
 64  
   public String getDocumentId() {
 65  0
     return documentId;
 66  
   }
 67  
 
 68  
   public Integer getOldRouteLevel() {
 69  0
     return oldRouteLevel;
 70  
   }
 71  
 
 72  
   public Integer getNewRouteLevel() {
 73  0
     return newRouteLevel;
 74  
   }
 75  
 
 76  
   public Long getNewNodeInstanceId() {
 77  0
         return newNodeInstanceId;
 78  
   }
 79  
 
 80  
   public String getNewNodeName() {
 81  0
         return newNodeName;
 82  
   }
 83  
 
 84  
   public Long getOldNodeInstanceId() {
 85  0
         return oldNodeInstanceId;
 86  
   }
 87  
 
 88  
   public String getOldNodeName() {
 89  0
         return oldNodeName;
 90  
   }
 91  
 
 92  
   public String toString() {
 93  0
     StringBuffer buffer = new StringBuffer();
 94  0
     buffer.append("DocumentId ").append(documentId);
 95  0
     buffer.append(" changing from routeLevel ").append(oldRouteLevel);
 96  0
     buffer.append(" to routeLevel ").append(newRouteLevel);
 97  
 
 98  0
     return buffer.toString();
 99  
   }
 100  
 
 101  
   /**
 102  
    * @return
 103  
    */
 104  
   public String getAppDocId() {
 105  0
     return appDocId;
 106  
   }
 107  
 }