01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: package org.netbeans.modules.soa.mapper.common;
21:
22: /**
23: * <p>
24: *
25: * Title: Mapper view controller </p> <p>
26: *
27: * Description: Generic interface describe a view controller. Evey view
28: * controller should know about how to request a new link and node, and
29: * how to request removing a link and group node. Hence, view controller should
30: * not added new link and node to view model directly. In design, the four
31: * request methods should generate a mapper event of that event type and post
32: * the event to the IMapperViewManager. </p> <p>
33: *
34: * Copyright: Copyright (c) 2002 </p> <p>
35: *
36: * Company: </p>
37: *
38: * @author Un Seng Leong
39: * @created December 4, 2002
40: * @version 1.0
41: */
42: public interface IMapperViewController {
43:
44: /**
45: * Set the view that this controller is handling.
46: *
47: * @param view the view that this controller is handling.
48: */
49: public void setView(IMapperView view);
50:
51: /**
52: * Return the view that this controller is handling.
53: *
54: * @return the view that this controller is handling.
55: */
56: public IMapperView getView();
57:
58: /**
59: * Set the model of the view.
60: *
61: * @param viewModel the model of the view
62: */
63: public void setViewModel(IMapperViewModel viewModel);
64:
65: /**
66: * Return the model of the view.
67: *
68: * @return the model of the view
69: */
70: public IMapperViewModel getViewModel();
71:
72: /**
73: * Requesting the specified link to be added to a model.
74: *
75: * @param link the specified link to be added to a model.
76: */
77: public void requestNewLink(IMapperLink link);
78:
79: /**
80: * Requesting the specified node to be added to a model.
81: *
82: * @param node the specified node to be added to a model.
83: */
84: public void requestNewNode(IMapperNode node);
85:
86: /**
87: * Requesting the specified link to be removed from a model.
88: *
89: * @param link the specified link to be removed from a model.
90: */
91: public void requestRemoveLink(IMapperLink link);
92:
93: /**
94: * Requesting the specified node to be removed from a model.
95: *
96: * @param node the specified node to be removed from a model.
97: */
98: public void requestRemoveNode(IMapperNode node);
99: }
|