Class CommonsCompressArchiveWriteService
java.lang.Object
com.ntak.pearlzip.archive.acc.pub.CommonsCompressArchiveWriteService
- All Implemented Interfaces:
ArchiveService
,ArchiveWriteService
Implementation of an Archive Write Service, which utilises the Apache Commons Compress library underneath for
various formats.
- Author:
- Aashutos Kakshepati
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ntak.pearlzip.archive.pub.ArchiveService
ArchiveService.FXForm
-
Field Summary
Fields inherited from interface com.ntak.pearlzip.archive.pub.ArchiveService
CUSTOM_MENUS, DEFAULT_BUS, OPTIONS
Fields inherited from interface com.ntak.pearlzip.archive.pub.ArchiveWriteService
CREATE_OPTIONS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addFile
(long sessionId, ArchiveInfo archiveInfo, FileInfo... files) Adds file(s) to the location within the archive as specified by the FileInfo object.boolean
Adds files(s) to the location within the archive as specified by the FileInfo object.void
createArchive
(long sessionId, ArchiveInfo archiveInfo, FileInfo... files) Creates an archive at the path specified with optionally adding files to the archive.void
createArchive
(long sessionId, String archivePath, FileInfo... files) Creates an archive at the path specified with optionally adding files to the archive.boolean
deleteFile
(long sessionId, ArchiveInfo archiveInfo, FileInfo file) Deletes the specified file represented by a FileInfo archive metadata from the specified archive.boolean
deleteFile
(long sessionId, String archivePath, FileInfo file) Deletes the specified file represented by a FileInfo archive metadata from the specified archive.Lists out explicitly all archive formats that can be written to by the implementation of the archive service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ntak.pearlzip.archive.pub.ArchiveService
getAliasFormats, getCompressorArchives, getFXFormByIdentifier, getOptionsPane, getResourceBundle, isEnabled
Methods inherited from interface com.ntak.pearlzip.archive.pub.ArchiveWriteService
getCreateArchiveOptionsPane
-
Constructor Details
-
CommonsCompressArchiveWriteService
public CommonsCompressArchiveWriteService()
-
-
Method Details
-
createArchive
Description copied from interface:ArchiveWriteService
Creates an archive at the path specified with optionally adding files to the archive.- Specified by:
createArchive
in interfaceArchiveWriteService
- Parameters:
sessionId
- Unique identifier representing the session the ProgressMessage will display messages for
-
createArchive
Description copied from interface:ArchiveWriteService
Creates an archive at the path specified with optionally adding files to the archive. The archive info object can provide archive-specific configuration e.g. decryption passwords.- Specified by:
createArchive
in interfaceArchiveWriteService
- Parameters:
sessionId
- Unique identifier representing the session the ProgressMessage will display messages for
-
addFile
Description copied from interface:ArchiveWriteService
Adds files(s) to the location within the archive as specified by the FileInfo object.- Specified by:
addFile
in interfaceArchiveWriteService
- Parameters:
sessionId
- Unique identifier representing the session the ProgressMessage will display messages forfiles
- FileInfo archive metadata representing what is to be added to the archive- Returns:
- boolean - returns true if file was added successfully
-
addFile
Description copied from interface:ArchiveWriteService
Adds file(s) to the location within the archive as specified by the FileInfo object. The * archive info object can provide archive-specific configuration e.g. decryption passwords.- Specified by:
addFile
in interfaceArchiveWriteService
- Parameters:
sessionId
- Unique identifier representing the session the ProgressMessage will display messages forfiles
- FileInfo archive metadata representing what is to be added to the archive- Returns:
- boolean - returns true if file was added successfully
-
deleteFile
Description copied from interface:ArchiveWriteService
Deletes the specified file represented by a FileInfo archive metadata from the specified archive.- Specified by:
deleteFile
in interfaceArchiveWriteService
- Parameters:
sessionId
- Unique identifier representing the session the ProgressMessage will display messages forfile
- FileInfo archive metadata representing what is to be deleted from the archive- Returns:
- boolean - returns true if file is successfully deleted
-
deleteFile
Description copied from interface:ArchiveWriteService
Deletes the specified file represented by a FileInfo archive metadata from the specified archive. The archive info object can provide archive-specific configuration e.g. decryption passwords.- Specified by:
deleteFile
in interfaceArchiveWriteService
- Parameters:
sessionId
- Unique identifier representing the session the ProgressMessage will display messages forfile
- FileInfo archive metadata representing what is to be deleted from the archive- Returns:
- boolean - returns true if file is successfully deleted
-
supportedWriteFormats
Description copied from interface:ArchiveWriteService
Lists out explicitly all archive formats that can be written to by the implementation of the archive service.- Specified by:
supportedWriteFormats
in interfaceArchiveWriteService
- Returns:
- List<String> - List of archive extensions that can be created and modified by the archive service implementation
-