Packagecom.bourre.plugin
Classpublic class AbstractPlugin
ImplementsPlugin

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Abstract implementation of Plugin.



Protected Properties
 PropertyDefined by
  _oController : FrontController
Plugin FronController
AbstractPlugin
  _oEBPublic : Broadcaster
Public Braodcaster
AbstractPlugin
  _oModelLocator : ModelLocator
Locator for models
AbstractPlugin
  _oViewLocator : ViewLocator
Locator for views
AbstractPlugin
Public Methods
 MethodDefined by
  
Creates new AbstractPlugin instance.
AbstractPlugin
  
addEventListener(type:String, listener:Object, ... rest):Boolean
Adds an event listener for the specified event type.
AbstractPlugin
  
addListener(listener:Object):Boolean
Adds the passed-in listener as listener for all events dispatched by this event broadcaster.
AbstractPlugin
  
fireExternalEvent(e:Event, externalChannel:EventChannel):void
Fires events using dedicated event channel.
AbstractPlugin
  
firePrivateEvent(e:Event):void
Fires events using private ( internal ) event channel.
AbstractPlugin
  
firePublicEvent(e:Event):void
Fires events using public event channel.
AbstractPlugin
  
Returns plugin's event channel.
AbstractPlugin
  
Returns plugin's FrontController.
AbstractPlugin
  
Returns plugin's debug channel.
AbstractPlugin
  
getModel(key:String):AbstractModel
Returns an AbstractModel instance if it is registered in model locator with passed-in key identifier.
AbstractPlugin
  
getView(key:String):AbstractView
Returns an AbstractView instance if it is registered in view locator with passed-in key identifier.
AbstractPlugin
  
isModelRegistered(name:String):Boolean
Returns true if a model is registered in model locator with passed-in name.
AbstractPlugin
  
isViewRegistered(name:String):Boolean
Returns true if a view is registered in view locator with passed-in name.
AbstractPlugin
  
Triggered when all IoC processing is finished.
AbstractPlugin
  
release():void
Releases instance.
AbstractPlugin
  
removeEventListener(type:String, listener:Object):Boolean
Removes the passed-in listener for listening the specified event.
AbstractPlugin
  
removeListener(listener:Object):Boolean
Removes the passed-in listener object from this event broadcaster.
AbstractPlugin
  
toString():String
Returns the string representation of this instance.
AbstractPlugin
Protected Methods
 MethodDefined by
  
_initialize():void
Starts plugin initialisation.
AbstractPlugin
  
Fires onInitPlugin event type.
AbstractPlugin
  
Fires onReleasePlugin event type.
AbstractPlugin
  
Returns plugin's model locator.
AbstractPlugin
  
Returns plugin's view locator.
AbstractPlugin
Events
 EventSummaryDefined by
   Dispatched when plugin is initialized.AbstractPlugin
   Dispatched when plugin is released.AbstractPlugin
Property detail
_oControllerproperty
protected var _oController:FrontController

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Plugin FronController

_oEBPublicproperty 
protected var _oEBPublic:Broadcaster

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Public Braodcaster

_oModelLocatorproperty 
protected var _oModelLocator:ModelLocator

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Locator for models

_oViewLocatorproperty 
protected var _oViewLocator:ViewLocator

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Locator for views

Constructor detail
AbstractPlugin()constructor
public function AbstractPlugin()

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Creates new AbstractPlugin instance.

Method detail
_initialize()method
protected function _initialize():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Starts plugin initialisation.

builds all locator, and event channel.

addEventListener()method 
public function addEventListener(type:String, listener:Object, ... rest):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds an event listener for the specified event type. There is two behaviors for the addEventListener function :

  1. The passed-in listener is an object : The object is added as listener only for the specified event, the object must have a function with the same name than type or at least a handleEvent function.
  2. The passed-in listener is a function : A Delegate object is created and then added as listener for the event type. There is no restriction on the name of the function. If the rest is not empty, all elements in it is used as additional arguments into the delegate object.

Parameters
type:String — name of the event for which register the listener
 
listener:Object — object or function which will receive this event
 
... rest — additional arguments for the function listener

Returns
Booleantrue if the function have been succesfully added as listener fot the passed-in event
addListener()method 
public function addListener(listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds the passed-in listener as listener for all events dispatched by this event broadcaster. The function returns true if the listener have been added at the end of the call. If the listener is already registered in this event broadcaster the function returns false.

Note : The addListener function doesn't accept functions as listener, functions could only register for a single event.

Parameters
listener:Object — the listener object to add as global listener

Returns
Booleantrue if the listener have been added during this call
fireExternalEvent()method 
public function fireExternalEvent(e:Event, externalChannel:EventChannel):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Fires events using dedicated event channel.

Only listeners on this event channel can receive the event.

Parameters
e:Event
 
externalChannel:EventChannel
fireOnInitPlugin()method 
protected function fireOnInitPlugin():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Fires onInitPlugin event type.


Events
onInitPlugin — When plugin is initialized
fireOnReleasePlugin()method 
protected function fireOnReleasePlugin():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Fires onReleasePlugin event type.


Events
onReleasePlugin — When plugin is released
firePrivateEvent()method 
public function firePrivateEvent(e:Event):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Fires events using private ( internal ) event channel.

These events can be only handled by this plugin itself.
Others plugins in context can't listen this event.

Parameters
e:Event
firePublicEvent()method 
public function firePublicEvent(e:Event):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Fires events using public event channel.

Each plugin who listen this type of event will be triggered.

Parameters
e:Event
getChannel()method 
public function getChannel():EventChannel

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns plugin's event channel.

Returns
EventChannel
getController()method 
public function getController():FrontController

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns plugin's FrontController.

Returns
FrontController
getLogger()method 
public function getLogger():PluginDebug

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns plugin's debug channel.

Returns
PluginDebug
getModel()method 
public function getModel(key:String):AbstractModel

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns an AbstractModel instance if it is registered in model locator with passed-in key identifier.

Parameters
key:String — Model identifier to return.

Returns
AbstractModel — The model registered with passed-in key or null
getModelLocator()method 
protected function getModelLocator():ModelLocator

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns plugin's model locator.

Returns
ModelLocator
getView()method 
public function getView(key:String):AbstractView

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns an AbstractView instance if it is registered in view locator with passed-in key identifier.

Parameters
key:String — View identifier to return.

Returns
AbstractView — The view registered with passed-in key or null
getViewLocator()method 
protected function getViewLocator():ViewLocator

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns plugin's view locator.

Returns
ViewLocator
isModelRegistered()method 
public function isModelRegistered(name:String):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns true if a model is registered in model locator with passed-in name.

Parameters
name:String — Model identifier to search

Returns
Booleantrue if a model is registered in model locator with passed-in name.
isViewRegistered()method 
public function isViewRegistered(name:String):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns true if a view is registered in view locator with passed-in name.

Parameters
name:String — View identifier to search

Returns
Booleantrue if a view is registered in model locator with passed-in name.
onApplicationInit()method 
public function onApplicationInit():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Triggered when all IoC processing is finished.

release()method 
public function release():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Releases instance.

All locators are releases.
Event controller and channel too.

removeEventListener()method 
public function removeEventListener(type:String, listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in listener for listening the specified event. The listener could be either an object or a function.

Parameters
type:String — name of the event for which unregister the listener
 
listener:Object — object or function to be unregistered

Returns
Booleantrue if the listener have been successfully removed as listener for the passed-in event
removeListener()method 
public function removeListener(listener:Object):Boolean

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Removes the passed-in listener object from this event broadcaster. The object is removed as listener for all events the broadcaster may dispatch.

Parameters
listener:Object — the listener object to remove from this event broadcaster object

Returns
Booleantrue if the object have been successfully removed from this event broadcaster
toString()method 
public function toString():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string representation of this instance.

Returns
String — the string representation of this instance
Event detail
onInitPluginevent 
Event object type: com.bourre.plugin.PluginEvent
PluginEvent.type property = com.bourre.plugin.PluginEvent.onInitPluginEVENT

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatched when plugin is initialized.

Defines the value of the type property of the event object for a onInitPlugin event.

The properties of the event object have the following values:

PropertyValue
type Dispatched event type
MethodValue
getPlugin() The plugin carried by this event
onReleasePluginevent  
Event object type: com.bourre.plugin.PluginEvent
PluginEvent.type property = com.bourre.plugin.PluginEvent.onReleasePluginEVENT

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Dispatched when plugin is released.

Defines the value of the type property of the event object for a onReleasePlugin event.

The properties of the event object have the following values:

PropertyValue
type Dispatched event type
MethodValue
getPlugin() The plugin carried by this event