com.ibm.adt.ovf.model.utility
Class PackageExporter
java.lang.Object
com.ibm.adt.ovf.model.utility.PackageExporter
public class PackageExporter
- extends java.lang.Object
Constructor Summary |
PackageExporter(EnvelopeType envelope,
java.lang.String packageName,
java.io.File baseLocalRef,
java.io.File baseFile,
java.io.File directory,
boolean isOVA,
boolean allowOverwrite,
boolean hasDigests,
java.security.PrivateKey privateKey,
java.security.cert.Certificate certificate,
int bufferSize,
IProgressMonitor progressMonitor)
This utility class exports an OVF package. |
PackageExporter(EnvelopeType envelope,
java.lang.String packageName,
java.io.File baseLocalRef,
java.io.File baseFile,
java.io.File directory,
boolean isOVA,
boolean allowOverwrite,
boolean hasDigests,
java.security.PrivateKey privateKey,
java.security.cert.Certificate certificate,
IProgressMonitor progressMonitor)
This utility class exports an OVF package. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PackageExporter
public PackageExporter(EnvelopeType envelope,
java.lang.String packageName,
java.io.File baseLocalRef,
java.io.File baseFile,
java.io.File directory,
boolean isOVA,
boolean allowOverwrite,
boolean hasDigests,
java.security.PrivateKey privateKey,
java.security.cert.Certificate certificate,
IProgressMonitor progressMonitor)
- This utility class exports an OVF package. Package signing is indicated by the privateKay
and certificate parameters, both of which must be null or non-null. If non-null, the
hasDigests parameter must be set to true.
- Parameters:
envelope
- the OVF envelope to be exportedpackageName
- the OVF package name to be used. If null, the package name will be derived from
the envelope filenamebaseLocalRef
- if not null, the envelope's local references are relative to this directorybaseFile
- a file to be used in resolving relative URIs in the descriptor. Typically, this would
be the .ovf filedirectory
- the output directory where either the package files or the .ova file will be createdisOVA
- if true, the output will be a .ova archive file. If false, the output will be individual files
in the output directoryallowOverwrite
- if true, overwriting existing files is allowed.hasDigests
- if true, a manifest file will be generated in the package with digests according to the OVF
specificationprivateKey
- to be used to sign the packagecertificate
- to be used to sign the packageprogressMonitor
- if not null, provides progress monitoring
PackageExporter
public PackageExporter(EnvelopeType envelope,
java.lang.String packageName,
java.io.File baseLocalRef,
java.io.File baseFile,
java.io.File directory,
boolean isOVA,
boolean allowOverwrite,
boolean hasDigests,
java.security.PrivateKey privateKey,
java.security.cert.Certificate certificate,
int bufferSize,
IProgressMonitor progressMonitor)
- This utility class exports an OVF package. Package signing is indicated by the privateKay
and certificate parameters, both of which must be null or non-null. If non-null, the
hasDigests parameter must be set to true.
- Parameters:
envelope
- the OVF envelope to be exportedpackageName
- the OVF package name to be used. If null, the package name will be derived from
the envelope filenamebaseLocalRef
- if not null, the envelope's local references are relative to this directorybaseFile
- a file to be used in resolving relative URIs in the descriptor. Typically, this would
be the .ovf filedirectory
- the output directory where either the package files or the .ova file will be createdisOVA
- if true, the output will be a .ova archive file. If false, the output will be individual files
in the output directoryallowOverwrite
- if true, overwriting existing files is allowed.hasDigests
- if true, a manifest file will be generated in the package with digests according to the OVF
specificationprivateKey
- to be used to sign the packagecertificate
- to be used to sign the packagebufferSize
- the size of buffer for input and output operations (default is 1M)progressMonitor
- if not null, provides progress monitoring
initSign
public void initSign(java.security.PrivateKey key,
java.security.cert.Certificate cert)
setFileResolver
public void setFileResolver(IFileResolver fileResolver)
export
public void export()
throws java.lang.Exception
- Export the OVF package
- Throws:
java.lang.Exception
- for I/O errors, security errors, also including overwrite violations- See Also:
OverwriteNotAllowedException
computePackageName
public static java.lang.String computePackageName(EnvelopeType envelope)
computePackageFilename
public static java.lang.String computePackageFilename(EnvelopeType envelope)
© Copyright 2008 IBM Corp. 2008 All Rights Reserved