Class FileSystemProvider

  • All Implemented Interfaces:
    PageProvider, WikiProvider

    public class FileSystemProvider
    extends AbstractFileProvider
    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.

    • Field Detail

    • Method Detail

      • deletePage

        public void deletePage​(java.lang.String pageName)
                        throws ProviderException
        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...

        Specified by:
        deletePage in interface PageProvider
        Overrides:
        deletePage in class AbstractFileProvider
        Parameters:
        pageName - Name of the page to be removed completely.
        Throws:
        ProviderException - If the page could not be removed for some reason.
      • movePage

        public void movePage​(java.lang.String from,
                             java.lang.String to)
                      throws ProviderException
        Move a page
        Parameters:
        from - Name of the page to move.
        to - New name of the page.
        Throws:
        ProviderException - If the page could not be moved for some reason.