
public interface PageManager extends WikiEventListener
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_LOCKEXPIRY
The property value for setting the amount of time before the page locks expire.
|
static String |
PROP_PAGEPROVIDER
The property value for setting the current page provider.
|
static String |
PROP_USECACHE
The property value for setting the cache on/off.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(WikiEvent event)
Listens for
WikiSecurityEvent.PROFILE_NAME_CHANGED
events. |
void |
deletePage(WikiPage page)
Deletes an entire page, all versions, all traces.
|
void |
deleteVersion(WikiPage page)
Deletes only a specific version of a WikiPage.
|
List<PageLock> |
getActiveLocks()
Returns a list of currently applicable locks.
|
Collection<WikiPage> |
getAllPages()
Returns all pages in some random order.
|
PageLock |
getCurrentLock(WikiPage page)
Returns the current lock owner of a page.
|
WikiEngine |
getEngine()
Returns the WikiEngine to which this PageManager belongs to.
|
WikiPage |
getPageInfo(String pageName,
int version)
Finds a WikiPage object describing a particular page and version.
|
PageSorter |
getPageSorter()
Returns the configured
PageSorter. |
String |
getPageText(String pageName,
int version)
Fetches the page text from the repository.
|
WikiPageProvider |
getProvider()
Returns the page provider currently in use.
|
String |
getProviderDescription()
Returns a human-readable description of the current provider.
|
int |
getTotalPageCount()
Returns the total count of all pages in the repository.
|
List<WikiPage> |
getVersionHistory(String pageName)
Gets a version history of page.
|
PageLock |
lockPage(WikiPage page,
String user)
Locks page for editing.
|
boolean |
pageExists(String pageName)
Returns true, if the page exists (any version).
|
boolean |
pageExists(String pageName,
int version)
Checks for existence of a specific page and version.
|
void |
putPageText(WikiPage page,
String content)
Puts the page text into the repository.
|
void |
unlockPage(PageLock lock)
Marks a page free to be written again.
|
static final String PROP_PAGEPROVIDER
static final String PROP_USECACHE
static final String PROP_LOCKEXPIRY
WikiPageProvider getProvider()
Collection<WikiPage> getAllPages() throws ProviderException
ReferenceManager#findCreated(), which is probably a lot
faster. This method may cause repository access.ProviderException - If the backend has problems.String getPageText(String pageName, int version) throws ProviderException
pageName - The name of the page to fetch.version - The version to findProviderException - If the backend has issues.WikiEngine getEngine()
void putPageText(WikiPage page, String content) throws ProviderException
page - Page to savecontent - Wikimarkup to saveProviderException - If something goes wrong in the saving phasePageLock lockPage(WikiPage page, String user)
page - WikiPage to lockuser - Username to use for lockingvoid unlockPage(PageLock lock)
lock - A lock acquired in lockPage(). Safe to be null.PageLock getCurrentLock(WikiPage page)
page - The page to check the lock forList<PageLock> getActiveLocks()
WikiPage getPageInfo(String pageName, int version) throws ProviderException
pageName - The name of the pageversion - A version numberProviderException - If there is something wrong with the page
name or the repositoryList<WikiPage> getVersionHistory(String pageName) throws ProviderException
pageName - The name of the page to fetch history forProviderException - If the repository fails.String getProviderDescription()
int getTotalPageCount()
boolean pageExists(String pageName) throws ProviderException
pageName - Name of the page.ProviderException - If the backend fails or the name is illegal.boolean pageExists(String pageName, int version) throws ProviderException
pageName - Name of the pageversion - The version to checktrue if the page exists, false otherwiseProviderException - If backend fails or name is illegalvoid deleteVersion(WikiPage page) throws ProviderException
page - The page to delete.ProviderException - if the page failsvoid deletePage(WikiPage page) throws ProviderException
page - The WikiPage to deleteProviderException - If the repository operation failsvoid actionPerformed(WikiEvent event)
WikiSecurityEvent.PROFILE_NAME_CHANGED
events. If a user profile's name changes, each page ACL is inspected. If an entry contains
a name that has changed, it is replaced with the new one. No events are emitted
as a consequence of this method, because the page contents are still the same; it is
only the representations of the names within the ACL that are changing.actionPerformed in interface WikiEventListenerevent - The eventPageSorter getPageSorter()
PageSorter.PageSorter.Copyright © 2001-2019 The Apache Software Foundation. All rights reserved.