Class designation: Class org.apache.wiki.PageManager extends org.apache.wiki.modules.ModuleManager implements org.apache.wiki.event.WikiEventListener

Manages the WikiPages of a WikiEngine. This class functions as an unified interface towards the page providers. It handles initialization and management of the providers, and provides utility methods for accessing the contents.

Saving a page is a two-stage task; first the pre-save operations and then the actual save. See the descriptions of the tasks for further information.

API#

The following is extracted from the JSPWiki 2.10.x Javadocs:

public void actionPerformed(WikiEvent event)
Listens for WikiSecurityEvent.PROFILE_NAME_CHANGED events.
protected boolean changeAcl(WikiPage page, Principal oldPrincipals, Principal newPrincipal)
For a single wiki page, replaces all Acl entries matching a supplied array of Principals with a new Principal.
public void deletePage(WikiPage page)
Deletes an entire page, all versions, all traces.
public void deleteVersion(WikiPage page)
Deletes only a specific version of a WikiPage.
protected void fireEvent(int type, String pagename)
Fires a WikiPageEvent of the provided type and page name to all registered listeners.
public List<PageLock> getActiveLocks()
Returns a list of currently applicable locks.
public Collection getAllPages()
Returns all pages in some random order.
public PageLock getCurrentLock(WikiPage page)
Returns the current lock owner of a page.
public WikiEngine getEngine()
Returns the WikiEngine to which this PageManager belongs to.
public WikiPage getPageInfo(String pageName, int version)
Finds a WikiPage object describing a particular page and version.
public String getPageText(String pageName, int version)
Fetches the page text from the repository.
public WikiPageProvider getProvider()
Returns the page provider currently in use.
public String getProviderDescription()
Returns a human-readable description of the current provider.
public int getTotalPageCount()
Returns the total count of all pages in the repository.
public List getVersionHistory(String pageName)
Gets a version history of page.
public PageLock lockPage(WikiPage page, String user)
Locks page for editing.
public Collection modules()
Returns a collection of modules currently managed by this ModuleManager.
public boolean pageExists(String pageName)
Returns true, if the page exists (any version).
public boolean pageExists(String pageName, int version)
Checks for existence of a specific page and version.
public void putPageText(WikiPage page, String content)
Puts the page text into the repository.
public void unlockPage(PageLock lock)
Marks a page free to be written again.

See: WikiEvent, WikiEventListener


Category.Documentation