001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.wiki.engines.mediawiki;
016    
017    import java.sql.Connection;
018    
019    import java.util.LinkedHashMap;
020    import java.util.List;
021    import java.util.Locale;
022    import java.util.Map;
023    
024    import org.jamwiki.DataHandler;
025    import org.jamwiki.model.Category;
026    import org.jamwiki.model.Interwiki;
027    import org.jamwiki.model.LogItem;
028    import org.jamwiki.model.Namespace;
029    import org.jamwiki.model.RecentChange;
030    import org.jamwiki.model.Role;
031    import org.jamwiki.model.RoleMap;
032    import org.jamwiki.model.Topic;
033    import org.jamwiki.model.TopicType;
034    import org.jamwiki.model.TopicVersion;
035    import org.jamwiki.model.VirtualWiki;
036    import org.jamwiki.model.Watchlist;
037    import org.jamwiki.model.WikiFile;
038    import org.jamwiki.model.WikiFileVersion;
039    import org.jamwiki.model.WikiGroup;
040    import org.jamwiki.model.WikiUser;
041    import org.jamwiki.utils.Pagination;
042    
043    /**
044     * @author Jonathan Potter
045     */
046    public class DummyDataHandler implements DataHandler {
047    
048            @Override
049            public boolean authenticate(String username, String password) {
050                    return false;
051            }
052    
053            @Override
054            public boolean canMoveTopic(Topic fromTopic, String destination) {
055                    return false;
056            }
057    
058            @Override
059            public void deleteInterwiki(Interwiki interwiki) {
060            }
061    
062            @Override
063            public void deleteTopic(Topic topic, TopicVersion topicVersion) {
064            }
065    
066            @Override
067            public void executeUpgradeQuery(String prop, Connection conn) {
068            }
069    
070            @Override
071            public void executeUpgradeUpdate(String prop, Connection conn) {
072            }
073    
074            @Override
075            public List<Category> getAllCategories(
076                    String virtualWiki, Pagination pagination) {
077    
078                    return null;
079            }
080    
081            @Override
082            public List<Role> getAllRoles() {
083                    return null;
084            }
085    
086            @Override
087            public List<String> getAllTopicNames(
088                    String virtualWiki, boolean includeDeleted) {
089    
090                    return null;
091            }
092    
093            @Override
094            public List<WikiFileVersion> getAllWikiFileVersions(
095                    String virtualWiki, String topicName, boolean descending) {
096    
097                    return null;
098            }
099    
100            @Override
101            public List<LogItem> getLogItems(
102                    String virtualWiki, int logType, Pagination pagination,
103                    boolean descending) {
104    
105                    return null;
106            }
107    
108            @Override
109            public List<RecentChange> getRecentChanges(
110                    String virtualWiki, Pagination pagination, boolean descending) {
111    
112                    return null;
113            }
114    
115            @Override
116            public List<RoleMap> getRoleMapByLogin(String loginFragment) {
117                    return null;
118            }
119    
120            @Override
121            public List<RoleMap> getRoleMapByRole(String roleName) {
122                    return null;
123            }
124    
125            @Override
126            public List<Role> getRoleMapGroup(String groupName) {
127                    return null;
128            }
129    
130            @Override
131            public List<RoleMap> getRoleMapGroups() {
132                    return null;
133            }
134    
135            @Override
136            public List<Role> getRoleMapUser(String login) {
137                    return null;
138            }
139    
140            @Override
141            public List<RecentChange> getTopicHistory(
142                    String virtualWiki, String topicName, Pagination pagination,
143                    boolean descending) {
144    
145                    return null;
146            }
147    
148            @Override
149            public List<String> getTopicsAdmin(
150                    String virtualWiki, Pagination pagination) {
151    
152                    return null;
153            }
154    
155            @Override
156            public List<RecentChange> getUserContributions(
157                    String virtualWiki, String userString, Pagination pagination,
158                    boolean descending) {
159    
160                    return null;
161            }
162    
163            @Override
164            public List<VirtualWiki> getVirtualWikiList() {
165                    return null;
166            }
167    
168            @Override
169            public Watchlist getWatchlist(String virtualWiki, int userId) {
170                    return null;
171            }
172    
173            @Override
174            public List<RecentChange> getWatchlist(
175                    String virtualWiki, int userId, Pagination pagination) {
176    
177                    return null;
178            }
179    
180            @Override
181            public List<Category> lookupCategoryTopics(
182                    String virtualWiki, String categoryName) {
183    
184                    return null;
185            }
186    
187            @Override
188            public Map<String, String> lookupConfiguration() {
189                    return null;
190            }
191    
192            @Override
193            public Interwiki lookupInterwiki(String interwikiPrefix) {
194                    return null;
195            }
196    
197            @Override
198            public List<Interwiki> lookupInterwikis() {
199                    return null;
200            }
201    
202            @Override
203            public Namespace lookupNamespace(
204                    String virtualWiki, String namespaceString) {
205    
206                    return null;
207            }
208    
209            @Override
210            public Namespace lookupNamespaceById(int namespaceId) {
211                    return null;
212            }
213    
214            @Override
215            public List<Namespace> lookupNamespaces() {
216                    return null;
217            }
218    
219            @Override
220            public Topic lookupTopic(
221                    String virtualWiki, String topicName, boolean deleteOK,
222                    Connection conn) {
223    
224                    return null;
225            }
226    
227            @Override
228            public Topic lookupTopicById(String virtualWiki, int topicId) {
229                    return null;
230            }
231    
232            @Override
233            public Map<Integer, String> lookupTopicByType(
234                    String virtualWiki, TopicType topicType1, TopicType topicType2,
235                    Integer namespaceId, Pagination pagination) {
236    
237                    return null;
238            }
239    
240            @Override
241            public int lookupTopicCount(String virtualWiki, Integer namespaceId) {
242                    return 0;
243            }
244    
245            @Override
246            public List<String> lookupTopicLinkOrphans(
247                    String virtualWiki, int namespaceId) {
248    
249                    return null;
250            }
251    
252            @Override
253            public List<String> lookupTopicLinks(String virtualWiki, String topicName) {
254                    return null;
255            }
256    
257            @Override
258            public String lookupTopicName(String virtualWiki, String topicName) {
259                    return null;
260            }
261    
262            @Override
263            public TopicVersion lookupTopicVersion(int topicVersionId) {
264                    return null;
265            }
266    
267            @Override
268            public Integer lookupTopicVersionNextId(int topicVersionId) {
269                    return null;
270            }
271    
272            @Override
273            public VirtualWiki lookupVirtualWiki(String virtualWikiName) {
274                    return null;
275            }
276    
277            @Override
278            public WikiFile lookupWikiFile(String virtualWiki, String topicName) {
279                    return null;
280            }
281    
282            @Override
283            public int lookupWikiFileCount(String virtualWiki) {
284                    return 0;
285            }
286    
287            @Override
288            public WikiGroup lookupWikiGroup(String groupName) {
289                    return null;
290            }
291    
292            @Override
293            public WikiUser lookupWikiUser(int userId) {
294                    return null;
295            }
296    
297            @Override
298            public WikiUser lookupWikiUser(String username) {
299                    return null;
300            }
301    
302            @Override
303            public int lookupWikiUserCount() {
304                    return 0;
305            }
306    
307            @Override
308            public String lookupWikiUserEncryptedPassword(String username) {
309                    return null;
310            }
311    
312            @Override
313            public List<String> lookupWikiUsers(Pagination pagination) {
314                    return null;
315            }
316    
317            @Override
318            public void moveTopic(
319                    Topic fromTopic, TopicVersion fromVersion, String destination) {
320            }
321    
322            @Override
323            public void orderTopicVersions(
324                    Topic topic, List<Integer> topicVersionIdList) {
325            }
326    
327            @Override
328            public void reloadLogItems() {
329            }
330    
331            @Override
332            public void reloadRecentChanges() {
333            }
334    
335            @Override
336            public void setup(
337                    Locale locale, WikiUser user, String username,
338                    String encryptedPassword) {
339            }
340    
341            @Override
342            public void setupSpecialPages(
343                    Locale locale, WikiUser user, VirtualWiki virtualWiki) {
344            }
345    
346            @Override
347            public void undeleteTopic(Topic topic, TopicVersion topicVersion) {
348            }
349    
350            @Override
351            public void updateSpecialPage(
352                    Locale locale, String virtualWiki, String topicName,
353                    String userDisplay) {
354            }
355    
356            @Override
357            public void writeConfiguration(Map<String, String> configuration) {
358            }
359    
360            @Override
361            public void writeFile(WikiFile wikiFile, WikiFileVersion wikiFileVersion) {
362            }
363    
364            @Override
365            public void writeInterwiki(Interwiki interwiki) {
366            }
367    
368            @Override
369            public void writeNamespace(
370                    Namespace mainNamespace, Namespace commentsNamespace) {
371            }
372    
373            @Override
374            public void writeNamespaceTranslations(
375                    List<Namespace> namespaces, String virtualWiki) {
376            }
377    
378            @Override
379            public void writeRole(Role role, boolean update) {
380            }
381    
382            @Override
383            public void writeRoleMapGroup(int groupId, List<String> roles) {
384            }
385    
386            @Override
387            public void writeRoleMapUser(String username, List<String> roles) {
388            }
389    
390            @Override
391            public void writeTopic(
392                    Topic topic, TopicVersion topicVersion,
393                    LinkedHashMap<String, String> categories, List<String> links) {
394            }
395    
396            @Override
397            public void writeTopicVersion(Topic topic, TopicVersion topicVersion) {
398            }
399    
400            @Override
401            public void writeVirtualWiki(VirtualWiki virtualWiki) {
402            }
403    
404            @Override
405            public void writeWatchlistEntry(
406                    Watchlist watchlist, String virtualWiki, String topicName, int userId) {
407            }
408    
409            @Override
410            public void writeWikiGroup(WikiGroup group) {
411            }
412    
413            @Override
414            public void writeWikiUser(
415                    WikiUser user, String username, String encryptedPassword) {
416            }
417    
418    }