org.glassfish.osgiweb
Class WARManifestProcessor

java.lang.Object
  extended by org.glassfish.osgiweb.WARManifestProcessor

public class WARManifestProcessor
extends java.lang.Object

When a deployer installs a bundle with Constants.WEB_BUNDLE_SCHEME, our registered handler gets a chance to look at the stream and process the MANIFEST.MF. It adds necessary OSGi metadata as specified in section #5.2.1.2 of RFC #66. It uses the following information during computation: - WAR manifest entries, i.e., developer supplied data - Properties supplied via URL query parameters - Other information present in the WAR, e.g., existence of any jar in WEB-INF/lib causes that jar to be added as Bundle-ClassPath. For exact details, refer to the spec.

Author:
Sanjeeb.Sahoo@Sun.COM

Constructor Summary
WARManifestProcessor()
           
 
Method Summary
static java.util.jar.Manifest processManifest(java.net.URL url, java.lang.String query)
          Reads content of the given URL, uses it to come up with a new Manifest.
static java.util.Map<java.lang.String,java.lang.String> readQueryParams(java.lang.String query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WARManifestProcessor

public WARManifestProcessor()
Method Detail

readQueryParams

public static java.util.Map<java.lang.String,java.lang.String> readQueryParams(java.lang.String query)

processManifest

public static java.util.jar.Manifest processManifest(java.net.URL url,
                                                     java.lang.String query)
                                              throws java.io.IOException
Reads content of the given URL, uses it to come up with a new Manifest.

Parameters:
url - URL which is used to read the original Manifest and other data
query - extra parameters passed by deployer
Returns:
a new Manifest
Throws:
java.io.IOException - if IO related error occurs


Copyright © 2013 GlassFish Community. All Rights Reserved.