|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.providers.AbstractFileProvider
com.ecyrd.jspwiki.providers.FileSystemProvider
public class FileSystemProvider
Provides a simple directory based repository for Wiki pages.
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ecyrd.jspwiki.providers.AbstractFileProvider |
---|
AbstractFileProvider.WikiFileFilter |
Field Summary | |
---|---|
static String |
PROP_EXT
All metadata is stored in a file with this extension. |
Fields inherited from class com.ecyrd.jspwiki.providers.AbstractFileProvider |
---|
DEFAULT_ENCODING, FILE_EXT, m_encoding, m_engine, PROP_PAGEDIR |
Fields inherited from interface com.ecyrd.jspwiki.WikiProvider |
---|
LATEST_VERSION |
Constructor Summary | |
---|---|
FileSystemProvider()
|
Method Summary | |
---|---|
void |
deletePage(String pageName)
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... |
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". Note that the provider creates a new version regardless of what the version parameter of the WikiPage is. |
Methods inherited from class com.ecyrd.jspwiki.providers.AbstractFileProvider |
---|
deleteVersion, findPage, findPages, getAllChangedSince, getAllPages, getPageCount, getPageText, getProviderInfo, getVersionHistory, initialize, mangleName, pageExists, unmangleName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_EXT
Constructor Detail |
---|
public FileSystemProvider()
Method Detail |
---|
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 number
ProviderException
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |