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 * A document event representing the transition of a document from one status to another.
021 *
022 * @author Kuali Rice Team (rice.collab@kuali.org)
023 */
024 public class DocumentRouteStatusChangeDTO extends DocumentEventDTO {
025
026 private static final long serialVersionUID = 3969488320690393356L;
027 private String newRouteStatus;
028 private String oldRouteStatus;
029
030 public DocumentRouteStatusChangeDTO() {
031 super(ROUTE_STATUS_CHANGE);
032 }
033
034 public String getNewRouteStatus() {
035 return newRouteStatus;
036 }
037
038 public void setNewRouteStatus(String newRouteStatus) {
039 this.newRouteStatus = newRouteStatus;
040 }
041
042 public String getOldRouteStatus() {
043 return oldRouteStatus;
044 }
045
046 public void setOldRouteStatus(String oldRouteStatus) {
047 this.oldRouteStatus = oldRouteStatus;
048 }
049
050 public String toString() {
051 StringBuffer buffer = new StringBuffer();
052 buffer.append("RouteHeaderID ").append(getRouteHeaderId());
053 buffer.append(" changing from routeStatus ").append(oldRouteStatus);
054 buffer.append(" to routeStatus ").append(newRouteStatus);
055
056 return buffer.toString();
057 }
058
059 }