001: package vqwiki;
002:
003: import vqwiki.db.DBDate;
004:
005: import java.util.Collection;
006: import java.util.List;
007: import java.util.Locale;
008:
009: /**
010: Very Quick Wiki - WikiWikiWeb clone
011: Copyright (C) 2001-2002 Gareth Cronin
012:
013: This program is free software; you can redistribute it and/or modify
014: it under the terms of the latest version of the GNU Lesser General
015: Public License as published by the Free Software Foundation;
016:
017: This program is distributed in the hope that it will be useful,
018: but WITHOUT ANY WARRANTY; without even the implied warranty of
019: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
020: GNU Lesser General Public License for more details.
021:
022: You should have received a copy of the GNU Lesser General Public License
023: along with this program (gpl.txt); if not, write to the Free Software
024: Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
025: */
026:
027: public interface Handler {
028:
029: /**
030: *
031: */
032: public String read(String virtualWiki, String topicName)
033: throws Exception;
034:
035: /**
036: *
037: */
038: public void write(String virtualWiki, String contents,
039: boolean convertTabs, String topicName) throws Exception;
040:
041: /**
042: *
043: */
044: public boolean holdsLock(String virtualWiki, String topicName,
045: String key) throws Exception;
046:
047: /**
048: *
049: */
050: public boolean lockTopic(String virtualWiki, String topicName,
051: String key) throws Exception;
052:
053: /**
054: *
055: */
056: public void unlockTopic(String virtualWiki, String topicName)
057: throws Exception;
058:
059: /**
060: *
061: */
062: public boolean isTopicReadOnly(String virtualWiki, String topicName)
063: throws Exception;
064:
065: /**
066: *
067: */
068: public Collection getReadOnlyTopics(String virtualWiki)
069: throws Exception;
070:
071: /**
072: *
073: */
074: public void addReadOnlyTopic(String virtualWiki, String topicName)
075: throws Exception;
076:
077: /**
078: *
079: */
080: public void removeReadOnlyTopic(String virtualWiki, String topicName)
081: throws Exception;
082:
083: /**
084: *
085: */
086: public boolean exists(String virtualWiki, String topicName)
087: throws Exception;
088:
089: /**
090: *
091: */
092: public void initialise(Locale locale) throws Exception;
093:
094: /**
095: *
096: */
097: public Collection getVirtualWikiList() throws Exception;
098:
099: /**
100: *
101: */
102: public Collection getTemplateNames(String virtualWiki)
103: throws Exception;
104:
105: /**
106: *
107: */
108: public String getTemplate(String virtualWiki, String templateName)
109: throws Exception;
110:
111: /**
112: *
113: */
114: public void addVirtualWiki(String virtualWiki) throws Exception;
115:
116: /**
117: *
118: */
119: public Collection purgeDeletes(String virtualWiki) throws Exception;
120:
121: /**
122: *
123: */
124: public void purgeVersionsOlderThan(String virtualWiki, DBDate date)
125: throws Exception;
126:
127: /**
128: *
129: */
130: public void saveAsTemplate(String virtualWiki, String templateName,
131: String contents) throws Exception;
132:
133: /**
134: *
135: */
136: public List getLockList(String virtualWiki) throws Exception;
137: }
|