View Javadoc

1   /*
2    * Copyright 2005-2009 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.dto;
18  
19  
20  /**
21   * Event passed to remote post processor when document changes route levels.
22   *
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   */
25  public class DocumentRouteLevelChangeDTO extends DocumentEventDTO {
26  
27  	private static final long serialVersionUID = 6822976938764899168L;
28  	private Integer oldRouteLevel;
29      private Integer newRouteLevel;
30      private String oldNodeName;
31      private String newNodeName;
32      private Long oldNodeInstanceId;
33      private Long newNodeInstanceId;
34  
35      public DocumentRouteLevelChangeDTO() {
36          super(ROUTE_LEVEL_CHANGE);
37      }
38  
39      public Integer getNewRouteLevel() {
40          return newRouteLevel;
41      }
42  
43      public void setNewRouteLevel(Integer newRouteLevel) {
44          this.newRouteLevel = newRouteLevel;
45      }
46  
47      public Integer getOldRouteLevel() {
48          return oldRouteLevel;
49      }
50  
51      public void setOldRouteLevel(Integer oldRouteLevel) {
52          this.oldRouteLevel = oldRouteLevel;
53      }
54  
55      public Long getNewNodeInstanceId() {
56          return newNodeInstanceId;
57      }
58  
59      public void setNewNodeInstanceId(Long newNodeInstanceId) {
60          this.newNodeInstanceId = newNodeInstanceId;
61      }
62  
63      public String getNewNodeName() {
64          return newNodeName;
65      }
66  
67      public void setNewNodeName(String newNodeName) {
68          this.newNodeName = newNodeName;
69      }
70  
71      public Long getOldNodeInstanceId() {
72          return oldNodeInstanceId;
73      }
74  
75      public void setOldNodeInstanceId(Long oldNodeInstanceId) {
76          this.oldNodeInstanceId = oldNodeInstanceId;
77      }
78  
79      public String getOldNodeName() {
80          return oldNodeName;
81      }
82  
83      public void setOldNodeName(String oldNodeName) {
84          this.oldNodeName = oldNodeName;
85      }
86  
87      public String toString() {
88          StringBuffer buffer = new StringBuffer();
89          buffer.append("RouteHeaderID ").append(getRouteHeaderId());
90          buffer.append(" changing from routeLevel ").append(oldRouteLevel);
91          buffer.append(" to routeLevel ").append(newRouteLevel);
92          buffer.append(", from node ").append(oldNodeName);
93          buffer.append(" to node ").append(newNodeName);
94          return buffer.toString();
95      }
96  
97  }