View Javadoc

1   package com.atlassian.plugin.osgi.factory.transform;
2   
3   import com.atlassian.plugin.osgi.hostcomponents.HostComponentRegistration;
4   import com.atlassian.plugin.PluginArtifact;
5   
6   import java.io.File;
7   import java.util.List;
8   
9   /**
10   * Transforms a plugin jar into a proper OSGi bundle
11   */
12  public interface PluginTransformer
13  {
14      /**
15       * Transforms a plugin jar into a proper OSGi bundle
16       *
17       * @param pluginJar The plugin file
18       * @param regs The list of registered host components
19       * @return The transformed OSGi bundle
20       * @throws PluginTransformationException If anything goes wrong
21       * @deprecated Since 2.2.0, use {@link #transform(PluginArtifact,List<HostComponentRegistration>)} instead
22       */
23      File transform(File pluginJar, List<HostComponentRegistration> regs) throws PluginTransformationException;
24  
25      /**
26       * Transforms a plugin artifact into a proper OSGi bundle
27       *
28       * @param pluginArtifact The plugin artifact
29       * @param regs The list of registered host components
30       * @return The transformed OSGi bundle
31       * @throws PluginTransformationException If anything goes wrong
32       * @since 2.2.0
33       */
34      File transform(PluginArtifact pluginArtifact, List<HostComponentRegistration> regs) throws PluginTransformationException;
35  }