com.ecyrd.jspwiki.providers
Class RCSFileProvider
java.lang.Object
|
+--com.ecyrd.jspwiki.providers.FileSystemProvider
|
+--com.ecyrd.jspwiki.providers.RCSFileProvider
- All Implemented Interfaces:
- WikiPageProvider, WikiProvider
- public class RCSFileProvider
- extends FileSystemProvider
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.
- Author:
- Janne Jalkanen
|
Method Summary |
WikiPage |
getPageInfo(java.lang.String page,
int version)
Always returns the latest version, since FileSystemProvider
does not support versioning. |
java.lang.String |
getPageText(java.lang.String page,
int version)
This implementation just returns the current version, as filesystem
does not provide versioning information for now. |
java.util.List |
getVersionHistory(java.lang.String page)
The FileSystemProvider provides only one version. |
void |
initialize(java.util.Properties props)
Initializes the page provider. |
void |
putPageText(WikiPage page,
java.lang.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.FileSystemProvider |
deletePage, deleteVersion, 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 |
PROP_CHECKIN
public static final java.lang.String PROP_CHECKIN
- See Also:
- Constant Field Values
PROP_CHECKOUT
public static final java.lang.String PROP_CHECKOUT
- See Also:
- Constant Field Values
PROP_LOG
public static final java.lang.String PROP_LOG
- See Also:
- Constant Field Values
PROP_FULLLOG
public static final java.lang.String PROP_FULLLOG
- See Also:
- Constant Field Values
PROP_CHECKOUTVERSION
public static final java.lang.String PROP_CHECKOUTVERSION
- See Also:
- Constant Field Values
RCSFileProvider
public RCSFileProvider()
initialize
public void initialize(java.util.Properties props)
throws NoRequiredPropertyException,
java.io.IOException
- Description copied from interface:
WikiProvider
- Initializes the page provider.
- Specified by:
initialize in interface WikiProvider- Overrides:
initialize in class FileSystemProvider
- Throws:
java.io.IOException - In case the specified page directory is a file, not a directory.
NoRequiredPropertyException
getPageInfo
public WikiPage getPageInfo(java.lang.String page,
int version)
throws ProviderException
- Description copied from class:
FileSystemProvider
- Always returns the latest version, since FileSystemProvider
does not support versioning.
- Specified by:
getPageInfo in interface WikiPageProvider- Overrides:
getPageInfo in class FileSystemProvider
ProviderException
getPageText
public java.lang.String getPageText(java.lang.String page,
int version)
throws ProviderException
- Description copied from class:
FileSystemProvider
- This implementation just returns the current version, as filesystem
does not provide versioning information for now.
- Specified by:
getPageText in interface WikiPageProvider- Overrides:
getPageText in class FileSystemProvider
- Parameters:
page - Name of the page to fetch.version - Version of the page to fetch.
ProviderException
putPageText
public void putPageText(WikiPage page,
java.lang.String text)
- Puts the page into RCS and makes sure there is a fresh copy in
the directory as well.
- Specified by:
putPageText in interface WikiPageProvider- Overrides:
putPageText in class FileSystemProvider
getVersionHistory
public java.util.List getVersionHistory(java.lang.String page)
- Description copied from class:
FileSystemProvider
- The FileSystemProvider provides only one version.
- Specified by:
getVersionHistory in interface WikiPageProvider- Overrides:
getVersionHistory in class FileSystemProvider
- Returns:
- A collection of wiki pages.