org.eclipse.osgi.service.pluginconversion
Interface PluginConverter


public interface PluginConverter

A plug-in convertor is able to convert plug-in manifest files (plugin.xml) and fragment manifest files (fragment.xml) to bundle manifest files (MANIFEST.MF).

This interface is not intended to be implemented by clients.

Since:
3.0

Method Summary
 java.util.Dictionary convertManifest(java.io.File pluginBaseLocation, boolean compatibility, java.lang.String target, boolean analyseJars, java.util.Dictionary devProperties)
          Converts a plug-in/fragment manifest at the given source base location (a directory) and generates a corresponding bundle manifest returned as a dictionary.
 java.io.File convertManifest(java.io.File pluginBaseLocation, java.io.File bundleManifestLocation, boolean compatibilityManifest, java.lang.String target, boolean analyseJars, java.util.Dictionary devProperties)
          Converts a plug-in/fragment manifest at the given source base location (a directory) and generates a corresponding bundle manifest at the given default target locaton (a file).
 void writeManifest(java.io.File generationLocation, java.util.Dictionary manifestToWrite, boolean compatibilityManifest)
          Construct a bundle manifest file from the given dictionary and write it out to the specified location in the file system.
 

Method Detail

convertManifest

java.io.File convertManifest(java.io.File pluginBaseLocation,
                             java.io.File bundleManifestLocation,
                             boolean compatibilityManifest,
                             java.lang.String target,
                             boolean analyseJars,
                             java.util.Dictionary devProperties)
                             throws PluginConversionException
Converts a plug-in/fragment manifest at the given source base location (a directory) and generates a corresponding bundle manifest at the given default target locaton (a file).

Parameters:
pluginBaseLocation - the base location for the plug-in/fragment manifest to be converted (a directory, e.g. the plug-in install location)
bundleManifestLocation - the location for the bundle manifest to be generated (including the file name).
compatibilityManifest - a boolean indicating if the manifest should contain headers to run in backward compatibility
target - a string indicating the version of the runtime for which the manifest generated is targeted
analyseJars - a boolean indicating if the code jars of the given plugin must be analysed. When set to false the Export-Package header will not be set in the bundle manifest.
devProperties - a dictionary of development time classpath properties. The dictionary contains a mapping from plugin id to development time classpath. A value of null indicates that the default development time classpath properties will be used.
Returns:
the generated manifest file location, if a bundle manifest was successfully generated (or already existed), null otherwise.
Throws:
PluginConversionException - if an error occurs while converting the manifest

convertManifest

java.util.Dictionary convertManifest(java.io.File pluginBaseLocation,
                                     boolean compatibility,
                                     java.lang.String target,
                                     boolean analyseJars,
                                     java.util.Dictionary devProperties)
                                     throws PluginConversionException
Converts a plug-in/fragment manifest at the given source base location (a directory) and generates a corresponding bundle manifest returned as a dictionary.

Parameters:
pluginBaseLocation - the base location for the plug-in/fragment manifest to be converted (a directory, e.g. the plug-in install location)
compatibility - a boolean indicating if the manifest should contain headers to run in backward compatibility
target - a string indicating the version of the runtime for which the manifest generated is targeted
analyseJars - a boolean indicating if the code jars of the given plugin must be analysed. When set to false the Export-Package header will not be set in the bundle manifest.
devProperties - a dictionary of development time classpath properties. The dictionary contains a mapping from plugin id to development time classpath. A value of null indicates that the default development time classpath properties will be used.
Returns:
the generated manifest as a dictionary, if a bundle manifest was successfully generated, null otherwise
Throws:
PluginConversionException - if an error occurs while converting the manifest

writeManifest

void writeManifest(java.io.File generationLocation,
                   java.util.Dictionary manifestToWrite,
                   boolean compatibilityManifest)
                   throws PluginConversionException
Construct a bundle manifest file from the given dictionary and write it out to the specified location in the file system.

If the compatibilityManifest parameter is true then the generated manifest will include the necessary headers to all the manifest to be run in backwards compatibility mode.

Parameters:
generationLocation - the location for the bundle manifest to be written
manifestToWrite - the dictionary to write into generationLocation file
compatibilityManifest - a boolean indicating if the file should contain headers to allow running in backward compatibility mode
Throws:
PluginConversionException - if an error occurs while writing the given manifest