Class ZipFileVersionsController

    • Constructor Detail

      • ZipFileVersionsController

        public ZipFileVersionsController​(ComponentFactory componentFactory)
      • ZipFileVersionsController

        public ZipFileVersionsController()
      • ZipFileVersionsController

        public ZipFileVersionsController​(int versionDays)
    • Method Detail

      • getRevisionData

        public FileVersion[] getRevisionData​(java.lang.String label,
                                             java.io.File... files)
                                      throws java.io.IOException
        Description copied from interface: VersionsController
        Obtain data for the files requested at a specific revision
        Specified by:
        getRevisionData in interface VersionsController
        Parameters:
        label - The revision to look for
        files - Files to obtain data for
        Returns:
        An array of FileVersion elements is returned. The size is equal to the number of files requested, although there is no guarantee all files will be found at a specific revision.
        Throws:
        java.io.IOException
      • history

        public java.util.Collection<VersionInfo> history​(java.io.File... pageFiles)
        Description copied from interface: VersionsController
        Get history information for a set of files.
        Specified by:
        history in interface VersionsController
        Parameters:
        pageFiles - Files to look for.
        Returns:
        history
      • makeVersion

        public VersionInfo makeVersion​(FileVersion... fileVersions)
                                throws java.io.IOException
        Description copied from interface: VersionsController
        Store files as one revision.
        Specified by:
        makeVersion in interface VersionsController
        Parameters:
        fileVersions - The files to store
        Returns:
        Version information. VersionInfo.label should refer to this revision, so it can be retrieved later.
        Throws:
        java.io.IOException - IOException
      • addDirectory

        public VersionInfo addDirectory​(FileVersion filePath)
                                 throws java.io.IOException
        Description copied from interface: VersionsController
        Add a directory. We only add them one at a time.
        Specified by:
        addDirectory in interface VersionsController
        Parameters:
        filePath - directory to add
        Returns:
        VersionInfo
        Throws:
        java.io.IOException - IOException
      • rename

        public void rename​(FileVersion fileVersion,
                           java.io.File originalFile)
                    throws java.io.IOException
        Description copied from interface: VersionsController
        Rename a file. Used for the files/ section. No author information is stored here.
        Specified by:
        rename in interface VersionsController
        Parameters:
        fileVersion - File to rename to.
        originalFile - The original file.
        Throws:
        java.io.IOException - IOException
      • delete

        public void delete​(java.io.File... files)
                    throws java.io.IOException
        Description copied from interface: VersionsController
        Delete a bunch of files.
        Specified by:
        delete in interface VersionsController
        Parameters:
        files - files to delete
        Throws:
        java.io.IOException
      • makeZipVersion

        protected void makeZipVersion​(java.io.File zipFile,
                                      FileVersion... fileVersions)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object