|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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(java.lang.String pageName)
Removes an entire page from the repository. |
void |
deleteVersion(java.lang.String pageName,
int version)
Removes a specific version from the repository. |
java.util.Collection |
findPages(QueryItem[] query)
Finds pages based on the query. |
java.util.Collection |
getAllChangedSince(java.util.Date date)
Gets a list of recent changes. |
java.util.Collection |
getAllPages()
Returns all pages. |
int |
getPageCount()
Gets the number of pages. |
WikiPage |
getPageInfo(java.lang.String page,
int version)
Returns info about the page. |
java.lang.String |
getPageText(java.lang.String page,
int version)
Gets a specific version out of the repository. |
java.util.List |
getVersionHistory(java.lang.String page)
Returns version history. |
boolean |
pageExists(java.lang.String page)
Return true, if page exists. |
void |
putPageText(WikiPage page,
java.lang.String text)
Attempts to save the page text for page "page". |
| Methods inherited from interface com.ecyrd.jspwiki.WikiProvider |
getProviderInfo, initialize |
| Method Detail |
public void putPageText(WikiPage page,
java.lang.String text)
throws ProviderException
ProviderExceptionpublic boolean pageExists(java.lang.String page)
public java.util.Collection findPages(QueryItem[] query)
public WikiPage getPageInfo(java.lang.String page,
int version)
throws ProviderException
ProviderException
public java.util.Collection getAllPages()
throws ProviderException
ProviderExceptionpublic java.util.Collection getAllChangedSince(java.util.Date date)
public int getPageCount()
throws ProviderException
ProviderException
public java.util.List getVersionHistory(java.lang.String page)
throws ProviderException
ProviderException
public java.lang.String getPageText(java.lang.String page,
int version)
throws ProviderException
page - Name of the page to fetch.version - Version of the page to fetch.
ProviderException
public void deleteVersion(java.lang.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.
public void deletePage(java.lang.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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||