001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: package org.netbeans.modules.soa.mapper.common;
021:
022: import java.beans.PropertyChangeListener;
023:
024: /**
025: * <p>
026: *
027: * Title: Generic object repersentation of link in mapper. </p> <p>
028: *
029: * Description: Describe the basic functionality of a link in mapper. </p> <p>
030: *
031: * Copyright: Copyright (c) 2002 </p> <p>
032: *
033: * Company: </p>
034: *
035: * @author Un Seng Leong
036: * @created December 4, 2002
037: * @version 1.0
038: */
039: public interface IMapperLink {
040: /**
041: * The property name of a change of this source node of the link.
042: */
043: public static final String SOURCE_CHANGE = "Link.Start";
044:
045: /**
046: * The property name of a change of this destination node of the link.
047: */
048: public static final String DESTINATION_CHANGE = "Link.End";
049:
050: /**
051: * The start node of the link in an IMapperNode repersentation.
052: *
053: * @return the node repersentes the start of this link.
054: */
055: public IMapperNode getStartNode();
056:
057: /**
058: * Set the start node of this link.
059: *
060: * @param node the start node of this link.
061: */
062: public void setStartNode(IMapperNode node);
063:
064: /**
065: * The end node of the link in an IMapperNode repersentation.
066: *
067: * @return the node repersentes the end of this link.
068: */
069: public IMapperNode getEndNode();
070:
071: /**
072: * Sets the end node of this link.
073: *
074: * @param node the end node of this link.
075: */
076: public void setEndNode(IMapperNode node);
077:
078: /**
079: * Set the link user object.
080: *
081: * @param obj The new user object of this link
082: */
083: public void setLinkObject(Object obj);
084:
085: /**
086: * Gets the user object of this link
087: *
088: * @return The user object of this link
089: */
090: public Object getLinkObject();
091:
092: /**
093: * Adds a PropertyChangeListener to the listener list. The specified
094: * property may be user-defined, and the following:
095: * <ul>
096: * <li> this link's source node changed (<code>SOURCE_CHANGE</code> )
097: * </li>
098: * <li> this link's destination node changed ( <code> DESTINATION_CHANGE </code>
099: * ) </li>
100: * </ul>
101: *
102: *
103: * @param listener the PropertyChangeListener to be added
104: */
105: public void addPropertyChangeListener(
106: PropertyChangeListener listener);
107:
108: /**
109: * Removes a PropertyChangeListener from the listener list.
110: *
111: * @param listener the PropertyChangeListener to be added
112: */
113: public void removePropertyChangeListener(
114: PropertyChangeListener listener);
115: }
|