Packagepotomac.bundle
Interfacepublic interface IBundleService extends flash.events.IEventDispatcher
Implementors BundleService

The IBundleService is responsible for loading and managing bundles. It is also the source for all bundle metadata extensions.



Public Methods
 MethodDefined By
  
getExtension(id:String, point:String):Extension
Returns a single Extension with the given id for the given extension point.
IBundleService
  
getExtensionPoint(pointID:String):ExtensionPoint
Returns the extension point with the given point id.
IBundleService
  
Returns an array of ExtensionPoint objects including each extension point in all installed bundles.
IBundleService
  
getExtensions(extensionPointID:String, className:String = null):Array
Returns an array of Extensions of the specified extension point.
IBundleService
  
install(installables:Array):void
Triggers the installation of one or more bundles.
IBundleService
  
isBundleLoaded(bundleID:String):Boolean
Returns true if the given bundle is loaded.
IBundleService
  
loadBundle(bundleID:String):void
Triggers the retrieval and load of the given bundle.
IBundleService
Method Detail
getExtension()method
public function getExtension(id:String, point:String):Extension

Returns a single Extension with the given id for the given extension point.

Parameters

id:String — extension id.
 
point:String — extension point id.

Returns
Extension — the first matching Extension or null if none exists.
getExtensionPoint()method 
public function getExtensionPoint(pointID:String):ExtensionPoint

Returns the extension point with the given point id.

Parameters

pointID:String — id/tag name of the extension point.

Returns
ExtensionPoint — the ExtensionPoint
getExtensionPoints()method 
public function getExtensionPoints():Array

Returns an array of ExtensionPoint objects including each extension point in all installed bundles.

Returns
Array — array of ExtensionPoints
getExtensions()method 
public function getExtensions(extensionPointID:String, className:String = null):Array

Returns an array of Extensions of the specified extension point. If the className parameter is passed, it will return only those extensions declared within that class.

Parameters

extensionPointID:String — extension point id of the extensions to return.
 
className:String (default = null) — name of the class in which the extensions are declared.

Returns
Array — an array of Extensions.
install()method 
public function install(installables:Array):void

Triggers the installation of one or more bundles. This method is asynchronous. When the installation is complete a bundlesInstalled event will be dispatched.

This method accepts an array that may contain Strings that contain just the simple bundle ID or BundleInstallDescriptors if you need to provide a more options.

Parameters

installables:Array — An array of bundle IDs as Strings or descriptors (BundleInstallDescriptors).

isBundleLoaded()method 
public function isBundleLoaded(bundleID:String):Boolean

Returns true if the given bundle is loaded.

Parameters

bundleID:String — bundle id to check if loaded.

Returns
Boolean — true if the bundle is loaded, otherwise false.
loadBundle()method 
public function loadBundle(bundleID:String):void

Triggers the retrieval and load of the given bundle. This method is asynchronous. A bundleReady event will be dispatched when the bundle is loaded.

Parameters

bundleID:String — id of bundle to load.