Packageorg.swizframework.core
Classpublic class SwizConfig
InheritanceSwizConfig Inheritance Object
Implements ISwizConfig



Public Properties
 PropertyDefined By
  defaultDispatcher : String
Default Dispatcher to use for all Mediators and Dispatcher injections.
SwizConfig
  defaultFaultHandler : Function
Default Fault Handler
SwizConfig
  eventPackages : Array
When using strict mode, eventPackages allows you to use unqualified class/event names in your [Mediate] metadata.
SwizConfig
  setUpEventPhase : uint
Swiz will listen for the setUp event in this event phase and perform injections in response.
SwizConfig
  setUpEventPriority : int
Swiz will listen for the setUp event at the specified priority.
SwizConfig
  setUpEventType : String
Swiz will listen for this event and process eligible views in response.
SwizConfig
  strict : Boolean
Flag to enable runtime validation of mediated events.
SwizConfig
  tearDownEventPhase : uint
Swiz will listen for the injection event at this specified injection event phase and perform injections in response.
SwizConfig
  tearDownEventPriority : int
Swiz will listen for the tearDown event at the specified priority.
SwizConfig
  tearDownEventType : String
Swiz will listen for this event and tear down views in response.
SwizConfig
  viewPackages : Array
If this property is set, Swiz will only introspect and potentially inject into components added to the display list that match a provided package.
SwizConfig
Protected Properties
 PropertyDefined By
  _defaultDispatcher : String = global
Backing variable for the defaultDispatcher property.
SwizConfig
  _defaultFaultHandler : Function
Backing variable for the defaultFaultHandler property.
SwizConfig
  _eventPackages : Array
Backing variable for the eventPackages property.
SwizConfig
  _setUpEventPhase : uint = 1.0
Backing variable for the setUpEventPhase property.
SwizConfig
  _setUpEventPriority : int = 50
Backing variable for the setUpEventPriority property.
SwizConfig
  _setUpEventType : String = addedToStage
Backing variable for the setUpEvent property.
SwizConfig
  _strict : Boolean = true
Backing variable for the strict property.
SwizConfig
  _tearDownEventPhase : uint = 1.0
Backing variable for the tearDownEventPhase property.
SwizConfig
  _tearDownEventPriority : int = 50
Backing variable for the tearDownEventPriority property.
SwizConfig
  _tearDownEventType : String = removedFromStage
Backing variable for the tearDownEvent property.
SwizConfig
  _viewPackages : Array
Backing variable for the viewPackages property.
SwizConfig
Public Methods
 MethodDefined By
  
Constructor
SwizConfig
Protected Methods
 MethodDefined By
  
parsePackageName(packageName:String):String
Parse Package Name Processes the package name to a common format - removing trailing '.
SwizConfig
  
parsePackageNames(packageNames:Array):Array
Parses an array of package names.
SwizConfig
  
parsePackageValue(value:*):Array
Parses a wildcard type package property value into an Array of parsed package names.
SwizConfig
  
setEventPackages(value:*):void
Internal setter for eventPackages property.
SwizConfig
  
setViewPackages(value:*):void
Internal setter for viewPackages property.
SwizConfig
Public Constants
 ConstantDefined By
  GLOBAL_DISPATCHER : String = global
[static]
SwizConfig
  LOCAL_DISPATCHER : String = local
[static]
SwizConfig
Protected Constants
 ConstantDefined By
  WILDCARD_PACKAGE : RegExp
[static] Regular expression to evaluate a 'wildcard' (ex.
SwizConfig
Property Detail
_defaultDispatcherproperty
protected var _defaultDispatcher:String = global

Backing variable for the defaultDispatcher property.

_defaultFaultHandlerproperty 
protected var _defaultFaultHandler:Function

Backing variable for the defaultFaultHandler property.

_eventPackagesproperty 
protected var _eventPackages:Array

Backing variable for the eventPackages property.

_setUpEventPhaseproperty 
protected var _setUpEventPhase:uint = 1.0

Backing variable for the setUpEventPhase property.

_setUpEventPriorityproperty 
protected var _setUpEventPriority:int = 50

Backing variable for the setUpEventPriority property.

_setUpEventTypeproperty 
protected var _setUpEventType:String = addedToStage

Backing variable for the setUpEvent property.

_strictproperty 
protected var _strict:Boolean = true

Backing variable for the strict property.

_tearDownEventPhaseproperty 
protected var _tearDownEventPhase:uint = 1.0

Backing variable for the tearDownEventPhase property.

_tearDownEventPriorityproperty 
protected var _tearDownEventPriority:int = 50

Backing variable for the tearDownEventPriority property.

_tearDownEventTypeproperty 
protected var _tearDownEventType:String = removedFromStage

Backing variable for the tearDownEvent property.

_viewPackagesproperty 
protected var _viewPackages:Array

Backing variable for the viewPackages property.

defaultDispatcherproperty 
defaultDispatcher:String

Default Dispatcher to use for all Mediators and Dispatcher injections. Can be overriden with dispatcher property on those metadata tags.


Implementation
    public function get defaultDispatcher():String
    public function set defaultDispatcher(value:String):void
defaultFaultHandlerproperty 
defaultFaultHandler:Function

Default Fault Handler


Implementation
    public function get defaultFaultHandler():Function
    public function set defaultFaultHandler(value:Function):void
eventPackagesproperty 
eventPackages:Array

When using strict mode, eventPackages allows you to use unqualified class/event names in your [Mediate] metadata. For example, [Mediate( event="com.foo.events.MyEvent.FOO" )] can be shortened to [Mediate( event="MyEvent.FOO" )] if com.foo.events is provided as an eventPackage.


Implementation
    public function get eventPackages():Array
    public function set eventPackages(value:Array):void
setUpEventPhaseproperty 
setUpEventPhase:uint

Swiz will listen for the setUp event in this event phase and perform injections in response. Default value is flash.events.EventPhase.CAPTURING_PHASE. Valid options are flash.events.EventPhase.BUBBLING_PHASE and flash.events.EventPhase.CAPTURE_PHASE.


Implementation
    public function get setUpEventPhase():uint
    public function set setUpEventPhase(value:uint):void
setUpEventPriorityproperty 
setUpEventPriority:int

Swiz will listen for the setUp event at the specified priority. Default value is 50. The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority.


Implementation
    public function get setUpEventPriority():int
    public function set setUpEventPriority(value:int):void
setUpEventTypeproperty 
setUpEventType:String

Swiz will listen for this event and process eligible views in response. Default value is addedToStage. Potential alternatives are preinitialize, initialize, creationComplete and addedToStage. Any event can be used, but you should obviously favor events that happen once per component.


Implementation
    public function get setUpEventType():String
    public function set setUpEventType(value:String):void
strictproperty 
strict:Boolean

Flag to enable runtime validation of mediated events. If set to true, [Mediate( event="FooEvent.FOO", properties="username, password" )] will cause Swiz to validate that FooEvent exists, has a constant named FOO and has member variables named username and password.


Implementation
    public function get strict():Boolean
    public function set strict(value:Boolean):void
tearDownEventPhaseproperty 
tearDownEventPhase:uint

Swiz will listen for the injection event at this specified injection event phase and perform injections in response. Default value is flash.events.EventPhase.CAPTURING_PHASE. Valid options are flash.events.EventPhase.BUBBLING_PHASE and flash.events.EventPhase.CAPTURE_PHASE.


Implementation
    public function get tearDownEventPhase():uint
    public function set tearDownEventPhase(value:uint):void
tearDownEventPriorityproperty 
tearDownEventPriority:int

Swiz will listen for the tearDown event at the specified priority. Default value is 50. The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority.


Implementation
    public function get tearDownEventPriority():int
    public function set tearDownEventPriority(value:int):void
tearDownEventTypeproperty 
tearDownEventType:String

Swiz will listen for this event and tear down views in response. Default value is removedFromStage.


Implementation
    public function get tearDownEventType():String
    public function set tearDownEventType(value:String):void
viewPackagesproperty 
viewPackages:Array

If this property is set, Swiz will only introspect and potentially inject into components added to the display list that match a provided package. It is primarily for performance purposes and its use is strongly recommended. Beans declared in an IBeanProvider are always eligible for injection.


Implementation
    public function get viewPackages():Array
    public function set viewPackages(value:Array):void
Constructor Detail
SwizConfig()Constructor
public function SwizConfig()

Constructor

Method Detail
parsePackageName()method
protected function parsePackageName(packageName:String):String

Parse Package Name Processes the package name to a common format - removing trailing '. wildcard notation.

Parameters

packageName:String — The package name to parse.

Returns
String
parsePackageNames()method 
protected function parsePackageNames(packageNames:Array):Array

Parses an array of package names. Processes the package names to a common format - removing trailing '. wildcard notation.

Parameters

packageNames:Array — The package names to parse.

Returns
Array
parsePackageValue()method 
protected function parsePackageValue(value:*):Array

Parses a wildcard type package property value into an Array of parsed package names.

Parameters

value:* — An Array of Strings or a single String that will be split on ","

Returns
Array
setEventPackages()method 
protected function setEventPackages(value:*):void

Internal setter for eventPackages property.

Parameters

value:* — An Array of Strings or a single String that will be split on ","

setViewPackages()method 
protected function setViewPackages(value:*):void

Internal setter for viewPackages property.

Parameters

value:* — An Array of Strings or a single String that will be split on ","

Constant Detail
GLOBAL_DISPATCHERConstant
public static const GLOBAL_DISPATCHER:String = global

LOCAL_DISPATCHERConstant 
public static const LOCAL_DISPATCHER:String = local

WILDCARD_PACKAGEConstant 
protected static const WILDCARD_PACKAGE:RegExp

Regular expression to evaluate a 'wildcard' (ex. 'org.swizframework.) package description. Matches: package. Captures: package