|
||||||||||
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 org.apache.wiki.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. |
boolean |
pageExists(String page,
int version)
Return true, if page with a particular version exists. |
void |
putPageText(WikiPage page,
String text)
Attempts to save the page text for page "page". |
Methods inherited from interface org.apache.wiki.WikiProvider |
---|
getProviderInfo, initialize |
Method Detail |
---|
void putPageText(WikiPage page, String text) throws ProviderException
page
- The WikiPage to savetext
- The text to save.
ProviderException
- If something goes wrong.boolean pageExists(String page)
page
- The page name.
boolean pageExists(String page, int version)
page
- The page name to check forversion
- The version to check
Collection findPages(QueryItem[] query)
This method should really be a part of the FastSearch IF.
query
- An array of QueryItems to match
WikiPage getPageInfo(String page, int version) throws ProviderException
page
- The page nameversion
- The version number
ProviderException
- If something goes wrong.Collection getAllPages() throws ProviderException
ProviderException
- If something goes wrong.Collection getAllChangedSince(Date date)
date
- The date to check from
int getPageCount() throws ProviderException
ProviderException
- If something goes wrongList getVersionHistory(String page) throws ProviderException
page
- The name of the page to get the history from.
ProviderException
- If something goes wrong.String getPageText(String page, int version) throws ProviderException
page
- Name of the page to fetch.version
- Version of the page to fetch.
ProviderException
- If something goes wrong.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 |