001: package ru.emdev.EmForge.wiki;
002:
003: import java.io.IOException;
004: import java.util.ArrayList;
005: import java.util.Collection;
006: import java.util.Date;
007: import java.util.List;
008: import java.util.Properties;
009:
010: import com.ecyrd.jspwiki.NoRequiredPropertyException;
011: import com.ecyrd.jspwiki.QueryItem;
012: import com.ecyrd.jspwiki.WikiEngine;
013: import com.ecyrd.jspwiki.WikiPage;
014: import com.ecyrd.jspwiki.providers.ProviderException;
015: import com.ecyrd.jspwiki.providers.WikiPageProvider;
016:
017: /** Dummy Wiki Page Provider
018: *
019: * This page provider used in JspWiki & Spring integration for initialization of WikiEngine
020: * with some empty page provider. After it real page provider will be set according to the
021: * Spring Bean Settings
022: *
023: * @author akakunin
024: *
025: */
026: public class DummyPageProvider implements WikiPageProvider {
027:
028: public void putPageText(WikiPage page, String text)
029: throws ProviderException {
030: // TODO Auto-generated method stub
031:
032: }
033:
034: public boolean pageExists(String page) {
035: // TODO Auto-generated method stub
036: return false;
037: }
038:
039: public Collection findPages(QueryItem[] query) {
040: // returns empty collection
041: return new ArrayList();
042: }
043:
044: public WikiPage getPageInfo(String page, int version)
045: throws ProviderException {
046: // TODO Auto-generated method stub
047: return null;
048: }
049:
050: public Collection getAllPages() throws ProviderException {
051: // returns empty collection
052: return new ArrayList();
053: }
054:
055: public Collection getAllChangedSince(Date date) {
056: // returns empty collection
057: return new ArrayList();
058: }
059:
060: public int getPageCount() throws ProviderException {
061: return 0;
062: }
063:
064: public List getVersionHistory(String page) throws ProviderException {
065: // returns empty collection
066: return new ArrayList();
067: }
068:
069: public String getPageText(String page, int version)
070: throws ProviderException {
071: return "";
072: }
073:
074: public void deleteVersion(String pageName, int version)
075: throws ProviderException {
076: // TODO Auto-generated method stub
077:
078: }
079:
080: public void deletePage(String pageName) throws ProviderException {
081: // TODO Auto-generated method stub
082:
083: }
084:
085: public void movePage(String from, String to)
086: throws ProviderException {
087: // TODO Auto-generated method stub
088:
089: }
090:
091: public void initialize(WikiEngine engine, Properties properties)
092: throws NoRequiredPropertyException, IOException {
093: // TODO Auto-generated method stub
094:
095: }
096:
097: public String getProviderInfo() {
098: // TODO Auto-generated method stub
099: return "Dummy Page Provider";
100: }
101:
102: }
|