Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.data 
RPCDataManager 
Packagemx.data
Classpublic class RPCDataManager
InheritanceRPCDataManager Inheritance DataManager Inheritance Object

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The RPCDataManager is a component you can use to manage objects which are retrieved using a service such as RemoteObject, WebService, and HTTPMultiService.

Default MXML Propertychildren



Public Properties
 PropertyDefined By
 Inheritedadapter : DataServiceAdapter = null
An instance of a class which controls interaction with the server.
DataManager
  associations : Array
Array of associations for this manager's destination.
RPCDataManager
 InheritedautoCommit : Boolean
Indicates if changes to the local cache are automatically committed.
DataManager
 InheritedautoConnect : Boolean
Indicates if this service should attempt to connect for any operations that require a connection.
DataManager
 InheritedautoMerge : Boolean
If set to false, when changes are pushed from the remote destination to the client they are not immediately applied.
DataManager
 InheritedautoSaveCache : Boolean
The local cache of data and changes can be stored to disk.
DataManager
  autoSyncEnabled : Boolean
[override] The RPCDataManager does not support the autoSync property.
RPCDataManager
 InheritedcacheID : String
Provides access to the cache identifier for this service.
DataManager
  children : Array
An array of associations and operations managed by this maanager.
RPCDataManager
 InheritedcommitRequired : Boolean
[read-only] Indicates if there are changes that have not been committed and the commit() method should be called.
DataManager
 InheritedconflictDetector : ConflictDetector
Provides access to the current implementation being used to detect conflicts for remote operations pushed to this DataService.
DataManager
 Inheritedconflicts : Conflicts
[read-only] Contains a Conflicts object, an ArrayList of Conflict instances.
DataManager
 Inheritedconnected : Boolean
[read-only] Indicates if the DataService is connected to the remote destination.
DataManager
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 InheriteddataStore : DataStore
Contains an object of type mx.data.DataStore.
DataManager
  deleteConflictMode : String = "none"
Set this to 'object' to enable conflict detection on deleteItem calls.
RPCDataManager
 InheriteddeleteItemOnRemoveFromFill : Boolean
By default when you call the removeItemAt() method on a managed filled collection, it issues a delete item call to the server to physically remove the item.
DataManager
  destination : String
The destination for the data service.
RPCDataManager
  extendsDestination : String
Name of destination that the destination for this manager extends.
RPCDataManager
 InheritedhierarchicalEventsDefault : Boolean
Associations optionally list for property change events on properties of the associated instances.
DataManager
  identities : String
For objects to be managed by a data manager, they must have one or more properties which uniquely identify the objects.
RPCDataManager
  identitiesArray : Array
[read-only] Provides access to a list of the property names that combine to create a unique id for objects within the associated destination.
RPCDataManager
 InheritedindexReferences : Boolean
To tune the speed of your application, set this property to false if you have a small number of fills or references to items managed by this data service from association properties of other items.
DataManager
 InheritedisInitialized : Boolean
[read-only] Indicates if the metadata associated with this service is initialized.
DataManager
  itemClass : Class
Specified the class of the objects managed by this data manager
RPCDataManager
  managedOperations : Array
The list of managed operations used for this data service.
RPCDataManager
 InheritedmanualSync : ManualSyncConfiguration
The manualSync property provides access to the ManualSyncConfiguration instance for each data service.
DataManager
 InheritedmaxFrequency : uint
Determines the maximum number of messages per second the DataManager wants to receive.
DataManager
 InheritedmergeRequired : Boolean
[read-only] Indicates if there are any pending changes that must be merged.
DataManager
  operationsByName : Object
Stores the name to ManagedOperation mapping for all ManagedOperation objects
RPCDataManager
 InheritedpageSize : int
Provides access to the current page size setting for all collections.
DataManager
  pagingEnabled : Boolean
[override] [read-only] The paging enabled setting is toggled at the query ManagedQuery level when the RPCDataManager is used
RPCDataManager
 Inheritedpriority : int
The default message priority for the messages sent by the data service.
DataManager
  propertyNames : String
When using anonymous types, you can specify the list of properties expected for an object.
RPCDataManager
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  queries : Object
Stores the name to ManagedQuery mapping for all ManagedQuery objects.
RPCDataManager
 InheritedrequestTimeout : int
Provides access to the request timeout in seconds for an operation.
DataManager
 InheritedresetCollectionOnFill : Boolean
When true, after the fill operation completes, a RESET event is sent.
DataManager
 InheritedresubscribeAttempts : int
Controls the number of times a disconnected data service will attempt to resubscribe.
DataManager
 InheritedresubscribeInterval : int
Controls the delay, in milliseconds, between resubscribe attempts.
DataManager
  rpcAdapter : RPCDataServiceAdapter
The RPCDataServiceAdapter defined for this data manager.
RPCDataManager
  service : AbstractService
Each RPCDataManager is based on a single AbstractService implementation defined in this property.
RPCDataManager
 Inheritedsubscribed : Boolean
[read-only] Indicates if the DataService is subscribed to the remote destination.
DataManager
 InheritedthrowItemPendingErrors : Boolean
Set this property to false if you want to suppress the throwing of item pending errors when lazily fetched or unpaged data is accessed.
DataManager
  typeProperty : String
Property name of items being managed by this manager that specifies their owning destination.
RPCDataManager
  updateConflictMode : String = "none"
Set this to 'object' or 'property' to enable conflict detection on updateItem calls.
RPCDataManager
Public Methods
 MethodDefined By
  
Constructs an instance of the DataService with the specified destination.
RPCDataManager
  
Adds a managed operation to the set managed by this manager.
RPCDataManager
 Inherited
Clears any data stored to disk with a previous call to saveCache() or when autoSaveCache was set to true
DataManager
 Inherited
Clears the data specified by the passed descriptor from the local store.
DataManager
 Inherited
commit(itemsOrCollections:Array = null, cascadeCommit:Boolean = false):mx.rpc:AsyncToken
Commits pending changes for all collections currently managed by the DataStore associated with this data service.
DataManager
 Inherited
Forces a connection attempt by this service to the remote destination.
DataManager
 Inherited
Calls a count method on the remote destination.
DataManager
 Inherited
Requests that the specified item be created in the remote store.
DataManager
 Inherited
Requests that the specified item be deleted from the remote store.
DataManager
 Inherited
Disconnects the DataService's network connection.
DataManager
 Inherited
executeQuery(queryName:String, propertySpecifier:PropertySpecifier, ... args):mx.rpc:AsyncToken
Executes a query with the provided name and arguments.
DataManager
 Inherited
Fills the specified ListCollectionView based on the associated fill method of the destination.
DataManager
 Inherited
fillSubset(value:ListCollectionView, ps:PropertySpecifier, ... args):mx.rpc:AsyncToken
Fills the specified ListCollectionView based on the associated fill method of the destination.
DataManager
 Inherited
findItem(queryName:String, propertySpecifier:PropertySpecifier, ... args):mx.rpc:AsyncToken
Executes a query which returns a single item.
DataManager
 Inherited
Returns an ArrayCollection or a single managed object (SMO) from the the local store.
DataManager
 Inherited
This method will fill the specified ListCollectionView with CacheDataDescriptor(s).
DataManager
 Inherited
This method will fill the specified ListCollectionView with all cache identifiers previously used in the application.
DataManager
 Inherited
getItem(identity:Object, defaultValue:Object = null):ItemReference
Makes an asynchronous request for an item matching the specified identity.
DataManager
 Inherited
Looks up the supplied item with the given identity.
DataManager
 Inherited
Returns page information for the specified collection.
DataManager
 Inherited
Returns the pending operation in the message cache for the specified item.
DataManager
 Inherited
Indicates whether an object has a specified property defined.
Object
  
[override] Forces initialization of the DataStore.
RPCDataManager
 Inherited
Returns true if the passed collection is managed by this service.
DataManager
 Inherited
Returns true if the passed collection is using paging features.
DataManager
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
isRangeResident(view:ListCollectionView, startIndex:int, numberOfItems:int):Boolean
Returns true if the supplied range of items is all paged in.
DataManager
 Inherited
Merges any pending updates into the managed set of objects.
DataManager
  
Performs pre-initialization configuration steps.
RPCDataManager
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Refreshes all data managed by this data service.
DataManager
 Inherited
Refreshes an array collection previously filled with the fill method or managed as a managed association.
DataManager
 Inherited
release(clear:Boolean = true, copyStillManagedItems:Boolean = true):void
Releases all managed collections and items for the DataService.
DataManager
 Inherited
releaseCollection(view:ListCollectionView, clear:Boolean = false, copyStillManagedItems:Boolean = true):void
Releases any item within the specified collection from management by this service.
DataManager
 Inherited
releaseItem(item:IManaged, copyStillManagedItems:Boolean = true, enableStillManagedCheck:Boolean = true):IManaged
Releases the specified item from management by this service.
DataManager
 Inherited
releaseItemsFromCollection(collection:ListCollectionView, startIndex:int, numberOfItems:int):int
Releases a range of items in the collection.
DataManager
 Inherited
Releases the value for a single-valued association.
DataManager
 Inherited
Reverts any uncommitted changes to the specified item.
DataManager
 Inherited
Reverts the changes for any item contained in the specified collection which should be managed by this data service.
DataManager
 Inherited
This method will save the current state of the DataService cache.
DataManager
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
updateItem(item:Object, origItem:Object = null, changes:Array = null):mx.rpc:AsyncToken
Triggers an update for the specified item.
DataManager
 Inherited
Returns the primitive value of the specified object.
Object
Protected Methods
 MethodDefined By
  
[override] Queues a fault if this data manager has not yet been initialized.
RPCDataManager
Events
 Event Summary Defined By
  The DataConflictEvent.CONFLICT event is dispatched when a conflict is detected between either pending local changes and changes submitted by another client, or when changes submitted by this client are conflicting with those in the remote destination.RPCDataManager
  The DataServiceFaultEvent.FAULT event is dispatched when a service call fails due to an error.RPCDataManager
 InheritedThe MessageEvent.MESSAGE event is dispatched when the remote destination pushes a notification of a data operation.DataManager
  The PropertyChangeEvent.PROPERTY_CHANGE event is dispatched when a property of this service changes.RPCDataManager
  The ResultEvent.RESULT event is dispatched when a service call successfully returns.RPCDataManager
Property Detail

associations

property
associations:Array

Array of associations for this manager's destination.



Implementation
    public function get associations():Array
    public function set associations(value:Array):void

autoSyncEnabled

property 
autoSyncEnabled:Boolean[override]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The RPCDataManager does not support the autoSync property.



Implementation
    override public function get autoSyncEnabled():Boolean
    override public function set autoSyncEnabled(value:Boolean):void

children

property 
children:Array

An array of associations and operations managed by this maanager.



Implementation
    public function get children():Array
    public function set children(value:Array):void

deleteConflictMode

property 
public var deleteConflictMode:String = "none"

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Set this to 'object' to enable conflict detection on deleteItem calls. For 'object' mode, any change made to the server version of the object which conflicts with the version of the object which we started with is considered a conflict.

destination

property 
destination:String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The destination for the data service.



Implementation
    public function get destination():String
    public function set destination(value:String):void

extendsDestination

property 
public var extendsDestination:String

Name of destination that the destination for this manager extends. Null if the managed destination does not extend any destination.

identities

property 
public var identities:String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

For objects to be managed by a data manager, they must have one or more properties which uniquely identify the objects. These properties can be set on the server during the create method, but should not be modified after that point.

identitiesArray

property 
identitiesArray:Array  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Provides access to a list of the property names that combine to create a unique id for objects within the associated destination.



Implementation
    public function get identitiesArray():Array

itemClass

property 
itemClass:Class

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Specified the class of the objects managed by this data manager



Implementation
    public function get itemClass():Class
    public function set itemClass(value:Class):void

managedOperations

property 
managedOperations:Array

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The list of managed operations used for this data service.



Implementation
    public function get managedOperations():Array
    public function set managedOperations(value:Array):void

operationsByName

property 
public var operationsByName:Object

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Stores the name to ManagedOperation mapping for all ManagedOperation objects

pagingEnabled

property 
pagingEnabled:Boolean  [read-only] [override]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The paging enabled setting is toggled at the query ManagedQuery level when the RPCDataManager is used



Implementation
    override public function get pagingEnabled():Boolean

propertyNames

property 
public var propertyNames:String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

When using anonymous types, you can specify the list of properties expected for an object. Any properties not fetched by a particular query are then fetched via the getItem call the first time they are accessed.

queries

property 
public var queries:Object

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Stores the name to ManagedQuery mapping for all ManagedQuery objects.

rpcAdapter

property 
public var rpcAdapter:RPCDataServiceAdapter

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The RPCDataServiceAdapter defined for this data manager. This is an optional property you can set to your own sub-class of RPCDataServiceAdapter if you want to customize the handling of one of the managed operations (e.g. update, delete, etc.) Note that the same RPCDataServiceAdapter instance cannot be used by more than DataManager.

service

property 
service:AbstractService

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Each RPCDataManager is based on a single AbstractService implementation defined in this property.



Implementation
    public function get service():AbstractService
    public function set service(value:AbstractService):void

typeProperty

property 
public var typeProperty:String

Property name of items being managed by this manager that specifies their owning destination.

updateConflictMode

property 
public var updateConflictMode:String = "none"

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Set this to 'object' or 'property' to enable conflict detection on updateItem calls. For 'object' mode, any change made to the server version of the object which conflicts with the version of the object which we started with is considered a conflict. With 'property' mode we only consider it a conflict if the property we are updating has changed since we started editing it and to a different value. In this mode you can delete an object

Constructor Detail

RPCDataManager

()Constructor
public function RPCDataManager()

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Constructs an instance of the DataService with the specified destination. The destination must be a reference to a destination configured in the services-config.xml file.

Method Detail

addManagedOperation

()method
public function addManagedOperation(mop:ManagedOperation):void

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Adds a managed operation to the set managed by this manager.

Parameters

mop:ManagedOperation — managed operation to be added.

checkImplementation

()method 
override protected function checkImplementation():void

Queues a fault if this data manager has not yet been initialized.

initialize

()method 
override public function initialize():mx.rpc:AsyncToken

Forces initialization of the DataStore.

Returns
mx.rpc:AsyncToken — AsyncToken reference to the token that will identify this operation in a result or fault event dispatched from this service.

preInitialize

()method 
public function preInitialize():void

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Performs pre-initialization configuration steps. Throws errors if any configuration problems are encountered.

Event Detail

conflict

Event
Event Object Type: mx.data.events.DataConflictEvent
property DataConflictEvent.type = mx.data.events.DataConflictEvent.CONFLICT

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The DataConflictEvent.CONFLICT event is dispatched when a conflict is detected between either pending local changes and changes submitted by another client, or when changes submitted by this client are conflicting with those in the remote destination. Each DataService sends conflict events only for items of this particular destination. Use the conflict event on the DataService if you need to handle conflicts for a set of related destinations at the same time.

The CONFLICT constant defines the value of the type property of the event object for a conflict event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
conflict The Conflict object that holds the conflict that occurred.
message The Message associated with this event.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.

fault

Event  
Event Object Type: mx.data.events.DataServiceFaultEvent
property DataServiceFaultEvent.type = mx.data.events.DataServiceFaultEvent.FAULT

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The DataServiceFaultEvent.FAULT event is dispatched when a service call fails due to an error. For example, a call to the fill() method dispatches this event if the call fails. You'll also get this event for each item which generates an error as part of a commit result. In this case, the DataServiceFaultEvent will contain the token returned by the commit, but the item and error message strings in the fault are specific to the item which caused the error.

The FAULT constant defines the value of the type property of the event object for a fault event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelabletrue, calling preventDefault() from the associated token's responder.fault method will prevent the service or operation from dispatching this event
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
fault The Fault object that holds the conflict that occurred.
item The item that generated the fault.
identity The identity of of the item that generated the fault.
message The Message associated with this event.
token The token that represents the call to the method. Used in the asynchronous completion token pattern.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.

propertyChange

Event  
Event Object Type: mx.events.PropertyChangeEvent
property PropertyChangeEvent.type = mx.events.PropertyChangeEvent.PROPERTY_CHANGE

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The PropertyChangeEvent.PROPERTY_CHANGE event is dispatched when a property of this service changes. This happens for the following properties:

  • commitRequired
  • mergeRequired

The PropertyChangeEvent.PROPERTY_CHANGE constant defines the value of the type property of the event object for a PropertyChange event.

The properties of the event object have the following values:

PropertyValue
bubblesDetermined by the constructor; defaults to false.
cancelableDetermined by the constructor; defaults to false.
kindThe kind of change; PropertyChangeEventKind.UPDATE or PropertyChangeEventKind.DELETE.
oldValueThe original property value.
newValueThe new property value, if any.
propertyThe property that changed.
sourceThe object that contains the property that changed.
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.

result

Event  
Event Object Type: mx.rpc.events.ResultEvent
property ResultEvent.type = mx.rpc.events.ResultEvent.RESULT

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

The ResultEvent.RESULT event is dispatched when a service call successfully returns. For example a call to fill() will dispatch this event if the call is successful.

The RESULT event type.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelabletrue, preventDefault() from the associated token's responder.result method will prevent the service or operation from dispatching this event
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
message The Message associated with this event.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
resultResult that the RPC call returns.
tokenThe token that represents the indiviudal call to the method. Used in the asynchronous completion token pattern.