Package org.apache.wiki.providers
Class WikiPageAdapterProvider
java.lang.Object
org.apache.wiki.providers.WikiPageAdapterProvider
- All Implemented Interfaces:
PageProvider
,WikiProvider
@Deprecated public class WikiPageAdapterProvider extends java.lang.Object implements PageProvider
Deprecated.
This provider ensures backward compatibility with page providers not using the public API. As providers should use the public API
directly, the use of this class is considered deprecated.
- See Also:
PageProvider
-
Field Summary
Fields inherited from interface org.apache.wiki.api.providers.WikiProvider
LATEST_VERSION
-
Constructor Summary
Constructors Constructor Description WikiPageAdapterProvider()
Deprecated. -
Method Summary
Modifier and Type Method Description void
deletePage(java.lang.String pageName)
Deprecated.Removes an entire page from the repository.void
deleteVersion(java.lang.String pageName, int version)
Deprecated.Removes a specific version from the repository.java.util.Collection<SearchResult>
findPages(QueryItem[] query)
Deprecated.Finds pages based on the query.java.util.Collection<Page>
getAllChangedSince(java.util.Date date)
Deprecated.Gets a list of recent changes.java.util.Collection<Page>
getAllPages()
Deprecated.Returns all pages.int
getPageCount()
Deprecated.Gets the number of pages.Page
getPageInfo(java.lang.String page, int version)
Deprecated.Returns info about the page.java.lang.String
getPageText(java.lang.String page, int version)
Deprecated.Gets a specific version out of the repository.java.lang.String
getProviderInfo()
Deprecated.Return a valid HTML string for information.java.util.List<Page>
getVersionHistory(java.lang.String page)
Deprecated.Returns version history.void
initialize(Engine engine, java.util.Properties properties)
Deprecated.Initializes the page provider.void
movePage(java.lang.String from, java.lang.String to)
Deprecated.Move a pageboolean
pageExists(java.lang.String page)
Deprecated.Return true, if page exists.boolean
pageExists(java.lang.String page, int version)
Deprecated.Return true, if page with a particular version exists.void
putPageText(Page page, java.lang.String text)
Deprecated.Attempts to save the page text for page "page".Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WikiPageAdapterProvider
public WikiPageAdapterProvider()Deprecated.
-
-
Method Details
-
initialize
public void initialize(Engine engine, java.util.Properties properties) throws NoRequiredPropertyException, java.io.IOExceptionDeprecated.Initializes the page provider.- Specified by:
initialize
in interfaceWikiProvider
- Parameters:
engine
- Engine to own this providerproperties
- A set of properties used to initialize this provider- Throws:
NoRequiredPropertyException
- If the provider needs a property which is not found in the property setjava.io.IOException
- If there is an IO problem
-
getProviderInfo
Deprecated.Return a valid HTML string for information. May be anything.- Specified by:
getProviderInfo
in interfaceWikiProvider
- Returns:
- A string describing the provider.
-
putPageText
Deprecated.Attempts to save the page text for page "page". Note that the provider creates a new version regardless of what the version parameter of the WikiPage is.- Specified by:
putPageText
in interfacePageProvider
- Parameters:
page
- The WikiPage to savetext
- The text to save.- Throws:
ProviderException
- If something goes wrong.
-
pageExists
Deprecated.Return true, if page exists.- Specified by:
pageExists
in interfacePageProvider
- Parameters:
page
- The page name.- Returns:
- true, if the page exists; false otherwise.
-
pageExists
Deprecated.Return true, if page with a particular version exists.- Specified by:
pageExists
in interfacePageProvider
- Parameters:
page
- The page name to check forversion
- The version to check- Returns:
- True, if page exists; false otherwise.
-
findPages
Deprecated.Finds pages based on the query. Only applicable to providers which implement the FastSearch interface. Otherwise JSPWiki will use its internal cache.This method should really be a part of the FastSearch IF.
- Specified by:
findPages
in interfacePageProvider
- Parameters:
query
- An array of QueryItems to match- Returns:
- A Collection of WikiPages.
-
getPageInfo
Deprecated.Returns info about the page.- Specified by:
getPageInfo
in interfacePageProvider
- Parameters:
page
- The page nameversion
- The version number- Returns:
- A filled WikiPage.
- Throws:
ProviderException
- If something goes wrong.
-
getAllPages
Deprecated.Returns all pages. Each element in the returned Collection should be a WikiPage.- Specified by:
getAllPages
in interfacePageProvider
- Returns:
- A collection of WikiPages
- Throws:
ProviderException
- If something goes wrong.
-
getAllChangedSince
Deprecated.Gets a list of recent changes.- Specified by:
getAllChangedSince
in interfacePageProvider
- Parameters:
date
- The date to check from- Returns:
- A Collection of WikiPages
-
getPageCount
Deprecated.Gets the number of pages.- Specified by:
getPageCount
in interfacePageProvider
- Returns:
- The number of pages in the repository
- Throws:
ProviderException
- If something goes wrong
-
getVersionHistory
Deprecated.Returns version history. Each element should be a WikiPage.- Specified by:
getVersionHistory
in interfacePageProvider
- Parameters:
page
- The name of the page to get the history from.- Returns:
- A collection of WikiPages.
- Throws:
ProviderException
- If something goes wrong.
-
getPageText
Deprecated.Gets a specific version out of the repository.- Specified by:
getPageText
in interfacePageProvider
- Parameters:
page
- Name of the page to fetch.version
- Version of the page to fetch.- Returns:
- The content of the page, or null, if the page does not exist.
- Throws:
ProviderException
- If something goes wrong.
-
deleteVersion
Deprecated.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.- Specified by:
deleteVersion
in interfacePageProvider
- Parameters:
pageName
- Name of the page to be removed.version
- Version of the page to be removed. May be LATEST_VERSION.- Throws:
ProviderException
- If the page cannot be removed for some reason.
-
deletePage
Deprecated.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...
- Specified by:
deletePage
in interfacePageProvider
- Parameters:
pageName
- Name of the page to be removed completely.- Throws:
ProviderException
- If the page could not be removed for some reason.
-
movePage
Deprecated.Move a page- Specified by:
movePage
in interfacePageProvider
- Parameters:
from
- Name of the page to move.to
- New name of the page.- Throws:
ProviderException
- If the page could not be moved for some reason.
-
PageProvider
instead.