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, OPTIONSFields inherited from interface com.ntak.pearlzip.archive.pub.ArchiveWriteService
CREATE_OPTIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddFile(long sessionId, ArchiveInfo archiveInfo, FileInfo... files) Adds file(s) to the location within the archive as specified by the FileInfo object.booleanAdds files(s) to the location within the archive as specified by the FileInfo object.voidcreateArchive(long sessionId, ArchiveInfo archiveInfo, FileInfo... files) Creates an archive at the path specified with optionally adding files to the archive.voidcreateArchive(long sessionId, String archivePath, FileInfo... files) Creates an archive at the path specified with optionally adding files to the archive.booleandeleteFile(long sessionId, ArchiveInfo archiveInfo, FileInfo file) Deletes the specified file represented by a FileInfo archive metadata from the specified archive.booleandeleteFile(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, waitMethods inherited from interface com.ntak.pearlzip.archive.pub.ArchiveService
getAliasFormats, getCompressorArchives, getFXFormByIdentifier, getOptionsPane, getResourceBundle, isEnabledMethods inherited from interface com.ntak.pearlzip.archive.pub.ArchiveWriteService
getCreateArchiveOptionsPane
-
Constructor Details
-
CommonsCompressArchiveWriteService
public CommonsCompressArchiveWriteService()
-
-
Method Details
-
createArchive
Description copied from interface:ArchiveWriteServiceCreates an archive at the path specified with optionally adding files to the archive.- Specified by:
createArchivein interfaceArchiveWriteService- Parameters:
sessionId- Unique identifier representing the session the ProgressMessage will display messages for
-
createArchive
Description copied from interface:ArchiveWriteServiceCreates 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:
createArchivein interfaceArchiveWriteService- Parameters:
sessionId- Unique identifier representing the session the ProgressMessage will display messages for
-
addFile
Description copied from interface:ArchiveWriteServiceAdds files(s) to the location within the archive as specified by the FileInfo object.- Specified by:
addFilein 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:ArchiveWriteServiceAdds 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:
addFilein 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:ArchiveWriteServiceDeletes the specified file represented by a FileInfo archive metadata from the specified archive.- Specified by:
deleteFilein 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:ArchiveWriteServiceDeletes 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:
deleteFilein 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:ArchiveWriteServiceLists out explicitly all archive formats that can be written to by the implementation of the archive service.- Specified by:
supportedWriteFormatsin interfaceArchiveWriteService- Returns:
- List<String> - List of archive extensions that can be created and modified by the archive service implementation
-