| Package | org.granite.tide |
| Class | public dynamic class BaseContext |
| Inheritance | BaseContext mx.utils.ObjectProxy |
| Implements | IEntityManager |
| Subclasses | Context, Context, Context, Context, Context |
| Property | Defined by | ||
|---|---|---|---|
| meta_contextManager : IContextManager
[read-only]
| BaseContext | ||
| meta_destination : String [read-only]
Returns the RemoteObject destination for this context
| BaseContext | ||
| meta_dirty : Boolean [read-only]
Entity manager is dirty when any entity/collection/map has been modified
| BaseContext | ||
| meta_dirtyCheckEnabled : Boolean [write-only]
Enables or disabled dirty checking in this context
| BaseContext | ||
| meta_finished : Boolean [read-only]
Indicates if the current conversation has been marked as finished by the server
| BaseContext | ||
| meta_lazyInitializationDisabled : Boolean = false
Allows to disable automatic loading of lazy collections
| BaseContext | ||
| meta_parentContext : BaseContext
[read-only]
| BaseContext | ||
| meta_tide : Tide
[read-only]
Returns the Tide singleton for this context
| BaseContext | ||
| Method | Defined by | ||
|---|---|---|---|
| BaseContext | |||
|
addContextEventListener(type:String, handler:Function, remote:Boolean = false):void
Registers a tide context event listener (should be done with [Observer])
| BaseContext | ||
|
allByType(serviceClass:Class, create:Boolean = false):Array
Returns all component instances in this context implementing the specified class/interface
| BaseContext | ||
|
bindIn(componentName:String, component:Object, propName:Object, create:Boolean = true, contextPropName:Object = null):void
Binds a component property from a context variable (should be done with [In])
| BaseContext | ||
|
bindOut(componentName:String, component:Object, propName:Object, contextPropName:Object = null):void
Binds a component property to a context variable (should be done with [Out])
| BaseContext | ||
|
bindProperty(site:Object, prop:Object, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcher
[static]
| BaseContext | ||
|
byType(serviceClass:Class, create:Boolean = false):Object
Returns the current component instance implementation in this context for the specified class/interface
| BaseContext | ||
|
dispatchEvent(event:Event):Boolean
Dispatches a context event
| BaseContext | ||
|
injectByType(type:Class, component:Object, componentName:String, propName:Object, create:Boolean = true):void
Binds a component property from a context variable (should be done with [In])
| BaseContext | ||
|
meta_clearDirtyState(dispatch:Boolean = true):void
Clear the current dirty state context
| BaseContext | ||
|
meta_continue(merge:Boolean = true):void
Continues the current context: restart a new conversation with the same context content when the server has ended the current conversation
Only applicable to conversation contexts
| BaseContext | ||
|
meta_deepDirty(entity:IEntity):Boolean
| BaseContext | ||
|
meta_destroy(name:String, force:Boolean = false):void
Destroys/reset a component
| BaseContext | ||
|
meta_end(merge:Boolean = true):void
Ends the current context
Only applicable to conversation contexts
| BaseContext | ||
|
meta_getContext(name:*, component:Object):BaseContext
Returns the context where the component instance is stored
| BaseContext | ||
|
meta_getInstance(name:*, create:Boolean = false, forceNoCreate:Boolean = false, noProxy:Boolean = false):*
Returns the component instance in this context
| BaseContext | ||
|
meta_getInstanceNoProxy(name:*):*
Returns the component instance in this context but never creates proxies
| BaseContext | ||
|
meta_getOwnerEntities(object:Object):Array
| BaseContext | ||
|
meta_getRefs(object:Object):Array
| BaseContext | ||
|
meta_getSavedProperties():Dictionary
Return the current set of dirty properties
| BaseContext | ||
|
meta_isEntityChanged(entity:IEntity, propName:String = null, value:* = null):Boolean
Check if entity has changed since last save point
| BaseContext | ||
|
meta_isEntityPropertyChanged(entity:IEntity, propertyName:String, value:Object):Boolean
Check if entity property has been changed since last remote call
| BaseContext | ||
|
meta_isGlobal():Boolean
| BaseContext | ||
|
meta_isObjectInitialized(object:Object):Boolean
Indicates if an object is initialized
For non managed objects, always return true
| BaseContext | ||
|
meta_mergeExternalData(obj:Object, prev:Object = null, sourceSessionId:String = null, removals:Array = null, persists:Array = null):Object
Merge an object coming from the server in the context
| BaseContext | ||
|
meta_mergeInGlobalContext():void
Merge conversation context variables in global context
Only applicable to conversation contexts
| BaseContext | ||
|
meta_mergeInParentContext():void
Merge conversation context variables in parent context
Only applicable to conversation contexts
| BaseContext | ||
|
meta_objectEquals(obj1:Object, obj2:Object):Boolean
Equality for objects, using uid property when possible
| BaseContext | ||
|
meta_resetAllEntities():void
Discard changes of all cached entities from last version received from the server
| BaseContext | ||
|
meta_resetEntity(entity:IEntity):void
Discard changes of entity from last version received from the server
| BaseContext | ||
|
meta_resync(resultHandler:Function = null, faultHandler:Function = null):AsyncToken
Resync current context with server (similar to invoke with no operation)
| BaseContext | ||
| BaseContext | |||
|
raiseEvent(type:String, ... params):void
Dispatches a context event (possibly in a subcontext)
| BaseContext | ||
|
raiseGlobalEvent(type:String, ... params):void
Dispatches a context event (always in the global context)
| BaseContext | ||
|
toString(object:Object):String
[static]
Convenient toString implementation which avoids triggering collection initialization
| BaseContext | ||
|
unbindIns(componentName:String):void
Unbinds all [In] component properties
| BaseContext | ||
|
unbindOuts(componentName:String):void
Unbinds all [Out] component properties
| BaseContext | ||
| Method | Defined by | ||
|---|---|---|---|
|
meta_internalRaiseEvent(type:String, params:Array):void
| BaseContext | ||
| meta_contextManager | property |
meta_contextManager:IContextManager [read-only]
This property can be used as the source for data binding.
Implementation public function get meta_contextManager():IContextManager
| meta_destination | property |
meta_destination:String [read-only]Returns the RemoteObject destination for this context
This property can be used as the source for data binding.
Implementation public function get meta_destination():String
| meta_dirty | property |
meta_dirty:Boolean [read-only]Entity manager is dirty when any entity/collection/map has been modified
This property can be used as the source for data binding.
Implementation public function get meta_dirty():Boolean
| meta_dirtyCheckEnabled | property |
meta_dirtyCheckEnabled:Boolean [write-only]Enables or disabled dirty checking in this context
This property can be used as the source for data binding.
Implementation public function set meta_dirtyCheckEnabled(value:Boolean):void
| meta_finished | property |
meta_finished:Boolean [read-only]Indicates if the current conversation has been marked as finished by the server
This property can be used as the source for data binding.
Implementation public function get meta_finished():Boolean
| meta_lazyInitializationDisabled | property |
public var meta_lazyInitializationDisabled:Boolean = falseAllows to disable automatic loading of lazy collections
| meta_parentContext | property |
meta_parentContext:BaseContext [read-only]
This property can be used as the source for data binding.
Implementation public function get meta_parentContext():BaseContext
| meta_tide | property |
meta_tide:Tide [read-only]Returns the Tide singleton for this context
This property can be used as the source for data binding.
Implementation public function get meta_tide():Tide
| _tide | property |
protected var _tide:Tide
| BaseContext | () | constructor |
public function BaseContext(tide:Tide = null, parentContext:BaseContext = null)Parameters
tide:Tide (default = null) |
|
parentContext:BaseContext (default = null) |
| addContextEventListener | () | method |
public function addContextEventListener(type:String, handler:Function, remote:Boolean = false):voidRegisters a tide context event listener (should be done with [Observer])
Parameterstype:String — event type
|
|
handler:Function — function callback
|
|
remote:Boolean (default = false) — listener for remote events
|
| allByType | () | method |
public function allByType(serviceClass:Class, create:Boolean = false):ArrayReturns all component instances in this context implementing the specified class/interface
ParametersserviceClass:Class — class/interface to implement
|
|
create:Boolean (default = false) — create instance of component if not instantiated
|
Array — the current implementation in the context
|
| bindIn | () | method |
public function bindIn(componentName:String, component:Object, propName:Object, create:Boolean = true, contextPropName:Object = null):voidBinds a component property from a context variable (should be done with [In])
ParameterscomponentName:String — component name
|
|
component:Object — component instance
|
|
propName:Object — property name
|
|
create:Boolean (default = true) — no instance created when create = false
|
|
contextPropName:Object (default = null) — context variable name
|
| bindOut | () | method |
public function bindOut(componentName:String, component:Object, propName:Object, contextPropName:Object = null):voidBinds a component property to a context variable (should be done with [Out])
ParameterscomponentName:String — component name
|
|
component:Object — component instance
|
|
propName:Object — property name
|
|
contextPropName:Object (default = null) — context variable name
|
| bindProperty | () | method |
public static function bindProperty(site:Object, prop:Object, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcherParameters
site:Object |
|
prop:Object |
|
host:Object |
|
chain:Object |
|
commitOnly:Boolean (default = false) |
ChangeWatcher |
| byType | () | method |
public function byType(serviceClass:Class, create:Boolean = false):ObjectReturns the current component instance implementation in this context for the specified class/interface
ParametersserviceClass:Class — class/interface to implement
|
|
create:Boolean (default = false) — create instance of component if not instantiated
|
Object — the current implementation in the context
|
| dispatchEvent | () | method |
public override function dispatchEvent(event:Event):BooleanDispatches a context event
Parametersevent:Event — event type
|
Boolean |
| injectByType | () | method |
public function injectByType(type:Class, component:Object, componentName:String, propName:Object, create:Boolean = true):voidBinds a component property from a context variable (should be done with [In])
Parameterstype:Class — injection point class
|
|
component:Object — target component instance
|
|
componentName:String — target component name
|
|
propName:Object — property name
|
|
create:Boolean (default = true) — no instance created when create = false
|
| meta_clearDirtyState | () | method |
public function meta_clearDirtyState(dispatch:Boolean = true):voidClear the current dirty state context
Parametersdispatch:Boolean (default = true) — dispatch a PropertyChangeEvent on meta_dirty if the context was dirty before clearing
|
| meta_continue | () | method |
public function meta_continue(merge:Boolean = true):voidContinues the current context: restart a new conversation with the same context content when the server has ended the current conversation Only applicable to conversation contexts
Parametersmerge:Boolean (default = true) — merge conversation context in global context
|
| meta_deepDirty | () | method |
| meta_destroy | () | method |
public function meta_destroy(name:String, force:Boolean = false):voidDestroys/reset a component
Parametersname:String — component name
|
|
force:Boolean (default = false) — true for forcing complete removal of instance
|
| meta_end | () | method |
public function meta_end(merge:Boolean = true):voidEnds the current context Only applicable to conversation contexts
Parametersmerge:Boolean (default = true) — merge conversation context in global context
|
| meta_getContext | () | method |
public function meta_getContext(name:*, component:Object):BaseContextReturns the context where the component instance is stored
Parametersname:* — component name
|
|
component:Object — component instance
|
BaseContext —
context
|
| meta_getInstance | () | method |
public function meta_getInstance(name:*, create:Boolean = false, forceNoCreate:Boolean = false, noProxy:Boolean = false):*Returns the component instance in this context
Parametersname:* — name of the component/context variable
|
|
create:Boolean (default = false) — instantiate if not present
|
|
forceNoCreate:Boolean (default = false) — never instantiate a new component in any case
|
|
noProxy:Boolean (default = false) — don't create remote proxy if not found
|
* |
| meta_getInstanceNoProxy | () | method |
public function meta_getInstanceNoProxy(name:*):*Returns the component instance in this context but never creates proxies
Parametersname:* — name of the component/context variable
|
* |
| meta_getOwnerEntities | () | method |
public function meta_getOwnerEntities(object:Object):ArrayParameters
object:Object |
Array |
| meta_getRefs | () | method |
public function meta_getRefs(object:Object):ArrayParameters
object:Object |
Array |
| meta_getSavedProperties | () | method |
public function meta_getSavedProperties():DictionaryReturn the current set of dirty properties
ReturnsDictionary — map of saved properties
|
| meta_internalRaiseEvent | () | method |
protected function meta_internalRaiseEvent(type:String, params:Array):voidParameters
type:String |
|
params:Array |
| meta_isEntityChanged | () | method |
public function meta_isEntityChanged(entity:IEntity, propName:String = null, value:* = null):BooleanCheck if entity has changed since last save point
Parametersentity:IEntity — entity to restore
|
|
propName:String (default = null) — property name
|
|
value:* (default = null) |
Boolean — entity is dirty
|
| meta_isEntityPropertyChanged | () | method |
public function meta_isEntityPropertyChanged(entity:IEntity, propertyName:String, value:Object):BooleanCheck if entity property has been changed since last remote call
Parametersentity:IEntity — entity to check
|
|
propertyName:String — property to check
|
|
value:Object — current value to compare with saved value
|
Boolean — true is value has been changed
|
| meta_isGlobal | () | method |
public function meta_isGlobal():BooleanReturns
Boolean — true if this is the global context
|
| meta_isObjectInitialized | () | method |
public function meta_isObjectInitialized(object:Object):BooleanIndicates if an object is initialized For non managed objects, always return true
Parametersobject:Object |
Boolean — true when initialized
|
| meta_mergeExternalData | () | method |
public function meta_mergeExternalData(obj:Object, prev:Object = null, sourceSessionId:String = null, removals:Array = null, persists:Array = null):ObjectMerge an object coming from the server in the context
Parametersobj:Object — external object
|
|
prev:Object (default = null) — existing object on which incoming data has to be merged
|
|
sourceSessionId:String (default = null) — sessionId of the incoming data (null when from current session)
|
|
removals:Array (default = null) |
|
persists:Array (default = null) |
Object — merged object (should === prev when prev not null)
|
| meta_mergeInGlobalContext | () | method |
public function meta_mergeInGlobalContext():voidMerge conversation context variables in global context Only applicable to conversation contexts
| meta_mergeInParentContext | () | method |
public function meta_mergeInParentContext():voidMerge conversation context variables in parent context Only applicable to conversation contexts
| meta_objectEquals | () | method |
public function meta_objectEquals(obj1:Object, obj2:Object):BooleanEquality for objects, using uid property when possible
Parametersobj1:Object — object
|
|
obj2:Object — object
|
Boolean — true when objects are instances of the same entity
|
| meta_resetAllEntities | () | method |
public function meta_resetAllEntities():voidDiscard changes of all cached entities from last version received from the server
| meta_resetEntity | () | method |
public function meta_resetEntity(entity:IEntity):voidDiscard changes of entity from last version received from the server
Parametersentity:IEntity — entity to restore
|
| meta_resync | () | method |
public function meta_resync(resultHandler:Function = null, faultHandler:Function = null):AsyncTokenResync current context with server (similar to invoke with no operation)
ParametersresultHandler:Function (default = null) — result handler
|
|
faultHandler:Function (default = null) — fault handler
|
AsyncToken — the operation token
|
| newTemporaryContext | () | method |
| raiseEvent | () | method |
public function raiseEvent(type:String, ... params):voidDispatches a context event (possibly in a subcontext)
Parameterstype:String — event type
|
|
... params — optional event parameters
|
| raiseGlobalEvent | () | method |
public function raiseGlobalEvent(type:String, ... params):voidDispatches a context event (always in the global context)
Parameterstype:String — event type
|
|
... params — optional event parameters
|
| toString | () | method |
public static function toString(object:Object):StringConvenient toString implementation which avoids triggering collection initialization
Parametersobject:Object — object to describe
|
String — toString
|
| unbindIns | () | method |
public function unbindIns(componentName:String):voidUnbinds all [In] component properties
ParameterscomponentName:String — component name
|
| unbindOuts | () | method |
public function unbindOuts(componentName:String):voidUnbinds all [Out] component properties
ParameterscomponentName:String — component name
|