KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > refactoring > rename > WebXmlRenameRefactoring


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * 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-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.refactoring.rename;
21
22 import java.io.IOException JavaDoc;
23 import java.text.MessageFormat JavaDoc;
24 import java.util.Collection JavaDoc;
25 import java.util.Iterator JavaDoc;
26 import javax.jmi.reflect.RefObject;
27 import org.netbeans.modules.j2ee.dd.api.web.DDProvider;
28 import org.netbeans.modules.j2ee.dd.api.web.Filter;
29 import org.netbeans.modules.j2ee.dd.api.web.Listener;
30 import org.netbeans.modules.j2ee.dd.api.web.Servlet;
31 import org.netbeans.modules.j2ee.dd.api.web.WebApp;
32 import org.netbeans.jmi.javamodel.JavaClass;
33 import org.netbeans.jmi.javamodel.Resource;
34 import org.netbeans.modules.j2ee.refactoring.Utility;
35 import org.netbeans.modules.javacore.api.JavaModel;
36 import org.netbeans.modules.javacore.internalapi.ExternalChange;
37 import org.netbeans.modules.javacore.internalapi.JavaMetamodel;
38 import org.netbeans.modules.refactoring.api.AbstractRefactoring;
39 import org.netbeans.modules.refactoring.api.Problem;
40 import org.netbeans.modules.refactoring.spi.RefactoringElementsBag;
41 import org.netbeans.modules.refactoring.spi.RefactoringElementImplementation;
42 import org.netbeans.modules.web.api.webmodule.WebModule;
43 import org.openide.ErrorManager;
44 import org.openide.filesystems.FileObject;
45 import org.openide.util.NbBundle;
46
47 /**
48  *
49  * @author Martin Grebac
50  */

51 public final class WebXmlRenameRefactoring {
52     
53     private static final ErrorManager err = ErrorManager.getDefault().getInstance("org.netbeans.modules.j2ee.refactoring.rename"); // NOI18N
54

55     public WebXmlRenameRefactoring() { }
56     
57     public Problem precheck() {
58         return null;
59     }
60     
61     /** Find usages in web deployment descriptor: web.xml
62      */

63     public Problem prepare(AbstractRefactoring refactoring, RefObject refObject, String JavaDoc newName, RefactoringElementsBag refactoringElements) {
64         
65         Problem problem = null;
66         // Going to rename Class
67
if (refObject instanceof JavaClass) {
68             JavaClass jClass = (JavaClass)refObject;
69             
70             String JavaDoc name = jClass.getName();
71             err.log("name: " + name);
72             
73             newName = name.substring(0, name.lastIndexOf('.') + 1) + newName;
74             err.log("newName: " + newName);
75             
76             Resource res = jClass.getResource();
77             FileObject fo = JavaModel.getFileObject(res);
78             Collection JavaDoc wmodules = Utility.getRelevantWebModules(fo);
79             Iterator JavaDoc wmIter = null;
80             
81             if (wmodules != null) {
82                 wmIter = wmodules.iterator();
83             }
84             if (wmIter != null) {
85                 while (wmIter.hasNext()) {
86                     WebModule wm = (WebModule)wmIter.next();
87                     if (wm != null) { // the class is in a web module
88
FileObject webXmlFO = wm.getDeploymentDescriptor();
89                         WebApp webXmlDD = null;
90                         try {
91                             webXmlDD = DDProvider.getDefault().getDDRoot(webXmlFO);
92                         } catch (IOException JavaDoc ioe) {
93                             // ignore
94
}
95                         if ((webXmlDD != null) && (webXmlDD.getStatus()!=WebApp.STATE_INVALID_UNPARSABLE)) {
96                             //servlets
97
Servlet[] servlets = webXmlDD.getServlet();
98                             if ((servlets!=null) && (servlets.length > 0)) {
99                                 for (int s=0; s < servlets.length; s++) {
100                                     Servlet servlet = (Servlet)servlets[s];
101                                     err.log("Servlet: " + servlet);
102                                     String JavaDoc servletClass = servlet.getServletClass();
103                                     err.log("Servlet class: " + servletClass);
104                                     if ((servletClass != null) && (servletClass.equals(name))) {
105                                         RefactoringElementImplementation elem =
106                                                 new WebXmlServletRenameRefactoringElement(webXmlDD, name, newName,
107                                                 servlet, webXmlFO
108                                                 );
109                                         refactoringElements.add(refactoring, elem);
110                                         // servlet name
111
String JavaDoc servletName = servlet.getServletName();
112                                         String JavaDoc unqualifiedName = Utility.unqualify(name);
113                                         if (servletName != null && servletName.equals(unqualifiedName)) {
114                                             RefactoringElementImplementation nameElem =
115                                                     new WebXmlServletNameRenameRefactoringElement(webXmlDD, unqualifiedName, Utility.unqualify(newName),
116                                                     servlet, webXmlFO
117                                                     );
118                                             refactoringElements.add(refactoring, nameElem);
119                                         }
120                                     }
121                                     
122                                 }
123                             }
124                             //listeners
125
Listener[] listeners = webXmlDD.getListener();
126                             if ((listeners!=null) && (listeners.length > 0)) {
127                                 for (int s=0; s < listeners.length; s++) {
128                                     Listener listener = (Listener)listeners[s];
129                                     err.log("Listener: " + listener);
130                                     String JavaDoc listenerClass = listener.getListenerClass();
131                                     err.log("Listener class: " + listenerClass);
132                                     if ((listenerClass != null) && (listenerClass.equals(name))) {
133                                         RefactoringElementImplementation elem =
134                                                 new WebXmlListenerRenameRefactoringElement(webXmlDD, name, newName,
135                                                 listener, webXmlFO
136                                                 );
137                                         refactoringElements.add(refactoring, elem);
138                                     }
139                                 }
140                             }
141                             //filters
142
Filter[] filters = webXmlDD.getFilter();
143                             if ((filters!=null) && (filters.length > 0)) {
144                                 for (int s=0; s < filters.length; s++) {
145                                     Filter filter = (Filter)filters[s];
146                                     err.log("Filter: " + filter);
147                                     String JavaDoc filterClass = filter.getFilterClass();
148                                     err.log("Filter class: " + filterClass);
149                                     if ((filterClass != null) && (filterClass.equals(name))) {
150                                         RefactoringElementImplementation elem =
151                                                 new WebXmlFilterRenameRefactoringElement(webXmlDD, name, newName,
152                                                 filter, webXmlFO
153                                                 );
154                                         refactoringElements.add(refactoring, elem);
155                                     }
156                                 }
157                             }
158                             
159                             // refs
160
org.netbeans.modules.j2ee.dd.api.common.EjbRef[] refs = webXmlDD.getEjbRef();
161                             if ((refs != null) && (refs.length > 0)) {
162                                 for (int l=0; l < refs.length; l++) {
163                                     org.netbeans.modules.j2ee.dd.api.common.EjbRef ref = (org.netbeans.modules.j2ee.dd.api.common.EjbRef)refs[l];
164                                     err.log("EJB ref: " + ref);
165                                     String JavaDoc refHome = ref.getHome();
166                                     err.log("home ref: " + refHome);
167                                     if ((refHome != null) && (refHome.equals(name))) {
168                                         RefactoringElementImplementation elem =
169                                                 new WebXmlRefHomeRenameRefactoringElement(webXmlDD, name, newName,
170                                                 (org.netbeans.modules.j2ee.dd.api.common.EjbRef)ref,
171                                                 webXmlFO
172                                                 );
173                                         refactoringElements.add(refactoring, elem);
174                                     }
175                                     String JavaDoc refRemote = ref.getRemote();
176                                     err.log("localHome ref: " + refRemote);
177                                     if ((refRemote != null) && (refRemote.equals(name))) {
178                                         RefactoringElementImplementation elem =
179                                                 new WebXmlRefRemoteRenameRefactoringElement(webXmlDD, name, newName,
180                                                 (org.netbeans.modules.j2ee.dd.api.common.EjbRef)ref,
181                                                 webXmlFO
182                                                 );
183                                         refactoringElements.add(refactoring, elem);
184                                     }
185                                 }
186                             }
187                             
188                             // local refs
189
org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef[] localRefs = webXmlDD.getEjbLocalRef();
190                             if ((localRefs != null) && (localRefs.length > 0)) {
191                                 for (int l=0; l < localRefs.length; l++) {
192                                     org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef localRef = (org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef)localRefs[l];
193                                     err.log("EJB local ref: " + localRef);
194                                     String JavaDoc refLocal = localRef.getLocal();
195                                     err.log("local ref: " + refLocal);
196                                     if ((refLocal != null) && (refLocal.equals(name))) {
197                                         RefactoringElementImplementation elem =
198                                                 new WebXmlRefLocalRenameRefactoringElement(webXmlDD, name, newName,
199                                                 (org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef)localRef,
200                                                 webXmlFO
201                                                 );
202                                         refactoringElements.add(refactoring, elem);
203                                     }
204                                     String JavaDoc refLocalHome = localRef.getLocalHome();
205                                     err.log("localHome ref: " + refLocalHome);
206                                     if ((refLocalHome != null) && (refLocalHome.equals(name))) {
207                                         RefactoringElementImplementation elem =
208                                                 new WebXmlRefLocalHomeRenameRefactoringElement(webXmlDD, name, newName,
209                                                 (org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef)localRef,
210                                                 webXmlFO
211                                                 );
212                                         refactoringElements.add(refactoring, elem);
213                                     }
214                                 }
215                             }
216                             
217                         } else {
218                             Problem newProblem = new Problem(false, NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlInvalidProblem"));
219                             problem = Utility.addProblemsToEnd(problem, newProblem);
220                         }
221                     }
222                 } //while
223
}
224         }
225         return problem;
226     }
227     /**
228      * Refactoring element for servlet name.
229      */

230     public final class WebXmlServletNameRenameRefactoringElement extends AbstractRenameRefactoringElement implements ExternalChange {
231         
232         protected WebApp webXmlDD;
233         private Servlet servlet;
234         
235         /** Creates a new instance of WebXmlServletNameRenameRefactoringElement */
236         public WebXmlServletNameRenameRefactoringElement(WebApp webXmlDD, String JavaDoc oldName, String JavaDoc newName, Servlet servlet, FileObject parentFile) {
237             this.webXmlDD = webXmlDD;
238             this.oldName = oldName;
239             this.newName = newName;
240             this.servlet = servlet;
241             this.parentFile = parentFile;
242             // should be disabled by default
243
this.enabled = false;
244         }
245         
246         /** Returns text describing the refactoring formatted for display (using HTML tags).
247          * @return Formatted text.
248          */

249         public String JavaDoc getDisplayText() {
250             Object JavaDoc[] args = new Object JavaDoc [] {parentFile.getNameExt(), oldName, newName};
251             return MessageFormat.format(NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlServletNameRename"), args);
252         }
253         
254         public void performExternalChange() {
255             servlet.setServletName(newName);
256             try {
257                 webXmlDD.write(parentFile);
258             } catch (IOException JavaDoc ioe) {
259                 //TODO
260
}
261         }
262         
263         public void undoExternalChange() {
264             servlet.setServletName(oldName);
265             try {
266                 webXmlDD.write(parentFile);
267             } catch (IOException JavaDoc ioe) {
268                 //TODO
269
}
270         }
271         
272         /** Performs the change represented by this refactoring element.
273          */

274         public void performChange() {
275             JavaMetamodel.getManager().registerExtChange(this);
276         }
277         
278     }
279     
280     public final class WebXmlServletRenameRefactoringElement extends AbstractRenameRefactoringElement implements ExternalChange {
281         
282         protected WebApp webXmlDD;
283         private Servlet servlet;
284         
285         /** Creates a new instance of WebXmlServletRenameRefactoringElement */
286         public WebXmlServletRenameRefactoringElement(WebApp webXmlDD, String JavaDoc oldName, String JavaDoc newName, Servlet servlet, FileObject parentFile) {
287             this.webXmlDD = webXmlDD;
288             this.oldName = oldName;
289             this.newName = newName;
290             this.servlet = servlet;
291             this.parentFile = parentFile;
292         }
293         
294         /** Returns text describing the refactoring formatted for display (using HTML tags).
295          * @return Formatted text.
296          */

297         public String JavaDoc getDisplayText() {
298             Object JavaDoc[] args = new Object JavaDoc [] {parentFile.getNameExt(), oldName, newName};
299             return MessageFormat.format(NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlServletRename"), args);
300         }
301         
302         public void performExternalChange() {
303             servlet.setServletClass(newName);
304             try {
305                 webXmlDD.write(parentFile);
306             } catch (IOException JavaDoc ioe) {
307                 //TODO
308
}
309         }
310         
311         public void undoExternalChange() {
312             servlet.setServletClass(oldName);
313             try {
314                 webXmlDD.write(parentFile);
315             } catch (IOException JavaDoc ioe) {
316                 //TODO
317
}
318         }
319         
320         /** Performs the change represented by this refactoring element.
321          */

322         public void performChange() {
323             JavaMetamodel.getManager().registerExtChange(this);
324         }
325         
326     }
327     
328     public final class WebXmlListenerRenameRefactoringElement extends AbstractRenameRefactoringElement implements ExternalChange {
329         
330         protected WebApp webXmlDD;
331         private Listener listener;
332         
333         /** Creates a new instance of WebXmlListenerRenameRefactoringElement */
334         public WebXmlListenerRenameRefactoringElement(WebApp webXmlDD, String JavaDoc oldName, String JavaDoc newName, Listener listener, FileObject parentFile) {
335             this.webXmlDD = webXmlDD;
336             this.oldName = oldName;
337             this.newName = newName;
338             this.listener = listener;
339             this.parentFile = parentFile;
340         }
341         
342         /** Returns text describing the refactoring formatted for display (using HTML tags).
343          * @return Formatted text.
344          */

345         public String JavaDoc getDisplayText() {
346             Object JavaDoc[] args = new Object JavaDoc [] {parentFile.getNameExt(), oldName, newName};
347             return MessageFormat.format(NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlListenerRename"), args);
348         }
349         
350         /** Performs the change represented by this refactoring element.
351          */

352         public void performChange() {
353             JavaMetamodel.getManager().registerExtChange(this);
354         }
355         
356         public void performExternalChange() {
357             listener.setListenerClass(newName);
358             try {
359                 webXmlDD.write(parentFile);
360             } catch (IOException JavaDoc ioe) {
361                 //TODO
362
}
363         }
364         
365         public void undoExternalChange() {
366             listener.setListenerClass(oldName);
367             try {
368                 webXmlDD.write(parentFile);
369             } catch (IOException JavaDoc ioe) {
370                 //TODO
371
}
372         }
373     }
374     
375     public final class WebXmlFilterRenameRefactoringElement extends AbstractRenameRefactoringElement implements ExternalChange {
376         
377         protected WebApp webXmlDD;
378         private Filter filter;
379         
380         /** Creates a new instance of WebXmlFilterRenameRefactoringElement */
381         public WebXmlFilterRenameRefactoringElement(WebApp webXmlDD, String JavaDoc oldName, String JavaDoc newName, Filter filter, FileObject parentFile) {
382             this.webXmlDD = webXmlDD;
383             this.oldName = oldName;
384             this.newName = newName;
385             this.filter = filter;
386             this.parentFile = parentFile;
387         }
388         
389         /** Returns text describing the refactoring formatted for display (using HTML tags).
390          * @return Formatted text.
391          */

392         public String JavaDoc getDisplayText() {
393             Object JavaDoc[] args = new Object JavaDoc [] {parentFile.getNameExt(), oldName, newName};
394             return MessageFormat.format(NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlFilterRename"), args);
395         }
396         
397         /** Performs the change represented by this refactoring element.
398          */

399         public void performChange() {
400             JavaMetamodel.getManager().registerExtChange(this);
401         }
402         
403         public void performExternalChange() {
404             filter.setFilterClass(newName);
405             try {
406                 webXmlDD.write(parentFile);
407             } catch (IOException JavaDoc ioe) {
408                 //TODO
409
}
410         }
411         
412         public void undoExternalChange() {
413             filter.setFilterClass(oldName);
414             try {
415                 webXmlDD.write(parentFile);
416             } catch (IOException JavaDoc ioe) {
417                 //TODO
418
}
419         }
420     }
421     
422     public final class WebXmlRefHomeRenameRefactoringElement extends AbstractRenameRefactoringElement implements ExternalChange {
423         
424         protected WebApp webXmlDD;
425         private org.netbeans.modules.j2ee.dd.api.common.EjbRef ref;
426         
427         /** Creates a new instance of WebXmlRefHomeRenameRefactoringElement */
428         public WebXmlRefHomeRenameRefactoringElement(WebApp webXmlDD, String JavaDoc oldName, String JavaDoc newName, org.netbeans.modules.j2ee.dd.api.common.EjbRef ref, FileObject parentFile) {
429             this.webXmlDD = webXmlDD;
430             this.oldName = oldName;
431             this.newName = newName;
432             this.ref = ref;
433             this.parentFile = parentFile;
434         }
435         
436         /** Returns text describing the refactoring formatted for display (using HTML tags).
437          * @return Formatted text.
438          */

439         public String JavaDoc getDisplayText() {
440             Object JavaDoc[] args = new Object JavaDoc [] {parentFile.getNameExt(), oldName, newName};
441             return MessageFormat.format(NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlRefHomeRename"), args);
442         }
443         
444         /** Performs the change represented by this refactoring element.
445          */

446         public void performChange() {
447             JavaMetamodel.getManager().registerExtChange(this);
448         }
449         
450         public void performExternalChange() {
451             ref.setHome(newName);
452             try {
453                 webXmlDD.write(parentFile);
454             } catch (IOException JavaDoc ioe) {
455                 //TODO
456
}
457         }
458         
459         public void undoExternalChange() {
460             ref.setHome(oldName);
461             try {
462                 webXmlDD.write(parentFile);
463             } catch (IOException JavaDoc ioe) {
464                 //TODO
465
}
466         }
467     }
468     
469     public final class WebXmlRefRemoteRenameRefactoringElement extends AbstractRenameRefactoringElement implements ExternalChange {
470         
471         protected WebApp webXmlDD;
472         private org.netbeans.modules.j2ee.dd.api.common.EjbRef ref;
473         
474         /** Creates a new instance of WebXmlRefRemoteRenameRefactoringElement */
475         public WebXmlRefRemoteRenameRefactoringElement(WebApp webXmlDD, String JavaDoc oldName, String JavaDoc newName, org.netbeans.modules.j2ee.dd.api.common.EjbRef ref, FileObject parentFile) {
476             this.webXmlDD = webXmlDD;
477             this.oldName = oldName;
478             this.newName = newName;
479             this.ref = ref;
480             this.parentFile = parentFile;
481         }
482         
483         /** Returns text describing the refactoring formatted for display (using HTML tags).
484          * @return Formatted text.
485          */

486         public String JavaDoc getDisplayText() {
487             Object JavaDoc[] args = new Object JavaDoc [] {parentFile.getNameExt(), oldName, newName};
488             return MessageFormat.format(NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlRefRemoteRename"), args);
489         }
490         
491         /** Performs the change represented by this refactoring element.
492          */

493         public void performChange() {
494             JavaMetamodel.getManager().registerExtChange(this);
495         }
496         
497         public void performExternalChange() {
498             ref.setRemote(newName);
499             try {
500                 webXmlDD.write(parentFile);
501             } catch (IOException JavaDoc ioe) {
502                 //TODO
503
}
504         }
505         
506         public void undoExternalChange() {
507             ref.setRemote(oldName);
508             try {
509                 webXmlDD.write(parentFile);
510             } catch (IOException JavaDoc ioe) {
511                 //TODO
512
}
513         }
514     }
515     
516     public final class WebXmlRefLocalRenameRefactoringElement extends AbstractRenameRefactoringElement implements ExternalChange {
517         
518         protected WebApp webXmlDD;
519         private org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef ref;
520         
521         /** Creates a new instance of WebXmlRefLocalRenameRefactoringElement */
522         public WebXmlRefLocalRenameRefactoringElement(WebApp webXmlDD, String JavaDoc oldName, String JavaDoc newName, org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef ref, FileObject parentFile) {
523             this.webXmlDD = webXmlDD;
524             this.oldName = oldName;
525             this.newName = newName;
526             this.ref = ref;
527             this.parentFile = parentFile;
528         }
529         
530         /** Returns text describing the refactoring formatted for display (using HTML tags).
531          * @return Formatted text.
532          */

533         public String JavaDoc getDisplayText() {
534             Object JavaDoc[] args = new Object JavaDoc [] {parentFile.getNameExt(), oldName, newName};
535             return MessageFormat.format(NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlRefLocalRename"), args);
536         }
537         
538         /** Performs the change represented by this refactoring element.
539          */

540         public void performChange() {
541             JavaMetamodel.getManager().registerExtChange(this);
542         }
543         
544         public void performExternalChange() {
545             ref.setLocal(newName);
546             try {
547                 webXmlDD.write(parentFile);
548             } catch (IOException JavaDoc ioe) {
549                 //TODO
550
}
551         }
552         
553         public void undoExternalChange() {
554             ref.setLocal(oldName);
555             try {
556                 webXmlDD.write(parentFile);
557             } catch (IOException JavaDoc ioe) {
558                 //TODO
559
}
560         }
561     }
562     
563     public final class WebXmlRefLocalHomeRenameRefactoringElement extends AbstractRenameRefactoringElement implements ExternalChange {
564         
565         protected WebApp webXmlDD;
566         private org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef ref;
567         
568         /** Creates a new instance of WebXmlRefLocalHomeRenameRefactoringElement */
569         public WebXmlRefLocalHomeRenameRefactoringElement(WebApp webXmlDD, String JavaDoc oldName, String JavaDoc newName, org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef ref, FileObject parentFile) {
570             this.webXmlDD = webXmlDD;
571             this.oldName = oldName;
572             this.newName = newName;
573             this.ref = ref;
574             this.parentFile = parentFile;
575         }
576         
577         /** Returns text describing the refactoring formatted for display (using HTML tags).
578          * @return Formatted text.
579          */

580         public String JavaDoc getDisplayText() {
581             Object JavaDoc[] args = new Object JavaDoc [] {parentFile.getNameExt(), oldName, newName};
582             return MessageFormat.format(NbBundle.getMessage(WebXmlRenameRefactoring.class, "TXT_WebXmlRefLocalHomeRename"), args);
583         }
584         
585         /** Performs the change represented by this refactoring element.
586          */

587         public void performChange() {
588             JavaMetamodel.getManager().registerExtChange(this);
589         }
590         
591         public void performExternalChange() {
592             ref.setLocalHome(newName);
593             try {
594                 webXmlDD.write(parentFile);
595             } catch (IOException JavaDoc ioe) {
596                 //TODO
597
}
598         }
599         
600         public void undoExternalChange() {
601             ref.setLocalHome(oldName);
602             try {
603                 webXmlDD.write(parentFile);
604             } catch (IOException JavaDoc ioe) {
605                 //TODO
606
}
607         }
608     }
609     
610 }
611
Popular Tags