Package fitnesse.wiki.fs
Class ZipFileVersionsController
- java.lang.Object
-
- fitnesse.wiki.fs.ZipFileVersionsController
-
- All Implemented Interfaces:
VersionsController
public class ZipFileVersionsController extends java.lang.Object implements VersionsController
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ZIP_EXTENSION
-
Constructor Summary
Constructors Constructor Description ZipFileVersionsController()
ZipFileVersionsController(int versionDays)
ZipFileVersionsController(ComponentFactory componentFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VersionInfo
addDirectory(FileVersion filePath)
Add a directory.void
delete(java.io.File... files)
Delete a bunch of files.FileVersion[]
getRevisionData(java.lang.String label, java.io.File... files)
Obtain data for the files requested at a specific revisionjava.util.Collection<VersionInfo>
history(java.io.File... pageFiles)
Get history information for a set of files.VersionInfo
makeVersion(FileVersion... fileVersions)
Store files as one revision.protected void
makeZipVersion(java.io.File zipFile, FileVersion... fileVersions)
void
rename(FileVersion fileVersion, java.io.File originalFile)
Rename a file.java.lang.String
toString()
-
-
-
Field Detail
-
ZIP_EXTENSION
public static final java.lang.String ZIP_EXTENSION
- See Also:
- Constant Field Values
-
-
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 interfaceVersionsController
- Parameters:
label
- The revision to look forfiles
- 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 interfaceVersionsController
- 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 interfaceVersionsController
- 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 interfaceVersionsController
- 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 interfaceVersionsController
- 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 interfaceVersionsController
- 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 classjava.lang.Object
-
-