001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.uml.core.workspacemanagement;
043:
044: import org.netbeans.modules.uml.core.eventframework.IEventDispatcher;
045: import org.netbeans.modules.uml.core.eventframework.IEventPayload;
046: import org.netbeans.modules.uml.core.support.umlsupport.IResultCell;
047:
048: public interface IWorkspaceEventDispatcher extends IEventDispatcher {
049: /**
050: * Registers a sink that will received all notifications concerning Workspaces.
051: */
052: public void registerForWorkspaceEvents(IWorkspaceEventsSink sink);
053:
054: /**
055: * Registers a sink that will received all notifications concerning WSProjects.
056: */
057: public void registerForWSProjectEvents(IWSProjectEventsSink handler);
058:
059: /**
060: * Registers a sink that will received all notifications concerning WSElements.
061: */
062: public void registerForWSElementEvents(IWSElementEventsSink sink);
063:
064: /**
065: * Registers a sink that will received all notifications concerning modifications of WSElements.
066: */
067: public void registerForWSElementModifiedEvents(
068: IWSElementModifiedEventsSink sink);
069:
070: /**
071: * Removes a sink listening for wokspace events.
072: */
073: public void revokeWorkspaceSink(IWorkspaceEventsSink sink);
074:
075: /**
076: * Removes a sink listening for wokspace project events.
077: */
078: public void revokeWSProjectSink(IWSProjectEventsSink sink);
079:
080: /**
081: * Removes a sink listening for WSElement events.
082: */
083: public void revokeWSElementSink(IWSElementEventsSink sink);
084:
085: /**
086: * Removes a sink listening for WSElementModify events.
087: */
088: public void revokeWSElementModifiedSink(
089: IWSElementModifiedEventsSink sink);
090:
091: /**
092: * Calling this method will result in the firing of any listeners interested in this event.
093: */
094: public boolean fireWorkspacePreCreate(
095: IWorkspacePreCreateEventPayload payLoad);
096:
097: /**
098: * Calling this method will result in the firing of any listeners interested in this event.
099: */
100: public void fireWorkspaceCreated(IWorkspace space,
101: IEventPayload payLoad);
102:
103: /**
104: * Calling this method will result in the firing of any listeners interested in this event.
105: */
106: public boolean fireWorkspacePreOpen(String fileName,
107: IEventPayload payLoad);
108:
109: /**
110: * Calling this method will result in the firing of any listeners interested in this event.
111: */
112: public void fireWorkspaceOpened(IWorkspace space,
113: IEventPayload payLoad);
114:
115: /**
116: * Calling this method will result in the firing of any listeners interested in this event.
117: */
118: public boolean fireWorkspacePreSave(String location,
119: IEventPayload payLoad);
120:
121: /**
122: * Calling this method will result in the firing of any listeners interested in this event.
123: */
124: public void fireWorkspaceSaved(IWorkspace space,
125: IEventPayload payLoad);
126:
127: /**
128: * Calling this method will result in the firing of any listeners interested in this event.
129: */
130: public boolean fireWorkspacePreClose(IWorkspace space,
131: IEventPayload payLoad);
132:
133: /**
134: * Calling this method will result in the firing of any listeners interested in this event.
135: */
136: public void fireWorkspaceClosed(IWorkspace space,
137: IEventPayload payLoad);
138:
139: /**
140: * Calling this method will result in the firing of any listeners interested in this event.
141: */
142: public IResultCell fireWSProjectPreCreate(IWorkspace space,
143: String projectName, IEventPayload payLoad);
144:
145: /**
146: * Calling this method will result in the firing of any listeners interested in this event.
147: */
148: public void fireWSProjectCreated(IWSProject project,
149: IEventPayload payLoad);
150:
151: /**
152: * Calling this method will result in the firing of any listeners interested in this event.
153: */
154: public boolean fireWSProjectPreOpen(IWorkspace project,
155: String projName, IEventPayload payLoad);
156:
157: /**
158: * Calling this method will result in the firing of any listeners interested in this event.
159: */
160: public void fireWSProjectOpened(IWSProject project,
161: IEventPayload payLoad);
162:
163: /**
164: * Calling this method will result in the firing of any listeners interested in this event.
165: */
166: public boolean fireWSProjectPreRemove(IWSProject project,
167: IEventPayload payLoad);
168:
169: /**
170: * Calling this method will result in the firing of any listeners interested in this event.
171: */
172: public void fireWSProjectRemoved(IWSProject project,
173: IEventPayload payLoad);
174:
175: /**
176: * Calling this method will result in the firing of any listeners interested in this event.
177: */
178: public boolean fireWSProjectPreInsert(IWorkspace space,
179: String projectName, IEventPayload payLoad);
180:
181: /**
182: * Calling this method will result in the firing of any listeners interested in this event.
183: */
184: public void fireWSProjectInserted(IWSProject project,
185: IEventPayload payLoad);
186:
187: /**
188: * Calling this method will result in the firing of any listeners interested in this event.
189: */
190: public boolean fireWSProjectPreRename(IWSProject project,
191: String newName, IEventPayload payLoad);
192:
193: /**
194: * Calling this method will result in the firing of any listeners interested in this event.
195: */
196: public void fireWSProjectRenamed(IWSProject project,
197: String oldName, IEventPayload payLoad);
198:
199: /**
200: * Calling this method will result in the firing of any listeners interested in this event.
201: */
202: public boolean fireWSProjectPreClose(IWSProject project,
203: IEventPayload payLoad);
204:
205: /**
206: * Calling this method will result in the firing of any listeners interested in this event.
207: */
208: public void fireWSProjectClosed(IWSProject project,
209: IEventPayload payLoad);
210:
211: /**
212: * Calling this method will result in the firing of any listeners interested in this event.
213: */
214: public boolean fireWSProjectPreSave(IWSProject project,
215: IEventPayload payLoad);
216:
217: /**
218: * Calling this method will result in the firing of any listeners interested in this event.
219: */
220: public void fireWSProjectSaved(IWSProject project,
221: IEventPayload payLoad);
222:
223: /**
224: * Calling this method will result in the firing of any listeners interested in this event.
225: */
226: public boolean fireWSElementPreCreate(IWSProject wsProject,
227: String location, String Name, String data,
228: IEventPayload payLoad);
229:
230: /**
231: * Calling this method will result in the firing of any listeners interested in this event.
232: */
233: public void fireWSElementCreated(IWSElement element,
234: IEventPayload payLoad);
235:
236: /**
237: * Calling this method will result in the firing of any listeners interested in this event.
238: */
239: public boolean fireWSElementPreSave(IWSElement wsProject,
240: IEventPayload payLoad);
241:
242: /**
243: * Calling this method will result in the firing of any listeners interested in this event.
244: */
245: public void fireWSElementSaved(IWSElement element,
246: IEventPayload payLoad);
247:
248: /**
249: * Calling this method will result in the firing of any listeners interested in this event.
250: */
251: public boolean fireWSElementPreRemove(IWSElement wsProject,
252: IEventPayload payLoad);
253:
254: /**
255: * Calling this method will result in the firing of any listeners interested in this event.
256: */
257: public void fireWSElementRemoved(IWSElement element,
258: IEventPayload payLoad);
259:
260: /**
261: * Fired right after a WSElement's name has changed.
262: */
263: public boolean fireWSElementPreNameChanged(IWSElement element,
264: String proposedValue, IEventPayload payLoad);
265:
266: /**
267: * Fired right after a WSElement's name has changed.
268: */
269: public void fireWSElementNameChanged(IWSElement element,
270: IEventPayload payLoad);
271:
272: /**
273: * Fired whenever the owner of the WSElement is about to be changed.
274: */
275: public boolean fireWSElementPreOwnerChange(IWSElement element,
276: IWSProject newOwner, IEventPayload payLoad);
277:
278: /**
279: * Fired right after a WSElement's owner has changed.
280: */
281: public void fireWSElementOwnerChanged(IWSElement element,
282: IEventPayload payLoad);
283:
284: /**
285: * Fired whenever the location of the WSElement is about to be changed.
286: */
287: public boolean fireWSElementPreLocationChanged(IWSElement element,
288: String proposedLocation, IEventPayload payLoad);
289:
290: /**
291: * Fired right after a WSElement's location has changed.
292: */
293: public void fireWSElementLocationChanged(IWSElement element,
294: IEventPayload payLoad);
295:
296: /**
297: * Fired whenever the data of the WSElement is about to be changed.
298: */
299: public boolean fireWSElementPreDataChanged(IWSElement element,
300: String newData, IEventPayload payLoad);
301:
302: /**
303: * Fired right after a WSElement's data has changed.
304: */
305: public void fireWSElementDataChanged(IWSElement element,
306: IEventPayload payLoad);
307:
308: /**
309: * Fired whenever the documentation field of the WSElement is about to be changed.
310: */
311: public boolean fireWSElementPreDocChanged(IWSElement element,
312: String doc, IEventPayload payLoad);
313:
314: /**
315: * Fired right after a WSElement's documentation field has changed.
316: */
317: public void fireWSElementDocChanged(IWSElement element,
318: IEventPayload payLoad);
319:
320: /**
321: * Fired whenever a WSElement is about to be modified.
322: */
323: public boolean fireWSElementPreModify(IWSElement wsProject,
324: IEventPayload payLoad);
325:
326: /**
327: * Fired right after a WSElement was modified.
328: */
329: public void fireWSElementModified(IWSElement element,
330: IEventPayload payLoad);
331:
332: public boolean fireWSElementPreAliasChanged(IWSElement element,
333: String newVal, IEventPayload payload);
334:
335: public void fireWSElementAliasChanged(IWSElement element,
336: IEventPayload payload);
337: }
|