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.integration.ide.events;
043:
044: /**
045: * The EventProcessor defines a interface to update a Describe with changes
046: * made to classes in a integration. The EventManager is able to manage the
047: * communication and direct the source code event to the correct EventProcessor.
048: * @see EventManager
049: */
050: public interface EventProcessor {
051: public void deleteClass(SymbolTransaction state);
052:
053: /**
054: * Issue a command to Describe to delete a method from a class symbol.
055: * @param state The transaction to act upon.
056: */
057: public void deleteMethod(MethodTransaction state);
058:
059: /**
060: * Issue a command to Describe to delete a data member from a class symbol.
061: * @param state The transaction to act upon.
062: */
063: public void deleteMember(MemberTransaction state);
064:
065: /**
066: * Issue a command to Describe remove all imports from a class symbol.
067: * @param state The transaction to act upon.
068: */
069: public void clearImports(SymbolTransaction state);
070:
071: /**
072: * Issue a command to Describe remove all exceptions from a class symbol.
073: * @param state The transaction to act upon.
074: */
075: public void clearExceptions(MethodTransaction state);
076:
077: /**
078: * Issue a command to Describe add an import to a class symbol.
079: * @param state The transaction to act upon.
080: * @parma value The import to add.
081: */
082: public void addImport(SymbolTransaction state, String value);
083:
084: /**
085: * Issue a command to Describe add an interface implementation to a class symbol.
086: * @param state The transaction to act upon.
087: * @param pName The name of the package that contains the interface.
088: * @param name The name of the interface.
089: */
090: public void addInterface(SymbolTransaction state, String pName,
091: String name);
092:
093: /**
094: * Issue a command to Describe remvoe an interface implementation from a class symbol.
095: * @param state The transaction to act upon.
096: * @param pName The name of the package that contains the interface.
097: * @param name The name of the interface.
098: */
099: public void removeInterface(SymbolTransaction state, String pName,
100: String name);
101:
102: /**
103: * Issue a command to Describe add an exception to a class symbol.
104: * @param state The transaction to act upon.
105: * @param value The exception to add.
106: */
107: public void addException(MethodTransaction state, String value);
108:
109: /**
110: * Issue a command to Describe add a collection of exceptions to a class symbol.
111: * @param state The transaction to act upon.
112: * @param value The exceptions to add.
113: */
114: public void setExceptions(MethodTransaction state, String value);
115:
116: /**
117: * Issue a command to Describe to updates a attibute on a class symbol. The
118: * attribute must be specified in a fully qualified manner.
119: * <br>
120: * <b>Example:</b> setAttribute("ClassIdentifier.FullyScopedName", name);
121: *
122: * @param state The transaction to act upon.
123: * @param attr The fully qualified name of the attribute.
124: * @param value The new value of the attribute.
125: */
126: public void setAttribute(SymbolTransaction state, String attr,
127: String value);
128:
129: /**
130: * Issue a command to Describe to updates a attibute on a <b>Operations</b>
131: * attribute. The attribute must be specified in a fully qualified manner.
132: * <br>
133: * <b>Example:</b> setAttribute("ClassIdentifier.FullyScopedName", name);
134: *
135: * @param state The transaction to act upon.
136: * @param attr The fully qualified name of the attribute.
137: * @param value The new value of the attribute.
138: */
139: public void setAttribute(MethodTransaction state, String attr,
140: String value);
141:
142: /**
143: * Issue a command to Describe to updates a attibute on a <b>Attributes</b>
144: * attribute. The attribute must be specified in a fully qualified manner.
145: * <br>
146: * <b>Example:</b> setAttribute("ClassIdentifier.FullyScopedName", name);
147: *
148: * @param state The transaction to act upon.
149: * @param attr The fully qualified name of the attribute.
150: * @param value The new value of the attribute.
151: */
152: public void setAttribute(MemberTransaction state, String attr,
153: String value);
154:
155: /**
156: * Issue a command to Describe to updates a tagged value on a <b>Attributes</b>
157: * attribute.
158: *
159: * @param state The transaction to act upon.
160: * @param tag The name of the tag to be set.
161: * @param value The new value of the attribute.
162: */
163: public void setTaggedValue(MemberTransaction state, String tag,
164: String value);
165:
166: /**
167: * Issue a command to Describe to updates a tagged value on a <b>Operations</b>
168: * attribute.
169: *
170: * @param state The transaction to act upon.
171: * @param tag The name of the tag to be set.
172: * @param value The new value of the attribute.
173: */
174: public void setTaggedValue(MethodTransaction state, String tag,
175: String value);
176:
177: /**
178: * Issue a command to Describe to updates a tagged value on a class symbol.
179: *
180: * @param state The transaction to act upon.
181: * @param tag The name of the tag to be set.
182: * @param value The new value of the attribute.
183: */
184: public void setTaggedValue(SymbolTransaction state, String tag,
185: String value);
186:
187: /**
188: * Issue a command to Describe update return type of a method.
189: * @param state The transaction to act upon.
190: * @param value The return type.
191: */
192: public void updateMemberType(MemberTransaction state,
193: String fullName, String sourceName);
194:
195: /**
196: * Issue a command to Describe update the parameters for a method.
197: * @param state The transaction to act upon.
198: * @param value An array or parameters.
199: */
200: public void setMethodParameters(MethodTransaction state,
201: String params);
202:
203: /**
204: * Issue a command to Describe to remove a generalization associated with a
205: * class symbol.
206: * @param state The transaction to act upon.
207: * @param value The value.
208: */
209: public void removeSuperClass(SymbolTransaction state,
210: String className, String packageName);
211:
212: /**
213: * Issue a command to Describe to add a generalization associated with a
214: * class symbol.
215: * @param state The transaction to act upon.
216: * @param value The value.
217: */
218: public void addSuperClass(SymbolTransaction state,
219: String className, String packageName);
220: }
|