001 /*
002 * Copyright 2005-2009 The Kuali Foundation
003 *
004 *
005 * Licensed under the Educational Community License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.opensource.org/licenses/ecl2.php
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.kuali.rice.kew.dto;
018
019
020 /**
021 * Event passed to remote post processor when document changes route levels.
022 *
023 * @author Kuali Rice Team (rice.collab@kuali.org)
024 */
025 public class DocumentRouteLevelChangeDTO extends DocumentEventDTO {
026
027 private static final long serialVersionUID = 6822976938764899168L;
028 private Integer oldRouteLevel;
029 private Integer newRouteLevel;
030 private String oldNodeName;
031 private String newNodeName;
032 private Long oldNodeInstanceId;
033 private Long newNodeInstanceId;
034
035 public DocumentRouteLevelChangeDTO() {
036 super(ROUTE_LEVEL_CHANGE);
037 }
038
039 public Integer getNewRouteLevel() {
040 return newRouteLevel;
041 }
042
043 public void setNewRouteLevel(Integer newRouteLevel) {
044 this.newRouteLevel = newRouteLevel;
045 }
046
047 public Integer getOldRouteLevel() {
048 return oldRouteLevel;
049 }
050
051 public void setOldRouteLevel(Integer oldRouteLevel) {
052 this.oldRouteLevel = oldRouteLevel;
053 }
054
055 public Long getNewNodeInstanceId() {
056 return newNodeInstanceId;
057 }
058
059 public void setNewNodeInstanceId(Long newNodeInstanceId) {
060 this.newNodeInstanceId = newNodeInstanceId;
061 }
062
063 public String getNewNodeName() {
064 return newNodeName;
065 }
066
067 public void setNewNodeName(String newNodeName) {
068 this.newNodeName = newNodeName;
069 }
070
071 public Long getOldNodeInstanceId() {
072 return oldNodeInstanceId;
073 }
074
075 public void setOldNodeInstanceId(Long oldNodeInstanceId) {
076 this.oldNodeInstanceId = oldNodeInstanceId;
077 }
078
079 public String getOldNodeName() {
080 return oldNodeName;
081 }
082
083 public void setOldNodeName(String oldNodeName) {
084 this.oldNodeName = oldNodeName;
085 }
086
087 public String toString() {
088 StringBuffer buffer = new StringBuffer();
089 buffer.append("RouteHeaderID ").append(getRouteHeaderId());
090 buffer.append(" changing from routeLevel ").append(oldRouteLevel);
091 buffer.append(" to routeLevel ").append(newRouteLevel);
092 buffer.append(", from node ").append(oldNodeName);
093 buffer.append(" to node ").append(newNodeName);
094 return buffer.toString();
095 }
096
097 }