01: /* Copyright 2002 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.layout;
07:
08: import org.jasig.portal.layout.node.IUserLayoutNodeDescription;
09:
10: /**
11: * A layout event involving old parent reference.
12: * Used to related "move" and "delete" node events.
13: *
14: * @author Peter Kharchenko {@link <a href="mailto:pkharchenko@interactivebusiness.com"">pkharchenko@interactivebusiness.com"</a>}
15: * @version 1.0
16: */
17: public class LayoutMoveEvent extends LayoutEvent {
18: protected String oldParentNodeId;
19:
20: /**
21: * Construct a <code>LayoutMoveEvent</code> from a given source,
22: * node, and node's old parent.
23: *
24: * @param source an <code>Object</code> that generated the event
25: * @param node an <code>UserLayoutNodeDescription</code> of the node that was involved
26: * @param oldParentNodeId a <code>String</code> value of an old parent id
27: */
28: public LayoutMoveEvent(Object source,
29: IUserLayoutNodeDescription node, String oldParentNodeId) {
30: super (source, node);
31: this .oldParentNodeId = oldParentNodeId;
32: }
33:
34: /**
35: * Obtain an id of an OLD parent node. This is the node
36: * to which a given node used to be attached.
37: *
38: * @return a <code>String</code> node id
39: */
40: public String getOldParentNodeId() {
41: return this.oldParentNodeId;
42: }
43: }
|