org.jboss.osgi.resolver.spi
Class AbstractModuleBuilder

java.lang.Object
  extended by org.jboss.osgi.resolver.spi.AbstractModuleBuilder
All Implemented Interfaces:
XModuleBuilder

public class AbstractModuleBuilder
extends Object
implements XModuleBuilder

A builder for resolver modules

Since:
02-Jul-2010
Author:
thomas.diesler@jboss.com

Constructor Summary
AbstractModuleBuilder()
           
 
Method Summary
 XBundleCapability addBundleCapability(String symbolicName, Version version)
          Add a bundle capability
 XModuleBuilder addBundleClassPath(String... paths)
          Add a Constants.BUNDLE_CLASSPATH element
 XRequireBundleRequirement addBundleRequirement(String symbolicName, Map<String,String> dirs, Map<String,Object> atts)
          Add a Constants.REQUIRE_BUNDLE requirement
 XPackageRequirement addDynamicPackageRequirement(String name, Map<String,Object> atts)
          Add a Constants.DYNAMICIMPORT_PACKAGE requirement
 XFragmentHostRequirement addFragmentHostRequirement(String symbolicName, Map<String,String> dirs, Map<String,Object> atts)
          Add a Constants.FRAGMENT_HOST requirement
 XModuleBuilder addModuleActivator(String moduleActivator)
          Add a Constants.BUNDLE_ACTIVATOR element
 XPackageCapability addPackageCapability(String name, Map<String,String> dirs, Map<String,Object> atts)
          Add a Constants.EXPORT_PACKAGE capability
 XPackageRequirement addPackageRequirement(String name, Map<String,String> dirs, Map<String,Object> atts)
          Add a Constants.IMPORT_PACKAGE requirement
 XModuleBuilder createModule(OSGiMetaData metadata, int revision)
          Create a module builder from OSGi metadata
 XModuleBuilder createModule(String name, Version version, int revision)
          Create an empty module builder
 XModule getModule()
          Get the final module from the builder
 XModuleIdentity getModuleIdentity()
          Get the module identity from the builder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractModuleBuilder

public AbstractModuleBuilder()
Method Detail

createModule

public XModuleBuilder createModule(OSGiMetaData metadata,
                                   int revision)
                            throws BundleException
Description copied from interface: XModuleBuilder
Create a module builder from OSGi metadata

Specified by:
createModule in interface XModuleBuilder
Parameters:
metadata - The OSGi metadata
revision - The bundle revision
Throws:
BundleException

createModule

public XModuleBuilder createModule(String name,
                                   Version version,
                                   int revision)
Description copied from interface: XModuleBuilder
Create an empty module builder

Specified by:
createModule in interface XModuleBuilder
Parameters:
name - The module name
version - The module version
revision - The bundle revision

getModuleIdentity

public XModuleIdentity getModuleIdentity()
Description copied from interface: XModuleBuilder
Get the module identity from the builder

Specified by:
getModuleIdentity in interface XModuleBuilder

addBundleCapability

public XBundleCapability addBundleCapability(String symbolicName,
                                             Version version)
Description copied from interface: XModuleBuilder
Add a bundle capability

Specified by:
addBundleCapability in interface XModuleBuilder
Parameters:
symbolicName - The bundle symbolic name
version - The bundle version

addBundleRequirement

public XRequireBundleRequirement addBundleRequirement(String symbolicName,
                                                      Map<String,String> dirs,
                                                      Map<String,Object> atts)
Description copied from interface: XModuleBuilder
Add a Constants.REQUIRE_BUNDLE requirement

Specified by:
addBundleRequirement in interface XModuleBuilder
Parameters:
symbolicName - The bundle symbolic name
dirs - The directives
atts - The attributes

addFragmentHostRequirement

public XFragmentHostRequirement addFragmentHostRequirement(String symbolicName,
                                                           Map<String,String> dirs,
                                                           Map<String,Object> atts)
Description copied from interface: XModuleBuilder
Add a Constants.FRAGMENT_HOST requirement

Specified by:
addFragmentHostRequirement in interface XModuleBuilder
Parameters:
symbolicName - The bundle symbolic name
dirs - The directives
atts - The attributes

addPackageCapability

public XPackageCapability addPackageCapability(String name,
                                               Map<String,String> dirs,
                                               Map<String,Object> atts)
Description copied from interface: XModuleBuilder
Add a Constants.EXPORT_PACKAGE capability

Specified by:
addPackageCapability in interface XModuleBuilder
Parameters:
name - The package name
dirs - The directives
atts - The attributes

addPackageRequirement

public XPackageRequirement addPackageRequirement(String name,
                                                 Map<String,String> dirs,
                                                 Map<String,Object> atts)
Description copied from interface: XModuleBuilder
Add a Constants.IMPORT_PACKAGE requirement

Specified by:
addPackageRequirement in interface XModuleBuilder
Parameters:
name - The package name
dirs - The directives
atts - The attributes

addDynamicPackageRequirement

public XPackageRequirement addDynamicPackageRequirement(String name,
                                                        Map<String,Object> atts)
Description copied from interface: XModuleBuilder
Add a Constants.DYNAMICIMPORT_PACKAGE requirement

Specified by:
addDynamicPackageRequirement in interface XModuleBuilder
Parameters:
name - The package name
atts - The attributes

addBundleClassPath

public XModuleBuilder addBundleClassPath(String... paths)
Description copied from interface: XModuleBuilder
Add a Constants.BUNDLE_CLASSPATH element

Specified by:
addBundleClassPath in interface XModuleBuilder

addModuleActivator

public XModuleBuilder addModuleActivator(String moduleActivator)
Description copied from interface: XModuleBuilder
Add a Constants.BUNDLE_ACTIVATOR element

Specified by:
addModuleActivator in interface XModuleBuilder

getModule

public XModule getModule()
Description copied from interface: XModuleBuilder
Get the final module from the builder

Specified by:
getModule in interface XModuleBuilder


Copyright © 2011. All Rights Reserved.