public final class PluginArchiver
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
PluginArchiver.Filter
Callback interface to filter plug-ins being processed.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
pack(PluginDescriptor descr,
PathResolver pathResolver,
java.io.File destFile)
Packs given plug-in into single ZIP file.
|
static void |
pack(PluginFragment fragment,
PathResolver pathResolver,
java.io.File destFile)
Packs given plug-in fragment into single ZIP file.
|
static java.util.Set<java.lang.String> |
pack(PluginRegistry registry,
PathResolver pathResolver,
java.io.File destFile)
Packs all plug-ins from given registry as one archive file.
|
static java.util.Set<java.lang.String> |
pack(PluginRegistry registry,
PathResolver pathResolver,
java.io.File destFile,
PluginArchiver.Filter filter)
Packs plug-ins from given registry as one archive file according to
given filter.
|
static java.util.Set<java.lang.String> |
readDescriptor(java.net.URL archiveFile,
PluginRegistry registry)
Reads meta-information from plug-ins archive file and registers found
plug-in manifest data with given registry for future analysis.
|
static java.util.Set<java.lang.String> |
readDescriptor(java.net.URL archiveFile,
PluginRegistry registry,
PluginArchiver.Filter filter)
Reads meta-information from plug-ins archive file and registers found
plug-in manifest data with given registry for future analysis.
|
static java.util.Set<java.lang.String> |
unpack(java.net.URL archiveFile,
java.io.File destFolder)
Extracts all plug-ins from the given archive file.
|
static java.util.Set<java.lang.String> |
unpack(java.net.URL archiveFile,
java.io.File destFolder,
PluginArchiver.Filter filter)
Extracts plug-ins from the given archive file according to given filter.
|
static java.util.Set<java.lang.String> |
unpack(java.net.URL archiveFile,
PluginRegistry registry,
java.io.File destFolder)
Extracts plug-ins from the given archive file.
|
static java.util.Set<java.lang.String> |
unpack(java.net.URL archiveFile,
PluginRegistry registry,
java.io.File destFolder,
PluginArchiver.Filter filter)
Extracts plug-ins from the given archive file.
|
public static void pack(PluginDescriptor descr, PathResolver pathResolver, java.io.File destFile) throws java.io.IOException
descr - plug-in descriptorpathResolver - path resolver instancedestFile - target filejava.io.IOException - if an I/O error has occurredpublic static void pack(PluginFragment fragment, PathResolver pathResolver, java.io.File destFile) throws java.io.IOException
fragment - plug-in fragment descriptorpathResolver - path resolver instancedestFile - target filejava.io.IOException - if an I/O error has occurredpublic static java.util.Set<java.lang.String> pack(PluginRegistry registry, PathResolver pathResolver, java.io.File destFile) throws java.io.IOException
registry - plug-ins registrypathResolver - path resolver (only local file URLs are supported)destFile - target archive file (will be overridden if any exists)java.io.IOException - if an I/O error has occurredpublic static java.util.Set<java.lang.String> pack(PluginRegistry registry, PathResolver pathResolver, java.io.File destFile, PluginArchiver.Filter filter) throws java.io.IOException
registry - plug-ins registrypathResolver - path resolver (only local file URLs are supported)destFile - target archive file (will be overridden if any exists)filter - filter to be used when packing plug-insjava.io.IOException - if an I/O error has occurredpublic static java.util.Set<java.lang.String> unpack(java.net.URL archiveFile,
PluginRegistry registry,
java.io.File destFolder)
throws ManifestProcessingException,
java.io.IOException,
java.lang.ClassNotFoundException
archiveFile - plug-in archive fileregistry - plug-in registry where to register manifests for
unpacked plug-insdestFolder - target folderjava.io.IOException - if an I/O error has occurredjava.lang.ClassNotFoundException - if descriptor can't be readManifestProcessingException - if manifest can't be registered
(optional behavior)unpack(URL, PluginRegistry, File, PluginArchiver.Filter)public static java.util.Set<java.lang.String> unpack(java.net.URL archiveFile,
PluginRegistry registry,
java.io.File destFolder,
PluginArchiver.Filter filter)
throws java.io.IOException,
ManifestProcessingException,
java.lang.ClassNotFoundException
archiveFile - plug-in archive fileregistry - plug-in registry where to register manifests for
unpacked plug-insdestFolder - target folderfilter - filter to be used when un-packing plug-insjava.lang.ClassNotFoundException - if plug-ins archive descriptor can't be
de-serializedManifestProcessingException - if plug-in manifests can't be
registeredjava.io.IOException - if archive damaged or I/O error has occurredpublic static java.util.Set<java.lang.String> unpack(java.net.URL archiveFile,
java.io.File destFolder)
throws ManifestProcessingException,
java.io.IOException,
java.lang.ClassNotFoundException
Standard plug-in registry
implementation will be used internally to read plug-in manifests.archiveFile - plug-in archive filedestFolder - target folderjava.io.IOException - if an I/O error has occurredjava.lang.ClassNotFoundException - if descriptor can't be readManifestProcessingException - if manifest can't be registered
(optional behavior)ObjectFactory.createRegistry()public static java.util.Set<java.lang.String> unpack(java.net.URL archiveFile,
java.io.File destFolder,
PluginArchiver.Filter filter)
throws ManifestProcessingException,
java.io.IOException,
java.lang.ClassNotFoundException
Standard plug-in registry
implementation will be used internally to read plug-in manifests.archiveFile - plug-in archive filedestFolder - target folderfilter - filter to be used when un-packing plug-insjava.io.IOException - if an I/O error has occurredjava.lang.ClassNotFoundException - if descriptor can't be readManifestProcessingException - if manifest can't be registered
(optional behavior)public static java.util.Set<java.lang.String> readDescriptor(java.net.URL archiveFile,
PluginRegistry registry)
throws java.io.IOException,
java.lang.ClassNotFoundException,
ManifestProcessingException
archiveFile - plug-in archive fileregistry - plug-in registry where to register discovered manifests
for archived plug-insjava.io.IOException - if an I/O error has occurredjava.lang.ClassNotFoundException - if descriptor can't be readManifestProcessingException - if manifest can't be registered
(optional behavior)readDescriptor(URL, PluginRegistry, PluginArchiver.Filter)public static java.util.Set<java.lang.String> readDescriptor(java.net.URL archiveFile,
PluginRegistry registry,
PluginArchiver.Filter filter)
throws java.io.IOException,
java.lang.ClassNotFoundException,
ManifestProcessingException
archiveFile - plug-in archive fileregistry - plug-in registry where to register discovered manifests
for archived plug-insfilter - filter to be used when un-packing plug-insjava.io.IOException - if an I/O error has occurredjava.lang.ClassNotFoundException - if descriptor can't be readManifestProcessingException - if manifest can't be registered
(optional behavior)Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.