Class PluginManifest

java.lang.Object
com.xebialabs.xlrelease.osgi.spring.PluginManifest

public final class PluginManifest extends Object
The manifest-header contract a bundle must satisfy to be recognized as a "Spring plugin" by the host:
 Bundle-SymbolicName: com.example.myplugin
 X-Plugin-Context: com.example.myplugin.MyPluginConfiguration
 X-Plugin-Prefix: my-plugin        # reserved for a future HTTP layer; omit in v1
 

Identity for host-side keying is always Bundle-SymbolicName, never the prefix - the prefix exists only to namespace URLs and has no reason to exist before an HTTP layer introduces them. It is therefore Optional here and its absence is not an error in v1.

  • Field Details

  • Method Details

    • pluginContextClassName

      public String pluginContextClassName()
    • prefix

      public Optional<String> prefix()
    • from

      public static Optional<PluginManifest> from(org.osgi.framework.Bundle bundle)
      Returns:
      Optional.empty() if bundle has no X-Plugin-Context header - it is not a Spring plugin, zero cost, matching BundleTracker.addingBundle's contract of returning null to skip tracking.
      Throws:
      InvalidPluginManifestException - if X-Plugin-Context is present but blank, or its class cannot be loaded from the bundle's own classloader, or if X-Plugin-Prefix is present but does not match the required pattern. A missing prefix is never an error in v1.