KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > gui > model > VetoableConfigurationListener


1 /***
2  * FractalGUI: a graphical tool to edit Fractal component configurations.
3  * Copyright (C) 2003 France Telecom R&D
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: fractal@objectweb.org
20  *
21  * Authors: Eric Bruneton, Patrice Fauvel
22  */

23
24 package org.objectweb.fractal.gui.model;
25
26 /**
27  * An interface to veto changes in a {@link Configuration} model.
28  */

29
30 public interface VetoableConfigurationListener {
31
32   /**
33    * Notifies this listener that the root component is about to change.
34    */

35
36   void canChangeRootComponent ();
37
38   // -------------------------------------------------------------------------
39
// Name, Type, Implementation
40
// -------------------------------------------------------------------------
41

42   /**
43    * Notifies this listener that the name of a component is about to change.
44    *
45    * @param component the component whose name is about to change.
46    */

47
48   void canChangeName (Component component);
49
50   /**
51    * Notifies this listener that the type of a component is about to change.
52    *
53    * @param component the component whose type is about to change.
54    */

55
56   void canChangeType (Component component);
57
58   /**
59    * Notifies this listener that the implementation of a component is about to
60    * change.
61    *
62    * @param component the component whose implementation is about to change.
63    */

64
65   void canChangeImplementation (Component component);
66
67   // -------------------------------------------------------------------------
68
// Client and server interfaces
69
// -------------------------------------------------------------------------
70

71   /**
72    * Notifies this listener that the name of an interface is about to change.
73    *
74    * @param i the interface whose name is about to change.
75    */

76
77   void canChangeInterfaceName (Interface i);
78
79   /**
80    * Notifies this listener that the signature of an interface is about to
81    * change.
82    *
83    * @param i the interface whose signature is about to change.
84    */

85
86   void canChangeInterfaceSignature (Interface i);
87
88   /**
89    * Notifies this listener that the contigency of an interface is about to
90    * change.
91    *
92    * @param i the interface whose contingency is about to change.
93    */

94
95   void canChangeInterfaceContingency (Interface i);
96
97   /**
98    * Notifies this listener that the cardinality of an interface is about to
99    * change.
100    *
101    * @param i the interface whose cardinality is about to change.
102    */

103
104   void canChangeInterfaceCardinality (Interface i);
105
106   /**
107    * Notifies this listener that a client interface is about to be added to a
108    * component.
109    *
110    * @param component the component into which the new interface is about to be
111    * added.
112    * @param i the interface that is about to be added.
113    */

114
115   void canAddClientInterface (Component component, ClientInterface i);
116
117   /**
118    * Notifies this listener that a client interface is about to be removed from
119    * a component.
120    *
121    * @param component the component from which the interface is about to be
122    * removed.
123    * @param i the interface that is about to be removed.
124    */

125
126   void canRemoveClientInterface (Component component, ClientInterface i);
127
128   /**
129    * Notifies this listener that a server interface is about to be added to a
130    * component.
131    *
132    * @param component the component into which the new interface is about to be
133    * added.
134    * @param i the interface that is about to be added.
135    */

136
137   void canAddServerInterface (Component component, ServerInterface i);
138
139   /**
140    * Notifies this listener that a server interface is about to be removed from
141    * a component.
142    *
143    * @param component the component from which the interface is about to be
144    * removed.
145    * @param i the interface that is about to be removed.
146    */

147
148   void canRemoveServerInterface (Component component, ServerInterface i);
149
150   // -------------------------------------------------------------------------
151
// Bindings
152
// -------------------------------------------------------------------------
153

154   /**
155    * Notifies this listener that an interface is about to be bound.
156    *
157    * @param citf the client interface that is about to be bound.
158    */

159
160   void canBindInterface (ClientInterface citf);
161
162   /**
163    * Notifies this listener that an interface is about to be rebound.
164    *
165    * @param citf the client interface that is about to be rebound.
166    */

167
168   void canRebindInterface (ClientInterface citf);
169
170   /**
171    * Notifies this listener that an interface is about to be unbound.
172    *
173    * @param citf the client interface that is about to be unbound.
174    */

175
176   void canUnbindInterface (ClientInterface citf);
177
178   // -------------------------------------------------------------------------
179
// Attributes
180
// -------------------------------------------------------------------------
181

182   /**
183    * Notifies this listener that the attribute controller of a component is
184    * about to change.
185    *
186    * @param component the component whose attribute controller is about to
187    * change.
188    */

189
190   void canChangeAttributeController (Component component);
191
192   /**
193    * Notifies this listener that the value of an attribute is about to change.
194    *
195    * @param component the component whose attribute is about to change.
196    * @param attributeName the name of the attribute whose value is about to
197    * change.
198    */

199
200   void canChangeAttribute (Component component, String JavaDoc attributeName);
201
202   // -------------------------------------------------------------------------
203
// Controller descriptors
204
// -------------------------------------------------------------------------
205

206   /**
207    * Notifies this listener that the template controller descriptor of a
208    * component is about to change.
209    *
210    * @param component the component whose template contoller descriptor is
211    * about to change.
212    */

213
214   void canChangeTemplateControllerDescriptor (Component component);
215
216   /**
217    * Notifies this listener that the component controller descriptor of a
218    * component is about to change.
219    *
220    * @param component the component whose component contoller descriptor is
221    * about to change.
222    */

223
224   void canChangeComponentControllerDescriptor (Component component);
225
226   // -------------------------------------------------------------------------
227
// Composite specific informations
228
// -------------------------------------------------------------------------
229

230   /**
231    * Notifies this listener that a sub component is about to be added to a
232    * component.
233    *
234    * @param parent the component into which the sub component is about to be
235    * added.
236    * @param child the sub component that is about to be added.
237    */

238
239   void canAddSubComponent (Component parent, Component child);
240
241   /**
242    * Notifies this listener that a sub component is about to be removed from a
243    * component.
244    *
245    * @param parent the component from which the sub component is about to be
246    * removed.
247    * @param child the sub component that is about to be removed.
248    */

249
250   void canRemoveSubComponent (Component parent, Component child);
251 }
252
Popular Tags