01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.components;
04:
05: import fitnesse.wiki.WikiPage;
06: import fitnesse.wikitext.*;
07:
08: public class MovedPageReferenceRenamer extends ReferenceRenamer {
09: private WikiPage pageToBeMoved;
10:
11: private String newParentName;
12:
13: public MovedPageReferenceRenamer(WikiPage root) {
14: super (root);
15: }
16:
17: public void renameReferences(WikiPage pageToBeMoved,
18: String newParentName) throws Exception {
19: this .pageToBeMoved = pageToBeMoved;
20: this .newParentName = newParentName;
21: renameReferences();
22: }
23:
24: protected WidgetVisitor getVisitor() {
25: return new MovedPageReferenceRenamingVisitor(pageToBeMoved,
26: newParentName);
27: }
28:
29: public String getSearchPattern() throws Exception {
30: return pageToBeMoved.getName();
31: }
32: }
|