|
||||||||||
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.RCSFileProvider
public class RCSFileProvider
This class implements a simple RCS file provider. NOTE: You MUST have the RCS package installed for this to work. They must also be in your path...
The RCS file provider extends from the FileSystemProvider, which means that it provides the pages in the same way. The only difference is that it implements the version history commands, and also in each checkin it writes the page to the RCS repository as well.
If you decide to dabble with the default commands, please make sure that you do not check the default archive suffix ",v". File deletion depends on it.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ecyrd.jspwiki.providers.AbstractFileProvider |
---|
AbstractFileProvider.WikiFileFilter |
Field Summary | |
---|---|
static String |
PROP_CHECKIN
Property name for the checkin command. |
static String |
PROP_CHECKOUT
Property name for the checkout command. |
static String |
PROP_CHECKOUTVERSION
Property name for the checkout version command. |
static String |
PROP_FULLLOG
Property name for the full log command. |
static String |
PROP_LOG
Property name for the log command. |
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 | |
---|---|
RCSFileProvider()
|
Method Summary | |
---|---|
void |
deletePage(String page)
Removes the page file and the RCS archive from the repository. |
void |
deleteVersion(String page,
int version)
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. |
WikiPage |
getPageInfo(String page,
int version)
Always returns the latest version, since FileSystemProvider does not support versioning. |
String |
getPageText(String page,
int version)
This implementation just returns the current version, as filesystem does not provide versioning information for now. |
List |
getVersionHistory(String page)
The FileSystemProvider provides only one version. |
void |
initialize(WikiEngine engine,
Properties props)
Initializes the page provider. |
void |
movePage(String from,
String to)
Move a page |
void |
putPageText(WikiPage page,
String text)
Puts the page into RCS and makes sure there is a fresh copy in the directory as well. |
Methods inherited from class com.ecyrd.jspwiki.providers.AbstractFileProvider |
---|
findPage, findPages, getAllChangedSince, getAllPages, getPageCount, getProviderInfo, 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_CHECKIN
public static final String PROP_CHECKOUT
public static final String PROP_LOG
public static final String PROP_FULLLOG
public static final String PROP_CHECKOUTVERSION
Constructor Detail |
---|
public RCSFileProvider()
Method Detail |
---|
public void initialize(WikiEngine engine, Properties props) throws NoRequiredPropertyException, IOException
initialize
in interface WikiProvider
initialize
in class AbstractFileProvider
engine
- WikiEngine to own this providerprops
- A set of properties used to initialize this provider
NoRequiredPropertyException
- If the provider needs a property which is not found in the property set
FileNotFoundException
- If the specified page directory does not exist.
IOException
- In case the specified page directory is a file, not a directory.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 String getPageText(String page, int version) throws ProviderException
getPageText
in interface WikiPageProvider
getPageText
in class AbstractFileProvider
page
- Name of the page to fetch.version
- Version of the page to fetch.
ProviderException
- If something goes wrong.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.
{@inheritDoc}
ProviderException
- If something goes wrong.public List getVersionHistory(String page)
getVersionHistory
in interface WikiPageProvider
getVersionHistory
in class AbstractFileProvider
page
- The name of the page to get the history from.
public void deletePage(String page) throws ProviderException
deletePage
in interface WikiPageProvider
deletePage
in class AbstractFileProvider
page
- Name of the page to be removed completely.
{@inheritDoc}
ProviderException
- If the page could not be removed for some reason.public void deleteVersion(String page, int version)
deleteVersion
in interface WikiPageProvider
deleteVersion
in class AbstractFileProvider
page
- Name of the page to be removed.version
- Version of the page to be removed. May be LATEST_VERSION.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 |