org.apache.felix.ipojo.manipulator.store.builder

## Class DefaultManifestBuilder

- java.lang.Object
- - org.apache.felix.ipojo.manipulator.store.builder.DefaultManifestBuilder

All Implemented Interfaces:
  ManifestBuilder

    public class DefaultManifestBuilder
    extends Object
    implements ManifestBuilder

A `DefaultManifestBuilder` handles the knowledge of iPOJO Manifest building. It is responsible to update a given Manifest with all gathered (additional) referenced packages (from the metadata.xml) + other iPOJO specific additions.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`DefaultManifestBuilder()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addMetada(Collection<org.apache.felix.ipojo.metadata.Element> metadatas)` Add all given metadata
`void` `addReferredPackage(Set<String> packageNames)` Add all given package names in the referred packages list
`Manifest` `build(Manifest original)` Update the given manifest.
`protected Map<String,Map<String,String>>` `parseHeader(String value)` Standard OSGi header parser.
`void` `setMetadataRenderer(MetadataRenderer renderer)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultManifestBuilder

    public DefaultManifestBuilder()

### Method Detail

#### addReferredPackage

    public void addReferredPackage(Set<String> packageNames)

Add all given package names in the referred packages list

Specified by:
  `addReferredPackage` in interface `ManifestBuilder`
Parameters:
  `packageNames` - additional packages

#### addMetada

    public void addMetada(Collection<org.apache.felix.ipojo.metadata.Element> metadatas)

Add all given metadata

Specified by:
  `addMetada` in interface `ManifestBuilder`
Parameters:
  `metadatas` - additional metadata

#### setMetadataRenderer

    public void setMetadataRenderer(MetadataRenderer renderer)

#### build

    public Manifest build(Manifest original)

Update the given manifest.

Specified by:
  `build` in interface `ManifestBuilder`
Parameters:
  `original` - original manifest to be modified
Returns:
  modified manifest

#### parseHeader

    protected Map<String,Map<String,String>> parseHeader(String value)

Standard OSGi header parser. This parser can handle the format

     clauses ::= clause ( ',' clause ) +
     clause ::= name ( ';' name ) (';' key '=' value )

This is mapped to a Map { name => Map { attr|directive => value } }

Parameters:
  `value` - String to parse.
Returns:
  parsed map.