com.springsource.util.osgi.manifest
Class BundleManifestFactory

java.lang.Object
  extended by com.springsource.util.osgi.manifest.BundleManifestFactory

public class BundleManifestFactory
extends java.lang.Object

This interface provides factory methods for creating empty bundle manifests and empty instances of the more complex bundle headers.

Concurrent Semantics
Implementations of this interface must be thread safe.

Since:
1.0
Author:
Glyn Normington, Andy Wilkinson, Ben Hale

Constructor Summary
BundleManifestFactory()
           
 
Method Summary
static BundleManifest createBundleManifest()
          Creates a new, empty BundleManifest.
static BundleManifest createBundleManifest(java.util.Dictionary<java.lang.String,java.lang.String> headers)
          Creates a new BundleManifest derived from the supplied Dictionary of bundle manifest headers.
static BundleManifest createBundleManifest(java.util.Dictionary<java.lang.String,java.lang.String> headers, ParserLogger parserLogger)
          Creates a new BundleManifest derived from the supplied Dictionary of bundle manifest headers.
static BundleManifest createBundleManifest(ManifestContents manifestContents, ParserLogger parserLogger)
           
static BundleManifest createBundleManifest(ParserLogger parserLogger)
          Creates a new, empty BundleManifest.
static BundleManifest createBundleManifest(java.io.Reader reader)
          Creates a new BundleManifest, reading its contents from the supplied Reader.
static BundleManifest createBundleManifest(java.io.Reader reader, ParserLogger parserLogger)
          Creates a new BundleManifest, reading its contents from the supplied Reader The supplied ParserLogger will be used to report problems encountered during parsing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleManifestFactory

public BundleManifestFactory()
Method Detail

createBundleManifest

public static BundleManifest createBundleManifest()
Creates a new, empty BundleManifest.

Returns:
the new BundleManifest.

createBundleManifest

public static BundleManifest createBundleManifest(ParserLogger parserLogger)
Creates a new, empty BundleManifest.

Parameters:
parserLogger - The parser logger to use when creating new headers in the manifest
Returns:
the new BundleManifest.

createBundleManifest

public static BundleManifest createBundleManifest(java.util.Dictionary<java.lang.String,java.lang.String> headers)
Creates a new BundleManifest derived from the supplied Dictionary of bundle manifest headers.

Parameters:
headers - The Dictionary of headers
Returns:
The BundleManifest derived from the Dictionary.

createBundleManifest

public static BundleManifest createBundleManifest(java.util.Dictionary<java.lang.String,java.lang.String> headers,
                                                  ParserLogger parserLogger)
Creates a new BundleManifest derived from the supplied Dictionary of bundle manifest headers. The supplied ParserLogger will be used to report problems encountered during parsing.

Parameters:
headers - The Dictionary of headers
parserLogger - The ParserLogger to be used to report parsing problems.
Returns:
The BundleManifest derived from the Dictionary.

createBundleManifest

public static BundleManifest createBundleManifest(ManifestContents manifestContents,
                                                  ParserLogger parserLogger)

createBundleManifest

public static BundleManifest createBundleManifest(java.io.Reader reader,
                                                  ParserLogger parserLogger)
                                           throws java.io.IOException
Creates a new BundleManifest, reading its contents from the supplied Reader The supplied ParserLogger will be used to report problems encountered during parsing.

Parameters:
reader - The Reader of headers
parserLogger - The ParserLogger to be used to report parsing problems.
Returns:
The BundleManifest populated by reading the Reader.
Throws:
java.io.IOException - if an error occurs reading the supplied Reader.

createBundleManifest

public static BundleManifest createBundleManifest(java.io.Reader reader)
                                           throws java.io.IOException
Creates a new BundleManifest, reading its contents from the supplied Reader.

Parameters:
reader - The Reader of headers
Returns:
The BundleManifest populated by reading the Reader.
Throws:
java.io.IOException - if an error occurs reading the supplied Reader.