public class FileSystemProvider extends AbstractFileProvider
All files have ".txt" appended to make life easier for those who insist on using Windows or other software which makes assumptions on the files contents based on its name.
AbstractFileProvider.WikiFileFilter
Modifier and Type | Field and Description |
---|---|
static String |
PROP_EXT
All metadata is stored in a file with this extension.
|
DEFAULT_ENCODING, DEFAULT_MAX_PROPKEYLENGTH, DEFAULT_MAX_PROPLIMIT, DEFAULT_MAX_PROPVALUELENGTH, FILE_EXT, m_encoding, m_engine, MAX_PROPKEYLENGTH, MAX_PROPLIMIT, MAX_PROPVALUELENGTH, PROP_CUSTOMPROP_MAXKEYLENGTH, PROP_CUSTOMPROP_MAXLIMIT, PROP_CUSTOMPROP_MAXVALUELENGTH, PROP_PAGEDIR
LATEST_VERSION
Constructor and Description |
---|
FileSystemProvider() |
Modifier and Type | Method and Description |
---|---|
void |
deletePage(String pageName)
Removes an entire page from the repository.
|
WikiPage |
getPageInfo(String page,
int version)
Always returns the latest version, since FileSystemProvider
does not support versioning.
|
void |
movePage(String from,
String to)
Move a page
|
void |
putPageText(WikiPage page,
String text)
Attempts to save the page text for page "page".
|
addCustomProperties, deleteVersion, findPage, findPages, getAllChangedSince, getAllPages, getCustomProperties, getPageCount, getPageText, getProviderInfo, getVersionHistory, initialize, mangleName, pageExists, pageExists, setCustomProperties, unmangleName, validateCustomPageProperties
public static final String PROP_EXT
public FileSystemProvider()
public void putPageText(WikiPage page, String text) throws ProviderException
putPageText
in interface WikiPageProvider
putPageText
in class AbstractFileProvider
page
- The WikiPage to savetext
- The text to save.ProviderException
- If something goes wrong.public WikiPage getPageInfo(String page, int version) throws ProviderException
getPageInfo
in interface WikiPageProvider
getPageInfo
in class AbstractFileProvider
page
- The page nameversion
- The version numberProviderException
- If something goes wrong.public void deletePage(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...
deletePage
in interface WikiPageProvider
deletePage
in class AbstractFileProvider
pageName
- Name of the page to be removed completely.ProviderException
- If the page could not be removed for some reason.public void movePage(String from, String to) throws ProviderException
from
- Name of the page to move.to
- New name of the page.ProviderException
- If the page could not be moved for some reason.Copyright © 2001-2019 The Apache Software Foundation. All rights reserved.