Package | org.swizframework.core |
Class | public class SwizConfig |
Inheritance | SwizConfig ![]() |
Implements | ISwizConfig |
Property | Defined 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 |
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
Constructor
| SwizConfig |
Method | Defined 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 |
Constant | Defined By | ||
---|---|---|---|
GLOBAL_DISPATCHER : String = global [static] | SwizConfig | ||
LOCAL_DISPATCHER : String = local [static] | SwizConfig |
Constant | Defined By | ||
---|---|---|---|
WILDCARD_PACKAGE : RegExp [static]
Regular expression to evaluate a 'wildcard' (ex. | SwizConfig |
_defaultDispatcher | property |
protected var _defaultDispatcher:String = global
Backing variable for the defaultDispatcher
property.
_defaultFaultHandler | property |
protected var _defaultFaultHandler:Function
Backing variable for the defaultFaultHandler
property.
_eventPackages | property |
protected var _eventPackages:Array
Backing variable for the eventPackages
property.
_setUpEventPhase | property |
protected var _setUpEventPhase:uint = 1.0
Backing variable for the setUpEventPhase
property.
_setUpEventPriority | property |
protected var _setUpEventPriority:int = 50
Backing variable for the setUpEventPriority
property.
_setUpEventType | property |
protected var _setUpEventType:String = addedToStage
Backing variable for the setUpEvent
property.
_strict | property |
protected var _strict:Boolean = true
Backing variable for the strict
property.
_tearDownEventPhase | property |
protected var _tearDownEventPhase:uint = 1.0
Backing variable for the tearDownEventPhase
property.
_tearDownEventPriority | property |
protected var _tearDownEventPriority:int = 50
Backing variable for the tearDownEventPriority
property.
_tearDownEventType | property |
protected var _tearDownEventType:String = removedFromStage
Backing variable for the tearDownEvent
property.
_viewPackages | property |
protected var _viewPackages:Array
Backing variable for the viewPackages
property.
defaultDispatcher | property |
defaultDispatcher:String
Default Dispatcher to use for all Mediators and Dispatcher injections. Can be overriden with dispatcher property on those metadata tags.
public function get defaultDispatcher():String
public function set defaultDispatcher(value:String):void
defaultFaultHandler | property |
defaultFaultHandler:Function
Default Fault Handler
public function get defaultFaultHandler():Function
public function set defaultFaultHandler(value:Function):void
eventPackages | property |
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.
public function get eventPackages():Array
public function set eventPackages(value:Array):void
setUpEventPhase | property |
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
.
public function get setUpEventPhase():uint
public function set setUpEventPhase(value:uint):void
setUpEventPriority | property |
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.
public function get setUpEventPriority():int
public function set setUpEventPriority(value:int):void
setUpEventType | property |
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.
public function get setUpEventType():String
public function set setUpEventType(value:String):void
strict | property |
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
.
public function get strict():Boolean
public function set strict(value:Boolean):void
tearDownEventPhase | property |
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
.
public function get tearDownEventPhase():uint
public function set tearDownEventPhase(value:uint):void
tearDownEventPriority | property |
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.
public function get tearDownEventPriority():int
public function set tearDownEventPriority(value:int):void
tearDownEventType | property |
tearDownEventType:String
Swiz will listen for this event and tear down views in response.
Default value is removedFromStage
.
public function get tearDownEventType():String
public function set tearDownEventType(value:String):void
viewPackages | property |
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.
public function get viewPackages():Array
public function set viewPackages(value:Array):void
SwizConfig | () | Constructor |
public function SwizConfig()
Constructor
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.
|
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.
|
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 ","
|
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 ","
|
GLOBAL_DISPATCHER | Constant |
public static const GLOBAL_DISPATCHER:String = global
LOCAL_DISPATCHER | Constant |
public static const LOCAL_DISPATCHER:String = local
WILDCARD_PACKAGE | Constant |
protected static const WILDCARD_PACKAGE:RegExp
Regular expression to evaluate a 'wildcard' (ex. 'org.swizframework.) package description. Matches: package. Captures: package