org.apache.aries.application.modelling.internal
Class BundleBlueprintParser

java.lang.Object
  extended by org.apache.aries.application.modelling.internal.BundleBlueprintParser

public class BundleBlueprintParser
extends Object

A bundle may contain a Bundle-Blueprint: header as per p649 of the v4 spec. If present, this denotes where to look for blueprint xml files. We could use Bundle.findEntries() to deal with the wildcards that the last entry in the list may contain, but our caller is introspecting .jar files within an EBA and does not have access to Bundle objects, so we need this extra support. Our caller needs to iterate over the files within a jar in each case asking this class, 'is this a blueprint file'?


Field Summary
static String DEFAULT_HEADER
           
 
Constructor Summary
BundleBlueprintParser()
          Default constructor
BundleBlueprintParser(org.apache.aries.util.manifest.BundleManifest bundleMf)
          BundleBlueprintParser constructor
BundleBlueprintParser(String bundleBPHeader)
          BundleBlueprintParser alternative constructor
 
Method Summary
 boolean isBPFile(String directory, String filename)
          Iterate through the list of valid file patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HEADER

public static final String DEFAULT_HEADER
See Also:
Constant Field Values
Constructor Detail

BundleBlueprintParser

public BundleBlueprintParser(org.apache.aries.util.manifest.BundleManifest bundleMf)
BundleBlueprintParser constructor

Parameters:
bundleMf - BundleManifest to construct the parser from

BundleBlueprintParser

public BundleBlueprintParser(String bundleBPHeader)
BundleBlueprintParser alternative constructor

Parameters:
bundleBPHeader - Bundle-Blueprint header to construct the parser from

BundleBlueprintParser

public BundleBlueprintParser()
Default constructor

Method Detail

isBPFile

public boolean isBPFile(String directory,
                        String filename)
Iterate through the list of valid file patterns. Return true if this matches against the header provided to the constructor. We're going to have to be case sensitive.

Parameters:
directory - Directory name
filename - File name
Returns:
true if this is a blueprint file according to the Bundle-Blueprint header


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.