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.wiki;
04:
05: import java.util.*;
06:
07: public abstract class ExtendableWikiPage extends BaseWikiPage {
08: private Map extensions = new HashMap();
09:
10: public ExtendableWikiPage(String name, WikiPage parent) {
11: super (name, parent);
12: }
13:
14: protected void addExtention(Extension extension) {
15: extensions.put(extension.getName(), extension);
16: }
17:
18: public boolean hasExtension(String extensionName) {
19: return extensions.containsKey(extensionName);
20: }
21:
22: public Extension getExtension(String extensionName) {
23: return (Extension) extensions.get(extensionName);
24: }
25: }
|