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: public abstract class CommitingPage extends ExtendableWikiPage {
06: protected CommitingPage(String name, WikiPage parent) {
07: super (name, parent);
08: }
09:
10: protected abstract VersionInfo makeVersion() throws Exception;
11:
12: protected abstract void doCommit(PageData data) throws Exception;
13:
14: public VersionInfo commit(PageData data) throws Exception {
15: VersionInfo previousVersion = makeVersion();
16: doCommit(data);
17: return previousVersion;
18: }
19:
20: }
|