| com.ecyrd.jspwiki.providers.WikiPageProvider
All known Subclasses: com.ecyrd.jspwiki.providers.VerySimpleProvider, com.ecyrd.jspwiki.providers.AbstractFileProvider, com.ecyrd.jspwiki.providers.CounterProvider, com.ecyrd.jspwiki.providers.CachingProvider,
WikiPageProvider | public interface WikiPageProvider extends WikiProvider(Code) | | 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.
author: Janne Jalkanen |
deletePage | public void deletePage(String pageName) throws ProviderException(Code) | | Removes an entire page from the repository. The implementations
should really do no more security checks, since that is the domain
of the PageManager. Just delete it as efficiently as you can. You should also
delete any auxiliary files that belong to this page, IF they were created
by this provider.
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...
since: 2.0.17. Parameters: pageName - Name of the page to be removed completely. throws: ProviderException - If the page could not be removed for some reason. |
deleteVersion | public void deleteVersion(String pageName, int version) throws ProviderException(Code) | | Removes a specific version from the repository. The implementations
should really do no more security checks, since that is the domain
of the PageManager. Just delete it as efficiently as you can.
since: 2.0.17. Parameters: pageName - Name of the page to be removed. Parameters: version - Version of the page to be removed. May be LATEST_VERSION. throws: ProviderException - If the page cannot be removed for some reason. |
getAllChangedSince | public Collection getAllChangedSince(Date date)(Code) | | Gets a list of recent changes.
since: 1.6.4 |
getPageText | public String getPageText(String page, int version) throws ProviderException(Code) | | Gets a specific version out of the repository.
Parameters: page - Name of the page to fetch. Parameters: version - Version of the page to fetch. The content of the page, or null, if the page does not exist. |
getVersionHistory | public List getVersionHistory(String page) throws ProviderException(Code) | | Returns version history. Each element should be
a WikiPage.
A collection of wiki pages. |
pageExists | public boolean pageExists(String page)(Code) | | Return true, if page exists.
|
|
|