1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.wiki.engines.mediawiki;
16  
17  import java.sql.Connection;
18  
19  import java.util.LinkedHashMap;
20  import java.util.List;
21  import java.util.Locale;
22  import java.util.Map;
23  
24  import org.jamwiki.DataHandler;
25  import org.jamwiki.model.Category;
26  import org.jamwiki.model.LogItem;
27  import org.jamwiki.model.Namespace;
28  import org.jamwiki.model.RecentChange;
29  import org.jamwiki.model.Role;
30  import org.jamwiki.model.RoleMap;
31  import org.jamwiki.model.Topic;
32  import org.jamwiki.model.TopicType;
33  import org.jamwiki.model.TopicVersion;
34  import org.jamwiki.model.VirtualWiki;
35  import org.jamwiki.model.Watchlist;
36  import org.jamwiki.model.WikiFile;
37  import org.jamwiki.model.WikiFileVersion;
38  import org.jamwiki.model.WikiGroup;
39  import org.jamwiki.model.WikiUser;
40  import org.jamwiki.utils.Pagination;
41  
42  /**
43   * <a href="DummyDataHandler.java.html"><b><i>View Source</i></b></a>
44   *
45   * @author Jonathan Potter
46   */
47  public class DummyDataHandler implements DataHandler {
48  
49      public boolean authenticate(String username, String password) {
50          return false;
51      }
52  
53      public boolean canMoveTopic(Topic fromTopic, String destination) {
54          return false;
55      }
56  
57      public void deleteTopic(Topic topic, TopicVersion topicVersion) {
58      }
59  
60      public void executeUpgradeQuery(String prop, Connection conn) {
61      }
62  
63      public void executeUpgradeUpdate(String prop, Connection conn) {
64      }
65  
66      public List<Category> getAllCategories(
67          String virtualWiki, Pagination pagination) {
68  
69          return null;
70      }
71  
72      public List<Role> getAllRoles() {
73          return null;
74      }
75  
76      public List<String> getAllTopicNames(
77          String virtualWiki, boolean includeDeleted) {
78  
79          return null;
80      }
81  
82      public List<WikiFileVersion> getAllWikiFileVersions(
83          String virtualWiki, String topicName, boolean descending) {
84  
85          return null;
86      }
87  
88      public List<LogItem> getLogItems(
89          String virtualWiki, int logType, Pagination pagination,
90          boolean descending) {
91  
92          return null;
93      }
94  
95      public List<RecentChange> getRecentChanges(
96          String virtualWiki, Pagination pagination, boolean descending) {
97  
98          return null;
99      }
100 
101     public List<RoleMap> getRoleMapByLogin(String loginFragment) {
102         return null;
103     }
104 
105     public List<RoleMap> getRoleMapByRole(String roleName){
106         return null;
107     }
108 
109     public List<Role> getRoleMapGroup(String groupName) {
110         return null;
111     }
112 
113     public List<RoleMap> getRoleMapGroups() {
114         return null;
115     }
116 
117     public List<Role> getRoleMapUser(String login) {
118         return null;
119     }
120 
121     public List<RecentChange> getTopicHistory(
122         String virtualWiki, String topicName, Pagination pagination,
123         boolean descending) {
124 
125         return null;
126     }
127 
128     public List<String> getTopicsAdmin(
129         String virtualWiki, Pagination pagination) {
130 
131         return null;
132     }
133 
134     public List<RecentChange> getUserContributions(
135         String virtualWiki, String userString, Pagination pagination,
136         boolean descending) {
137 
138         return null;
139     }
140 
141     public List<VirtualWiki> getVirtualWikiList() {
142         return null;
143     }
144 
145     public Watchlist getWatchlist(String virtualWiki, int userId) {
146         return null;
147     }
148 
149     public List<RecentChange> getWatchlist(
150         String virtualWiki, int userId, Pagination pagination) {
151 
152         return null;
153     }
154 
155     public List<Category> lookupCategoryTopics(
156         String virtualWiki, String categoryName) {
157 
158         return null;
159     }
160 
161     public Namespace lookupNamespace(
162         String virtualWiki, String namespaceString) {
163 
164         return null;
165     }
166 
167     public Namespace lookupNamespaceById(int namespaceId) {
168         return null;
169     }
170 
171     public List<Namespace> lookupNamespaces() {
172         return null;
173     }
174 
175     public Topic lookupTopic(
176         String virtualWiki, String topicName, boolean deleteOK,
177         Connection conn) {
178 
179         return null;
180     }
181 
182     public Topic lookupTopicById(String virtualWiki, int topicId) {
183         return null;
184     }
185 
186     public Map<Integer, String> lookupTopicByType(
187         String virtualWiki, TopicType topicType1, TopicType topicType2,
188         Integer namespaceId, Pagination pagination) {
189 
190         return null;
191     }
192 
193     public int lookupTopicCount(String virtualWiki, Integer namespaceId) {
194         return 0;
195     }
196 
197     public Integer lookupTopicId(String virtualWiki, String topicName) {
198         return null;
199     }
200 
201     public TopicVersion lookupTopicVersion(int topicVersionId) {
202         return null;
203     }
204 
205     public VirtualWiki lookupVirtualWiki(String virtualWikiName) {
206         return null;
207     }
208 
209     public WikiFile lookupWikiFile(String virtualWiki, String topicName) {
210         return null;
211     }
212 
213     public int lookupWikiFileCount(String virtualWiki) {
214         return 0;
215     }
216 
217     public WikiGroup lookupWikiGroup(String groupName){
218         return null;
219     }
220 
221     public WikiUser lookupWikiUser(int userId) {
222         return null;
223     }
224 
225     public WikiUser lookupWikiUser(String username) {
226         return null;
227     }
228 
229     public int lookupWikiUserCount() {
230         return 0;
231     }
232 
233     public String lookupWikiUserEncryptedPassword(String username) {
234         return null;
235     }
236 
237     public List<String> lookupWikiUsers(Pagination pagination) {
238         return null;
239     }
240 
241     public void moveTopic(
242         Topic fromTopic, TopicVersion fromVersion, String destination) {
243     }
244 
245     public void orderTopicVersions(
246         Topic topic, List<Integer> topicVersionIdList) {
247     }
248 
249     public void reloadLogItems() {
250     }
251 
252     public void reloadRecentChanges() {
253     }
254 
255     public void setup(
256         Locale locale, WikiUser user, String username,
257         String encryptedPassword) {
258     }
259 
260     public void setupSpecialPages(
261         Locale locale, WikiUser user, VirtualWiki virtualWiki) {
262     }
263 
264     public void undeleteTopic(Topic topic, TopicVersion topicVersion) {
265     }
266 
267     public void updateSpecialPage(
268         Locale locale, String virtualWiki, String topicName,
269         String userDisplay) {
270     }
271 
272     public void writeFile(WikiFile wikiFile, WikiFileVersion wikiFileVersion) {
273     }
274 
275     public void writeNamespace(
276         Namespace mainNamespace, Namespace commentsNamespace) {
277     }
278 
279     public void writeNamespaceTranslations(
280         List<Namespace> namespaces, String virtualWiki) {
281     }
282 
283     public void writeRole(Role role, boolean update) {
284     }
285 
286     public void writeRoleMapGroup(int groupId, List<String> roles) {
287     }
288 
289     public void writeRoleMapUser(String username, List<String> roles) {
290     }
291 
292     public void writeTopic(
293         Topic topic, TopicVersion topicVersion,
294         LinkedHashMap<String, String> categories, List<String> links) {
295     }
296 
297     public void writeTopicVersion(Topic topic, TopicVersion topicVersion) {
298     }
299 
300     public void writeVirtualWiki(VirtualWiki virtualWiki) {
301     }
302 
303     public void writeWatchlistEntry(
304         Watchlist watchlist, String virtualWiki, String topicName, int userId) {
305     }
306 
307     public void writeWikiGroup(WikiGroup group) {
308     }
309 
310     public void writeWikiUser(
311         WikiUser user, String username, String encryptedPassword) {
312     }
313 
314 }