| java.lang.Object org.java.plugin.tools.PluginArchiver
PluginArchiver | final public class PluginArchiver (Code) | | Plug-ins archive support class.
version: $Id$ |
Inner Class :public static interface Filter | |
Method Summary | |
public static void | pack(PluginDescriptor descr, PathResolver pathResolver, File destFile) Packs given plug-in into single ZIP file. | public static void | pack(PluginFragment fragment, PathResolver pathResolver, File destFile) Packs given plug-in fragment into single ZIP file. | public static Set<String> | pack(PluginRegistry registry, PathResolver pathResolver, File destFile) Packs all plug-ins from given registry as one archive file. | public static Set<String> | pack(PluginRegistry registry, PathResolver pathResolver, File destFile, Filter filter) Packs plug-ins from given registry as one archive file according to
given filter. | public static Set<String> | readDescriptor(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. | public static Set<String> | readDescriptor(URL archiveFile, PluginRegistry registry, Filter filter) Reads meta-information from plug-ins archive file and registers found
plug-in manifest data with given registry for future analysis.
Note:
In the current implementation all plug-in manifests are extracted to
temporary local storage and deleted immediately after their registration
with plug-in registry. | public static Set<String> | unpack(URL archiveFile, PluginRegistry registry, File destFolder) Extracts plug-ins from the given archive file. | public static Set<String> | unpack(URL archiveFile, PluginRegistry registry, File destFolder, Filter filter) Extracts plug-ins from the given archive file.
Note:
In the current implementation all plug-in manifests are extracted to
temporary local storage and deleted immediately after their registration
with plug-in registry. | public static Set<String> | unpack(URL archiveFile, File destFolder) Extracts all plug-ins from the given archive file. | public static Set<String> | unpack(URL archiveFile, File destFolder, Filter filter) Extracts plug-ins from the given archive file according to given filter. |
pack | public static void pack(PluginDescriptor descr, PathResolver pathResolver, File destFile) throws IOException(Code) | | Packs given plug-in into single ZIP file. Resulting file may be used to
run plug-ins from.
Parameters: descr - plug-in descriptor Parameters: pathResolver - path resolver instance Parameters: destFile - target file throws: IOException - if an I/O error has occurred |
pack | public static void pack(PluginFragment fragment, PathResolver pathResolver, File destFile) throws IOException(Code) | | Packs given plug-in fragment into single ZIP file. Resulting file may be
used to run plug-ins from.
Parameters: fragment - plug-in fragment descriptor Parameters: pathResolver - path resolver instance Parameters: destFile - target file throws: IOException - if an I/O error has occurred |
pack | public static Set<String> pack(PluginRegistry registry, PathResolver pathResolver, File destFile) throws IOException(Code) | | Packs all plug-ins from given registry as one archive file.
Parameters: registry - plug-ins registry Parameters: pathResolver - path resolver (only local file URLs are supported) Parameters: destFile - target archive file (will be overridden if any exists) set of UID's of all packed plug-ins throws: IOException - if an I/O error has occurred |
pack | public static Set<String> pack(PluginRegistry registry, PathResolver pathResolver, File destFile, Filter filter) throws IOException(Code) | | Packs plug-ins from given registry as one archive file according to
given filter.
Parameters: registry - plug-ins registry Parameters: pathResolver - path resolver (only local file URLs are supported) Parameters: destFile - target archive file (will be overridden if any exists) Parameters: filter - filter to be used when packing plug-ins set of UID's of all packed plug-ins throws: IOException - if an I/O error has occurred |
readDescriptor | public static Set<String> readDescriptor(URL archiveFile, PluginRegistry registry, Filter filter) throws IOException, ClassNotFoundException, ManifestProcessingException(Code) | | Reads meta-information from plug-ins archive file and registers found
plug-in manifest data with given registry for future analysis.
Note:
In the current implementation all plug-in manifests are extracted to
temporary local storage and deleted immediately after their registration
with plug-in registry. So manifest URL's are actually point to "fake"
locations and main purpose of this method is to allow you to analyze
plug-ins archive without needing to download and unpack it.
Parameters: archiveFile - plug-in archive file Parameters: registry - plug-in registry where to register discovered manifestsfor archived plug-ins Parameters: filter - filter to be used when un-packing plug-ins set of UID's of all registered plug-ins throws: IOException - if an I/O error has occurred throws: ClassNotFoundException - if descriptor can't be read throws: ManifestProcessingException - if manifest can't be registered(optional behavior) |
unpack | public static Set<String> unpack(URL archiveFile, PluginRegistry registry, File destFolder, Filter filter) throws IOException, ManifestProcessingException, ClassNotFoundException(Code) | | Extracts plug-ins from the given archive file.
Note:
In the current implementation all plug-in manifests are extracted to
temporary local storage and deleted immediately after their registration
with plug-in registry. So manifest URL's are actually point to "fake"
locations.
Parameters: archiveFile - plug-in archive file Parameters: registry - plug-in registry where to register manifests forunpacked plug-ins Parameters: destFolder - target folder Parameters: filter - filter to be used when un-packing plug-ins set of UID's of all un-packed (and registered) plug-ins throws: ClassNotFoundException - if plug-ins archive descriptor can't bede-serialized throws: ManifestProcessingException - if plug-in manifests can't beregistered throws: IOException - if archive damaged or I/O error has occurred |
|
|