public interface PackageArchive
Application
in a Repository
. Those informations
are obtained from the Application
's ZIP-file.Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Returns the binary data of the archive's ZIP-file.
|
String |
getChecksum()
Returns the checksum for this archive (SHA256).
|
File |
getFile()
Returns the archive's ZIP-file.
|
PackageInfo |
getPackageInfo()
Returns a
PackageInfo unmarshalled from the archive's
"application.xml". |
PackageType |
getType()
Returns the
PackageType for this PackageArchive . |
boolean |
isValid()
Checks whether this is a valid
PackageArchive , meaning it's ZIP-file has a valid structure and contains a
valid "application.xml". |
<T> T |
processZipFile(ZipFileProcessor<T> processor)
Processes the
PackageArchive 's ZIP-file with the given ZipFileProcessor . |
boolean isValid()
PackageArchive
, meaning it's ZIP-file has a valid structure and contains a
valid "application.xml".true
if this a valid PackageArchive
, false
otherwisePackageInfo getPackageInfo()
PackageInfo
unmarshalled from the archive's
"application.xml". This methods returns null
, if
isValid()
returns false
.PackageInfo
<T> T processZipFile(ZipFileProcessor<T> processor) throws IOException
PackageArchive
's ZIP-file with the given ZipFileProcessor
.T
- the return type of the ZipFileProcessor
processor
- a ZipFileProcessor
<T>
IOException
- ZipFileProcessor.process(org.apache.commons.compress.archivers.zip.ZipFile)
throws an IOException
File getFile()
byte[] getBytes() throws IOException
isValid()
returns
true
.IOException
- if the ZIP-file could not be readPackageType getType()
PackageType
for this PackageArchive
.PackageType
String getChecksum()
Copyright © 2011–2023 aiticon GmbH. All rights reserved.