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   * A document event representing the transition of a document from one status to another.
21   *
22   * @author Kuali Rice Team (rice.collab@kuali.org)
23   */
24  public class DocumentRouteStatusChangeDTO extends DocumentEventDTO {
25  
26  	private static final long serialVersionUID = 3969488320690393356L;
27  	private String newRouteStatus;
28      private String oldRouteStatus;
29  
30      public DocumentRouteStatusChangeDTO() {
31          super(ROUTE_STATUS_CHANGE);
32      }
33  
34      public String getNewRouteStatus() {
35          return newRouteStatus;
36      }
37  
38      public void setNewRouteStatus(String newRouteStatus) {
39          this.newRouteStatus = newRouteStatus;
40      }
41  
42      public String getOldRouteStatus() {
43          return oldRouteStatus;
44      }
45  
46      public void setOldRouteStatus(String oldRouteStatus) {
47          this.oldRouteStatus = oldRouteStatus;
48      }
49      
50      public String toString() {
51          StringBuffer buffer = new StringBuffer();
52          buffer.append("RouteHeaderID ").append(getRouteHeaderId());
53          buffer.append(" changing from routeStatus ").append(oldRouteStatus);
54          buffer.append(" to routeStatus ").append(newRouteStatus);
55  
56          return buffer.toString();
57      }
58  
59  }