001: package edu.iu.uis.eden;
002:
003: /**
004: * <p><Title> </p>
005: * <p><Description> </p>
006: * <p><p><p>Copyright: Copyright (c) 2002</p>
007: * <p><p>Company: UIS - Indiana University</p>
008: * @author <a href="mailto:seiffert@indiana.edu">Kurt A. Seiffert</a>
009: * @version $Revision: 1.3 $ - $Date: 2007/01/04 19:21:01 $
010: */
011: public class DocumentRouteLevelChange implements IDocumentEvent {
012:
013: // TODO for now we will include the new node-based routing fields onto this object to avoid an interface
014: // change to the PostProcessor interface.
015:
016: private static final long serialVersionUID = 785552701611174468L;
017:
018: private Long routeHeaderId;
019: private String appDocId;
020: private Integer oldRouteLevel;
021: private Integer newRouteLevel;
022: private String oldNodeName;
023: private String newNodeName;
024: private Long oldNodeInstanceId;
025: private Long newNodeInstanceId;
026:
027: // this constructor is for backwards compatibility
028: public DocumentRouteLevelChange(Long routeHeaderId,
029: String appDocId, Integer oldRouteLevel,
030: Integer newRouteLevel) {
031: this (routeHeaderId, appDocId, oldRouteLevel, newRouteLevel,
032: null, null, null, null);
033: }
034:
035: public DocumentRouteLevelChange(Long routeHeaderId,
036: String appDocId, Integer oldRouteLevel,
037: Integer newRouteLevel, String oldNodeName,
038: String newNodeName, Long oldNodeInstanceId,
039: Long newNodeInstanceId) {
040: this .routeHeaderId = routeHeaderId;
041: this .oldRouteLevel = oldRouteLevel;
042: this .newRouteLevel = newRouteLevel;
043: this .oldNodeName = oldNodeName;
044: this .newNodeName = newNodeName;
045: this .oldNodeInstanceId = oldNodeInstanceId;
046: this .newNodeInstanceId = newNodeInstanceId;
047: this .appDocId = appDocId;
048: }
049:
050: public String getDocumentEventCode() {
051: return ROUTE_LEVEL_CHANGE;
052: }
053:
054: public Long getRouteHeaderId() {
055: return routeHeaderId;
056: }
057:
058: public Integer getOldRouteLevel() {
059: return oldRouteLevel;
060: }
061:
062: public Integer getNewRouteLevel() {
063: return newRouteLevel;
064: }
065:
066: public Long getNewNodeInstanceId() {
067: return newNodeInstanceId;
068: }
069:
070: public String getNewNodeName() {
071: return newNodeName;
072: }
073:
074: public Long getOldNodeInstanceId() {
075: return oldNodeInstanceId;
076: }
077:
078: public String getOldNodeName() {
079: return oldNodeName;
080: }
081:
082: public String toString() {
083: StringBuffer buffer = new StringBuffer();
084: buffer.append("RouteHeaderID ").append(routeHeaderId);
085: buffer.append(" changing from routeLevel ").append(
086: oldRouteLevel);
087: buffer.append(" to routeLevel ").append(newRouteLevel);
088:
089: return buffer.toString();
090: }
091:
092: /**
093: * @return
094: */
095: public String getAppDocId() {
096: return appDocId;
097: }
098: }
099:
100: /*
101: * Copyright 2003 The Trustees of Indiana University. All rights reserved.
102: *
103: * This file is part of the EDEN software package.
104: * For license information, see the LICENSE file in the top level directory
105: * of the EDEN source distribution.
106: */
|