01: /*
02: Very Quick Wiki - WikiWikiWeb clone
03: Copyright (C) 2001-2002 Gareth Cronin
04:
05: This program is free software; you can redistribute it and/or modify
06: it under the terms of the latest version of the GNU Lesser General
07: Public License as published by the Free Software Foundation;
08:
09: This program is distributed in the hope that it will be useful,
10: but WITHOUT ANY WARRANTY; without even the implied warranty of
11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: GNU Lesser General Public License for more details.
13:
14: You should have received a copy of the GNU Lesser General Public License
15: along with this program (gpl.txt); if not, write to the Free Software
16: Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: */
18: package vqwiki;
19:
20: import java.util.List;
21: import java.util.Date;
22:
23: public interface VersionManager {
24:
25: /**
26: * Returns the revision key to get topic with
27: * Revision 0 is the most recent revision
28: */
29: public Object lookupRevision(String virtualWiki, String topicName,
30: int version) throws Exception;
31:
32: /**
33: *
34: */
35: public String diff(String virtualWiki, String topicName,
36: int revision1, int revision2, boolean useHtml)
37: throws Exception;
38:
39: /**
40: *
41: */
42: public java.util.Date lastRevisionDate(String virtualWiki,
43: String topicName) throws Exception;
44:
45: /**
46: * Returns all versions of the given topic in reverse chronological order
47: * @param virtualWiki
48: * @param topicName
49: * @return
50: * @throws Exception
51: */
52: public List getAllVersions(String virtualWiki, String topicName)
53: throws Exception;
54:
55: /**
56: *
57: */
58: public TopicVersion getTopicVersion(String virtualWiki,
59: String topicName, int versionNumber) throws Exception;
60:
61: /**
62: *
63: */
64: public String getVersionContents(String virtualWiki,
65: String topicName, int versionNumber) throws Exception;
66:
67: /**
68: *
69: */
70: public int getNumberOfVersions(String virtualWiki, String topicName)
71: throws Exception;
72:
73: /**
74: *
75: */
76: void addVersion(String virtualWiki, String topicName,
77: String contents, Date at) throws Exception;
78: }
|