|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WikiPageProvider
Each Wiki page provider should implement this interface.
You can build whatever page providers based on this, just leave the unused methods do something useful.
WikiPageProvider uses Strings and ints to refer to pages. This may be a bit odd, since WikiAttachmentProviders all use Attachment instead of name/version. We will perhaps modify these in the future. In the mean time, name/version is quite sufficient.
FIXME: In reality we should have an AbstractWikiPageProvider, which would provide intelligent backups for subclasses.
Field Summary |
---|
Fields inherited from interface com.ecyrd.jspwiki.WikiProvider |
---|
LATEST_VERSION |
Method Summary | |
---|---|
void |
deletePage(String pageName)
Removes an entire page from the repository. |
void |
deleteVersion(String pageName,
int version)
Removes a specific version from the repository. |
Collection |
findPages(QueryItem[] query)
Finds pages based on the query. |
Collection |
getAllChangedSince(Date date)
Gets a list of recent changes. |
Collection |
getAllPages()
Returns all pages. |
int |
getPageCount()
Gets the number of pages. |
WikiPage |
getPageInfo(String page,
int version)
Returns info about the page. |
String |
getPageText(String page,
int version)
Gets a specific version out of the repository. |
List |
getVersionHistory(String page)
Returns version history. |
void |
movePage(String from,
String to)
Move a page |
boolean |
pageExists(String page)
Return true, if page exists. |
void |
putPageText(WikiPage page,
String text)
Attempts to save the page text for page "page". |
Methods inherited from interface com.ecyrd.jspwiki.WikiProvider |
---|
getProviderInfo, initialize |
Method Detail |
---|
void putPageText(WikiPage page, String text) throws ProviderException
ProviderException
boolean pageExists(String page)
Collection findPages(QueryItem[] query)
WikiPage getPageInfo(String page, int version) throws ProviderException
ProviderException
Collection getAllPages() throws ProviderException
ProviderException
Collection getAllChangedSince(Date date)
int getPageCount() throws ProviderException
ProviderException
List getVersionHistory(String page) throws ProviderException
ProviderException
String getPageText(String page, int version) throws ProviderException
page
- Name of the page to fetch.version
- Version of the page to fetch.
ProviderException
void deleteVersion(String pageName, int version) throws ProviderException
pageName
- Name of the page to be removed.version
- Version of the page to be removed. May be LATEST_VERSION.
ProviderException
- If the page cannot be removed for some reason.void deletePage(String pageName) throws ProviderException
The reason why this is named differently from deleteVersion() (logically, this method should be an overloaded version) is that I want to be absolutely sure I don't accidentally use the wrong method. With overloading something like that happens sometimes...
pageName
- Name of the page to be removed completely.
ProviderException
- If the page could not be removed for some reason.void movePage(String from, String to) throws ProviderException
from
- Name of the page to move.to
- New name of the page.
ProviderException
- If the page could not be moved for some reason.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |