Pacote | mx.data |
Classe | public class DataManager |
Herança | DataManager Object |
Implementações | IEventDispatcher |
Subclasses | DataService, RPCDataManager |
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The DataManager class is an abstract class. Typically you construct a DataService instance that extends the DataManager, or you construct one or more RPCDataManager instances in conjunction with an RPC service component such as an HTTPMultiService, WebService or RemoteObject instance.
To get Single Managed Objects the DataManager.getItem()
and
DataManager.createItem()
methods are used.
When a previously filled ArrayCollection is no longer needed
or the items within that collection should no longer receive or create
updates, call the DataManager.releaseCollection()
method.
When an item previously retrieved using DataManager.getItem()
or DataManager.createItem()
is no longer needed or should not
receive or create updates, call the DataManager.releaseItem()
method
The DataManager.createItem()
and
DataManager.getItem()
methods return an
ItemReference instance that you can use to release a specific instance of a single managed
object.
Unlike the DataManager.releaseItem()
method, calling the
ItemReference.releaseItem()
method releases a specific instance of
a single managed object.
The DataManager.releaseItem()
method releases the first single managed object that it
finds with an identity that matches a specified identity.
This is fine as long as the number of calls to the
DataManager.getItem()
and DataManager.createItem()
methods matches the number of calls to the DataManager.releaseItem()
method.
A connection to the remote destination is created automatically the first
time you call any methods that require a connection.
For example, when you call the DataManager.fill()
method or
the DataManager.commit()
method when there are uncommitted
updates, the DataManager instance attempts to establish a connection to the remote destination.
To force a DataManager instance to disconnect, call the
DataManager.disconnect()
method.
You can use the DataManager.disconnect()
method to clean up remote destination resources
that are no longer needed.
Because other services may be using the same physical connection, calling the
DataManager.disconnect()
method may terminate the connection.
The bindable property connected
indicates the current state
of the associated DataManager connection.
Each DataManager instance has a dataStore
property that
returns an object of type mx.data.DataStore
.
This object stores the uncommitted changes for one or more
DataManager instances.
By default, a DataManager instance shares the same
DataStore instance with other DataManager instances if they have managed
association properties and share the same set of channels.
When sharing a DataStore instance, a call to the commit()
method
on one DataManager instance commits changes for all
DataManager instances using the shared DataStore instance.
This preserves the order of operations in the event that there are dependencies
between the changes in the associated DataManager instances.
DataManager and DataStore dispatch result and fault events for all operations that require a remote call. NOTE: if you create two DataManager instances that point to the same destination both of those instances will share the same collection of managed objects, and will dispatch the same set of events. For example, if you add an event listener to one DataManager instance for a destination, and you use a different instance to initiate an operation, the first DataManager instance will still receive those events. Each operation you initiate on a DataManager returns an AsyncToken. You can add an event responder to that token to receive a result event specific for that operation. This approach often produces cleaner code than adding a result or fault event handler globally for a given destination.
You can use data binding on properties of any managed object for a
DataManager instance.
A DataManager instance also dispatches a "message" event when a remote
operation occurs for any managed object.
For example, when a remote process updates a locally managed item, a
message is pushed to all DataManager instances that are
still managing that item.
This message is dispatched as a MessageEvent.MESSAGE
event.
A conflict event is dispatched when a conflict is detected either at the remote destination in response to
a change the DataManager instance commits or due to a pushed
change that conflicts with a local uncommitted change.
You can handle conflict events by listening for
DataConflictEvent.CONFLICT
.
Use data binding to update user interface controls by binding to the
DataManager.conflicts.resolved
property.
The DataManager class supports the following data synchronization configuration modes:
-
autoCommit
- when true each change is immediately sent to the remote destination when detected. When this isfalse
, you must make an explicit call to thecommit()
method. Use the bindableDataManager.commitRequired
property determine if there are uncommitted changes. -
autoSyncEnabled
- This affects anyfill()
,getItem()
orcreateItem()
method calls and determines whether managed instances listen for changes made to these objects by other clients or by the DataServiceTransaction server push API at the remote destination. -
autoMerge
- Controls whether changes received from a remote destination are applied immediately or queued up until a call to theDataManager.merge()
method is made.
Use the DataManager.revertChanges()
method to revert
changes for a specific item or for all items.
When an error occurs for a remote destination operation, the committed
changes are put back into the uncommitted queue so the data stays in sync
with the data at the remote destination.
If the changes are in error, you typically make a call to the
DataManager.revertChanges()
method to undo the changes as part
of a fault handler.
Elementos da API relacionados
mx.data.RPCDataManager
mx.data.Conflicts
mx.data.Conflict
mx.data.ItemReference
mx.data.IManaged
mx.data.utils.Managed
mx.data.IChangeObject
Propriedade | Definido por | ||
---|---|---|---|
adapter : DataServiceAdapter = null
An instance of a class that controls interaction with the server. | DataManager | ||
autoCommit : Boolean
Indicates whether changes to the local cache are automatically committed. | DataManager | ||
autoConnect : Boolean
Indicates if this service should attempt to connect for any operations
that require a connection. | DataManager | ||
autoMerge : Boolean
If set to false, when changes are pushed from the remote
destination to the client they are not immediately applied. | DataManager | ||
autoSaveCache : Boolean
You can store the local cache of data and changes to disk. | DataManager | ||
autoSyncEnabled : Boolean
When true, fill(), createItem() and
getItem() requests return items that listen for updates
made to these items from the remote destination. | DataManager | ||
cacheID : String
Provides access to the cache identifier for this service. | DataManager | ||
commitRequired : Boolean [somente leitura]
Indicates if there are changes that have not been committed and
the commit() method should be called. | DataManager | ||
conflictDetector : ConflictDetector
Provides access to the current implementation being used to
detect conflicts for remote operations pushed to this
DataManager instance. | DataManager | ||
conflicts : Conflicts [somente leitura]
Contains a Conflicts object, which is an ArrayList of
Conflict instances. | DataManager | ||
connected : Boolean [somente leitura]
Indicates if the DataService is connected to the remote destination. | DataManager | ||
constructor : Object
Uma referência ao objeto de classe ou à função de construtor de uma determinada ocorrência de objeto. | Object | ||
dataStore : DataStore
Contains an object of type mx.data.DataStore. | DataManager | ||
deleteItemOnRemoveFromFill : 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 | ||
encryptLocalCache : Boolean
Indicates if offline storage should be encrypted For AIR
clients that use a SQL offline adapter. | DataManager | ||
fallBackToLocalFill : Boolean
This flag determines whether the application should query against the
local store when it is not connected. | DataManager | ||
hierarchicalEventsDefault : Boolean
Associations optionally list property change events on properties of
the associated instances. | DataManager | ||
ignoreCollectionUpdates : Boolean
Indicates if changes to managed collections should be ignored instead of
being communicated to the server on a commit. | DataManager | ||
indexReferences : 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
DataManager from association properties of other items. | DataManager | ||
isInitialized : Boolean [somente leitura]
Indicates whether the metadata associated with this DataManager instance
is initialized. | DataManager | ||
manualSync : ManualSyncConfiguration
Provides access to the ManualSyncConfiguration
instance for each DataManager instance. | DataManager | ||
maxFrequency : uint
Determines the maximum number of messages per second the DataManager instance
can receive. | DataManager | ||
mergeRequired : Boolean [somente leitura]
Indicates whether there are any pending changes that must be
merged. | DataManager | ||
offlineAdapter : DataServiceOfflineAdapter
Returns an object of type mx.data.DataServiceOfflineAdapter. | DataManager | ||
pageSize : int
Provides access to the current page size setting for all collections. | DataManager | ||
pagingEnabled : Boolean [somente leitura]
Indicates whether the remote destination is configured to allow paged
requests. | DataManager | ||
priority : int
The default message priority for the messages the DataManager instance sends. | DataManager | ||
requestTimeout : int
Provides access to the request timeout in seconds for an operation. | DataManager | ||
resetCollectionOnFill : Boolean
When the property is true, after the fill operation completes, a RESET event is
sent. | DataManager | ||
resubscribeAttempts : int
Controls the number of times a disconnected DataManager instance attempts to
resubscribe to its destination. | DataManager | ||
resubscribeInterval : int
Controls the delay, in milliseconds, between resubscribe attempts. | DataManager | ||
saveCacheRequired : Boolean [somente leitura]
Indicates if there are changes that have not been saved to the
local cache and the saveCache() method should be called. | DataManager | ||
subscribed : Boolean [somente leitura]
Indicates if the DataManager instance is subscribed to the remote destination. | DataManager | ||
throwItemPendingErrors : Boolean
Set this property to false if you want to suppress item pending
errors when lazily fetched or unpaged data is accessed. | DataManager |
Método | Definido por | ||
---|---|---|---|
Constructs an instance of the DataService with the specified
destination. | DataManager | ||
Clears any data stored to disk with a previous call to the
saveCache() method or when the autoSaveCache method was set to
true
| DataManager | ||
Clears the data specified by the passed descriptor from the local store. | DataManager | ||
Commits pending changes for all collections currently managed by
the DataStore instance associated with this DataManager instance. | DataManager | ||
Indicates if there are pending changes for this particular object. | DataManager | ||
Forces a connection attempt by this service to the remote destination. | DataManager | ||
Calls a count method on the remote destination. | DataManager | ||
Requests that the specified item be created in the remote store. | DataManager | ||
Requests that the specified item be deleted from the remote store. | DataManager | ||
Disconnects the DataManager instance's network connection. | DataManager | ||
Executes a query with the provided name and arguments. | DataManager | ||
Fills the specified ListCollectionView (collection) instance based
on the associated fill method of the destination. | DataManager | ||
Fills the specified ListCollectionView (collection) instance based
on the associated fill method of the destination. | DataManager | ||
Executes a query that returns a single item. | DataManager | ||
Returns an ArrayCollection or a single managed object from the
the local store. | DataManager | ||
getCacheDescriptors(view:ListCollectionView, options:uint = 0, item:Object = null):mx.rpc:AsyncToken
Fills the specified ListCollectionView (collection) instance with
CacheDataDescriptor instances. | DataManager | ||
Fills the specified ListCollectionView (collection) instance
with all cache identifiers previously used in the application. | DataManager | ||
Makes an asynchronous request for an item matching the
specified identity. | DataManager | ||
Looks up the supplied item with the given identity. | DataManager | ||
Returns page information for the specified collection. | DataManager | ||
Returns the pending operation in the message cache for the specified
item. | DataManager | ||
Indica se um objeto tem uma propriedade especificada definida. | Object | ||
Forces initialization of the DataStore. | DataManager | ||
Returns true if the passed collection is managed by this service. | DataManager | ||
Returns true if the passed collection is using paging features. | DataManager | ||
Indica se uma ocorrência da classe Object está na cadeia de protótipos do objeto especificado como o parâmetro. | Object | ||
Returns true if the supplied range of items is all paged in. | DataManager | ||
Fills the specified ListCollectionView based
on the associated <fill-method> elements based on the data from the
local store. | DataManager | ||
Merges any pending updates into the managed set of objects. | DataManager | ||
Indica se a propriedade especificada existe e é enumerável. | Object | ||
Refreshes all data managed by this DataManager instance. | DataManager | ||
Refreshes a collection previously filled with the fill method or managed as
a managed association. | DataManager | ||
Releases all managed collections and items for the DataManager instance. | DataManager | ||
releaseCollection(view:ListCollectionView, clear:Boolean = false, copyStillManagedItems:Boolean = true):void
Releases any item within the specified collection from management by
this DataManager instance. | DataManager | ||
releaseItem(item:IManaged, copyStillManagedItems:Boolean = true, enableStillManagedCheck:Boolean = true):IManaged
Releases the specified item from management by this DataManager instance. | DataManager | ||
Releases a range of items in the collection. | DataManager | ||
Releases the value for a single-valued association. | DataManager | ||
Reverts any uncommitted changes to the specified item. | DataManager | ||
Reverts the changes for any item contained in the specified collection which should
be managed by this DataManager instance. | DataManager | ||
This method saves the current state of the DataManager instance's cache. | DataManager | ||
Indicates if there are pending changes for this particular object
that are not saved to the local cache. | DataManager | ||
Define a disponibilidade de uma propriedade dinâmica para operações de repetição. | Object | ||
Obtains the changed items for all previously executed fills on this data service
(data manager). | DataManager | ||
[estático]
A convenience method to allow the synchronization of all local data: a
synchronizeAllFills() is invoked on each data service (data manager) specified such
that the final result token is completed only when all the individual
synchronizeAllFills() calls are completed. | DataManager | ||
Obtains the changed items that have changed on the server since the
previous time a fill or synchronizeFill was invoked. | DataManager | ||
Retorna a representação da string deste objeto, formatado segundo as convenções específicas para a localidade. | Object | ||
Retorna a representação de string do objeto especificado. | Object | ||
Triggers an update for the specified item. | DataManager | ||
Retorna o valor primitivo do objeto especificado. | Object |
Método | Definido por | ||
---|---|---|---|
Queues a fault if this data manager has not yet been initialized. | DataManager |
Evento | Resumo | Definido por | ||
---|---|---|---|---|
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. | DataManager | |||
The DataManagerFaultEvent.FAULT event is dispatched when a service call fails due to an error. | DataManager | |||
The 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. | DataManager | |||
The ResultEvent.RESULT event is dispatched when a service call successfully returns. | DataManager |
adapter | propriedade |
public var adapter:DataServiceAdapter = null
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
An instance of a class that controls interaction with the server.
autoCommit | propriedade |
autoCommit:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates whether changes to the local cache are automatically committed. Committed changes are sent to the remote service immediately.
The default value is true for DataService instances, which are data managers used with the server-side Data Management Service.
The default value is false for RPCDataManager instances, which are data managers that provide client-side data management functionality to RPC service components such as RemoteObject, HTTPMultiService, and WebService.
Implementação
public function get autoCommit():Boolean
public function set autoCommit(value:Boolean):void
autoConnect | propriedade |
autoConnect:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates if this service should attempt to connect for any operations
that require a connection.
Operations like fill()
, getItem()
,
and count()
attempt to connect
if the service is disconnected and autoConnect
is set
to true
.
Use this property to control occasionally connected application behavior.
O valor padrão é true.
Implementação
public function get autoConnect():Boolean
public function set autoConnect(value:Boolean):void
autoMerge | propriedade |
autoMerge:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
If set to false
, when changes are pushed from the remote
destination to the client they are not immediately applied.
Instead, the mergeRequired
property is set to true.
An event handler can be registered to listen for change events on this property to be notified of when a merge needs to be applied.
To merge changes, call the merge()
method and all
changes are applied.
Uncommited changes can not be committed when there are any changes that need to be merged.
If paging is enabled all requests for non-local items are cached
until merge()
is called.
Once merge()
is called, the cached requests are
processed.
O valor padrão é true.
Implementação
public function get autoMerge():Boolean
public function set autoMerge(value:Boolean):void
autoSaveCache | propriedade |
autoSaveCache:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
You can store the local cache of data and changes to disk.
When the autoSaveCache
property is true
, each time a change
is made or a remote request is returned, that data is saved to disk.
If there is a problem saving the data either because the disk is full
or write permissions have been denied, a FaultEvent
is
dispatched or a Fault
is thrown.
Setting this value to false
(the default) does not save any
data or changes to disk.
To force the current data and changes to be saved to disk, use the
saveCache()
method.
O valor padrão é false.
Implementação
public function get autoSaveCache():Boolean
public function set autoSaveCache(value:Boolean):void
Elementos da API relacionados
autoSyncEnabled | propriedade |
autoSyncEnabled:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
When true
, fill()
, createItem()
and
getItem()
requests return items that listen for updates
made to these items from the remote destination.
When a change is made to this property value, it only affects future
calls to these methods, not existing collections or items.
Also note that for a mix of collections retrieved with
autoSyncEnabled
and collections filled without
autoSyncEnabled
, any items appearing in both collections
still receive update events.
O valor padrão é true.
Implementação
public function get autoSyncEnabled():Boolean
public function set autoSyncEnabled(value:Boolean):void
cacheID | propriedade |
cacheID:String
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Provides access to the cache identifier for this service.
A cache identifier must be set prior to performing any operations that
require interaction with data stored locally on disk.
If a cache identifier is not set, all cache methods and properties are
considered inconsistent and a DataServiceError
is
thrown during any operation that requires data from the local disk.
This property provides a unique "session" identifier for data stored
locally.
A developer must set this property to a unique value for the
application.
A value of null
or an empty string is considered unset.
Requests for data by methods like fill()
and
getItem()
attempt to access the local data on disk
first if the cacheID
has been set.
If the cacheID
is not set, no attempt to access any
local data will be made.
Implementação
public function get cacheID():String
public function set cacheID(value:String):void
commitRequired | propriedade |
commitRequired:Boolean
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates if there are changes that have not been committed and
the commit()
method should be called.
When this property changes, an event is dispatched.
This property can be used within an application to provide visual
feedback.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get commitRequired():Boolean
conflictDetector | propriedade |
conflictDetector:ConflictDetector
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Provides access to the current implementation being used to detect conflicts for remote operations pushed to this DataManager instance.
Implementação
public function get conflictDetector():ConflictDetector
public function set conflictDetector(value:ConflictDetector):void
conflicts | propriedade |
conflicts:Conflicts
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Contains a Conflicts object, which is an ArrayList of Conflict instances.
Conflicts must be resolved before you call the commit()
method.
Conflicts can be resolved by going through the conflicts, resolving each
conflict individually or by calling the acceptAllClient()
method or acceptAllServer()
method on this property.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get conflicts():Conflicts
connected | propriedade |
connected:Boolean
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates if the DataService is connected to the remote destination.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get connected():Boolean
dataStore | propriedade |
dataStore:DataStore
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Contains an object of type mx.data.DataStore. The DataStore instance manages the set of incoming and outgoing changes for one or more DataManager instances, which may have references between them. When you commit on a DataStore, all of the pending changes of each DataManager using that DataStore are committed.
By default, a DataManager instance shares the same DataStore with other DataManager instances if they have managed association properties and share the same set of channels. If you are sharing DataStores, a commit call on one DataManager commits changes for all DataManagers using that data store. This preserves the order of operations in case there are dependencies between the changes in your uncommitted batches.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get dataStore():DataStore
public function set dataStore(value:DataStore):void
deleteItemOnRemoveFromFill | propriedade |
deleteItemOnRemoveFromFill:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
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.
This lets you use code that uses a managed collection and an unmanaged collection in the same
way. However, at other times, you might want to remove the item from the collection on
the client without deleting it from the server.
In that case, set this flag to false
before you call
the removeItemAt()
method.
Note that this does not affect collections that are associations. It only affects collections
that were used with the fill()
method.
O valor padrão é true.
Implementação
public function get deleteItemOnRemoveFromFill():Boolean
public function set deleteItemOnRemoveFromFill(value:Boolean):void
encryptLocalCache | propriedade |
encryptLocalCache:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
Versões de runtime: | Flash Player 9, AIR 1.5 |
Indicates if offline storage should be encrypted For AIR clients that use a SQL offline adapter.
For browser-based Flex clients, offline data cannot be encrypted.
Implementação
public function get encryptLocalCache():Boolean
public function set encryptLocalCache(value:Boolean):void
fallBackToLocalFill | propriedade |
fallBackToLocalFill:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
This flag determines whether the application should query against the
local store when it is not connected. By default when the offline adapter is
configured to support dynamic query execution, invoking fill()
will not query
the local store when the application is not connected. If fallBackToLocalFill is
set to true, then the local store queried as well when the application
is disconnected.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get fallBackToLocalFill():Boolean
public function set fallBackToLocalFill(value:Boolean):void
hierarchicalEventsDefault | propriedade |
hierarchicalEventsDefault:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Associations optionally list property change events on properties of
the associated instances. You can set this on the association with the
hierarchical-events
configuration attribute. If you do not set the hierarchical-events
attribute, the associations for a particular destination use this property
to determine the default.
The default value is false
.
For objects in a tree (rather than a cyclic graph),
you may want to set this to true
for a destination as a convenience. If you use properties of your properties
in an item renderer for instance, setting this to true
for that association
property causes the grid to refresh when these properties of properties change.
The system is smart enough to avoid sending recursive events or
creating large chains of events, such as parent.child[0].child[1].child[3].
O valor padrão é false.
Implementação
public function get hierarchicalEventsDefault():Boolean
public function set hierarchicalEventsDefault(value:Boolean):void
ignoreCollectionUpdates | propriedade |
ignoreCollectionUpdates:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
Versões de runtime: | Flash Player 9, AIR 1.5 |
Indicates if changes to managed collections should be ignored instead of being communicated to the server on a commit.
O valor padrão é false.
Implementação
public function get ignoreCollectionUpdates():Boolean
public function set ignoreCollectionUpdates(value:Boolean):void
indexReferences | propriedade |
indexReferences:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
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
DataManager from association properties of other items.
Implementação
public function get indexReferences():Boolean
public function set indexReferences(value:Boolean):void
isInitialized | propriedade |
isInitialized:Boolean
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates whether the metadata associated with this DataManager instance is initialized.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get isInitialized():Boolean
manualSync | propriedade |
manualSync:ManualSyncConfiguration
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Provides access to the ManualSyncConfiguration instance for each DataManager instance. The ManualSyncConfiguration class lets you subscribe to changes made by other clients or on the server and it lets you control how your changes are published to other clients that subscribe using this interface.
Implementação
public function get manualSync():ManualSyncConfiguration
public function set manualSync(value:ManualSyncConfiguration):void
maxFrequency | propriedade |
maxFrequency:uint
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Determines the maximum number of messages per second the DataManager instance can receive. A server that understands this value uses it as an input while it determines how fast to send messages to the DataManager.
The default value is 0, which means DataManager does not have a preference for the message rate. Note that this property should be set before the DataManager subscribes and any changes after subscription do not have an effect until the DataManager unsubscribes and resubscribes.
O valor padrão é 0.
Implementação
public function get maxFrequency():uint
public function set maxFrequency(value:uint):void
mergeRequired | propriedade |
mergeRequired:Boolean
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates whether there are any pending changes that must be merged.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get mergeRequired():Boolean
offlineAdapter | propriedade |
offlineAdapter:DataServiceOfflineAdapter
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns an object of type mx.data.DataServiceOfflineAdapter. The Offline Adapter controls the implementation of how objects are persisted to the local store(SQLLite/LSO).
Implementação
public function get offlineAdapter():DataServiceOfflineAdapter
public function set offlineAdapter(value:DataServiceOfflineAdapter):void
pageSize | propriedade |
pageSize:int
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Provides access to the current page size setting for all collections.
Implementação
public function get pageSize():int
public function set pageSize(value:int):void
pagingEnabled | propriedade |
pagingEnabled:Boolean
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates whether the remote destination is configured to allow paged requests.
Implementação
public function get pagingEnabled():Boolean
priority | propriedade |
priority:int
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The default message priority for the messages the DataManager instance sends. The valid values are 0 to 9 (0 being lowest) and -1 means that the DataManager instance does not have a priority set. Note that if the message already has a priority defined, that takes precedence over this priority.
Implementação
public function get priority():int
public function set priority(value:int):void
requestTimeout | propriedade |
requestTimeout:int
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Provides access to the request timeout in seconds for an operation.
A value less than or equal to zero prevents request timeout.
When a current operation times out due to the requestTimeout
limit being reached a fault will be dispatched for that operation, indicating that
the request was timed out. Note that when an operation times out, it is
possible the server did in fact receive that operation. This can leave your
client state out of sync with the server.
Implementação
public function get requestTimeout():int
public function set requestTimeout(value:int):void
resetCollectionOnFill | propriedade |
resetCollectionOnFill:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
When the property is true
, after the fill operation completes, a RESET event is
sent.
When this property is false
, just incremental ADD/REMOVE
events are sent for each item returned from the fill result. Setting this
property affects any fills you initiate. Changing it after a fill has
started does not affect the behavior of the outstanding fill.
O valor padrão é true.
Implementação
public function get resetCollectionOnFill():Boolean
public function set resetCollectionOnFill(value:Boolean):void
resubscribeAttempts | propriedade |
resubscribeAttempts:int
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Controls the number of times a disconnected DataManager instance attempts to resubscribe to its destination. The default -1 means to continually resubscribe until the client is able to reconnect.
O valor padrão é -1.
Implementação
public function get resubscribeAttempts():int
public function set resubscribeAttempts(value:int):void
resubscribeInterval | propriedade |
resubscribeInterval:int
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Controls the delay, in milliseconds, between resubscribe attempts. The default is 5000, meaning attempt to resubscribe once every 5 seconds.
O valor padrão é 5000.
Implementação
public function get resubscribeInterval():int
public function set resubscribeInterval(value:int):void
saveCacheRequired | propriedade |
saveCacheRequired:Boolean
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 4.5 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates if there are changes that have not been saved to the
local cache and the saveCache()
method should be called.
This method can return false when commitRequired would return true,
indicating that chages are saved to the local cache, but not
committed to the server.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get saveCacheRequired():Boolean
subscribed | propriedade |
subscribed:Boolean
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates if the DataManager instance is subscribed to the remote destination.
Essa propriedade pode ser usada como a origem para o vínculo de dados. Quando essa propriedade é modificada, ela despacha o evento propertyChange
.
Implementação
public function get subscribed():Boolean
throwItemPendingErrors | propriedade |
throwItemPendingErrors:Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Set this property to false
if you want to suppress item pending
errors when lazily fetched or unpaged data is accessed.
Instead of throwing the error, null is returned for a property value or a getItemAt()
call in an ArrayCollection.
The size()
method returns 0 elements for a list for which the size has
not yet been fetched from the server. When the element is returned from the
server, the appropriate PropertyChangeEvent and CollectionEvent events are dispatched.
Implementação
public function get throwItemPendingErrors():Boolean
public function set throwItemPendingErrors(value:Boolean):void
DataManager | () | Construtor |
public function DataManager()
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | 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.
checkImplementation | () | método |
protected function checkImplementation():void
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Queues a fault if this data manager has not yet been initialized.
clearCache | () | método |
public function clearCache(value:Object = null):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Clears any data stored to disk with a previous call to the
saveCache()
method or when the autoSaveCache
method was set to
true
Parâmetros
value:Object (default = null ) — Object reference to either a managed single object or
ArrayCollection.
|
mx.rpc:AsyncToken — AsyncToken that you can use to respond to the success or
failure of the operation.
|
clearCacheData | () | método |
public function clearCacheData(descriptor:CacheDataDescriptor):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Clears the data specified by the passed descriptor from the local store.
Parâmetros
descriptor:CacheDataDescriptor — Reference to the descriptor for
the data that should be removed from the local cache.
|
mx.rpc:AsyncToken — Reference to the token that can be used to determine
when the result or fault has occurred for this operation.
|
commit | () | método |
public function commit(itemsOrCollections:Array = null, cascadeCommit:Boolean = false):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Commits pending changes for all collections currently managed by
the DataStore instance associated with this DataManager instance. Calling this method
is equivalent to calling the dataStore.commit()
method.
When the autoCommit
property is true
, transactions
are not used and you do not need to call this method.
To use transactions, set the autoCommit
property to
false
and call this method directly to commit a batch of changes.
You typically just call commit()
with no arguments to commit all pending
changes. You can supply optional arguments to commit a subset of the pending
changes. You must resolve all outstanding conflicts before you can commit changes to
any item in the DataStore.
If the assembler is configured to have use-transactions set to true
, all
changes are committed atomically. If any operation fails, none of the operations
in the batch are applied. If use-transactions is set to false
, the operations are
committed individually until a failure occurs at which point processing
stops. Any changes that occur before the error are applied, any changes which
occur after the error are not applied. When an error occurs when processing
a batch, the changes are put back into the uncommitted queue. You need to call
revertChanges if you want to remove the changes which caused the error.
By default, the commit method will commit all pending changes for all items which have been created, modified, and deleted for this DataStore. If you want to commit a subset of these changes, you can specify a combination of managed ArrayCollection instances and/or managed items which define the subset of changes you want included in the batch. For each array collection you specify, any changes made either to the membership or order of items in that array collection or any changes to items in that array collection are committed. You can also specify a list of individual managed items so that only changes for those items are committed. If you specify any objects in the itemsOrCollections parameter which are not managed collections or items, a DataServiceError is thrown.
If you are using the itemsOrCollections parameter and your items have association properties which refer to other items, you can use the cascadeCommit parameter to control whether or not changes made to associated items are also included in batch. For example, if you specify a Group item in the items parameter, and the Group instance has a members property which refers to a list of Person instances when cascadeCommit is true changes to any Person instance will also be included in the set of changes committed. If cascadeCommit is false, only changes to the Group would be included. Use cascadeCommit=true to ensure that any dependent changes are included in the batch.
Parâmetros
itemsOrCollections:Array (default = null ) — This is an optional parameter which defaults to null when
you want to commit all pending changes. If you want to commit a subset of the pending
changes use this argument to specify a list of managed ListCollectionView instances
and/or managed items. ListCollectionView objects are most typically ArrayCollections
you have provided to your fill method. The items appropriate for this method are
any managed version of the item. These are any items you retrieve from getItem, createItem
or using the getItemAt method from a managed collection. Only changes for the
items defined by any of the values in this array will be committed.
| |
cascadeCommit:Boolean (default = false ) — If true , also commit changes made to any associated
items supplied in this list.
|
mx.rpc:AsyncToken — AsyncToken that is returned in call property of
either the ResultEvent.RESULT or in the
FaultEvent.FAULT .
Custom data can be attached to this object and inspected later
during the event handling phase. If no changes have been made
to the relevant items, null is returned instead of an AsyncToken.
|
Lança
Error — if initialization is in progress. This may
occur when a runtime destination is referenced and commit is called before
this service has been initialized, or if the cacheID has been set and
the local cache has not been loaded. In each situation waiting for the
result or fault on a token returned from a call to initialize or from
a previous operation, before calling commit will avoid the error.
|
commitRequiredOn | () | método |
public function commitRequiredOn(object:Object):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates if there are pending changes for this particular object. Allows for granular enablement on the UI. (see commitRequired for bindable property for notification).
Parâmetros
object:Object — The object that might have changes.
|
Boolean — true if the object has pending changes.
|
connect | () | método |
public function connect():mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Forces a connection attempt by this service to the remote destination.
This method may be used in conjunction with the autoConnect
property and disconnect()
method to control connection
status.
mx.rpc:AsyncToken — AsyncToken reference to the token that will identify this
operation in a result or fault event dispatched from this service.
When calling connect() the token's result handler will
always be called and the result will be the current value of this
service's connected property.
|
count | () | método |
public function count(... args):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Calls a count method on the remote destination.
The count method called is based on the associated <count-method>
tags and the parameters passed.
For example, if the following
count("firstName", "Bob")
call was made and
<count-method> tags exist or are referenced in the
services-config.xml under the associated destination:
<count-method> <name>getCount</name> <params>java.lang.String,java.lang.String</params> <security-run-as name="freddie" password="nightmare" /> </count-method> <count-method> <name>getCount</name> <security-constraint ref="sample-users" /> </count-method>
Parâmetros
... args — List of arguments that should be passed to the remote
destination.
|
mx.rpc:AsyncToken — Object returned in the call property of
the ResultEvent.RESULT or in the
FaultEvent.FAULT .
Custom data can be attached to this object and inspected later
during the event handling phase.
|
Elementos da API relacionados
createItem | () | método |
public function createItem(item:Object):ItemReference
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Requests that the specified item be created in the remote store. If an error occurs a DataConflictEvent event is dispatched.
Parâmetros
item:Object — Object that should be created in the remote store.
|
ItemReference — ItemReference (which extends AsyncToken). This reference is
returned in the token property of either the
ResultEvent.RESULT or in the FaultEvent.FAULT .
Custom data can be attached to this object and inspected later during
the event handling phase.
The result property of this object is bindable and can be
used to bind the item returned. This result object is set to null if
the item is removed from another client. If you hold on to ItemReference
objects in your application, you should call the
releaseItem() method in the ItemReference instance when
you are finished with this reference to the item.
If you do not hold onto the ItemReference instance, you can use the
releaseItem() method on the DataManager instance, which takes the
instance of the item itself to release.
When createItem() fails, it returns a fault. However, the
item is still pending. You must call release() to remove it.
|
deleteItem | () | método |
public function deleteItem(item:Object):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Requests that the specified item be deleted from the remote store. If an error occurs a DataConflictEvent event is dispatched.
Parâmetros
item:Object — Object that should be deleted in the remote store.
|
mx.rpc:AsyncToken — AsyncToken that will be returned in the token
property of either the ResultEvent.RESULT or in the
FaultEvent.FAULT .
Custom data can be attached to this object and inspected later during
the event handling phase.
|
disconnect | () | método |
public function disconnect():void
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Disconnects the DataManager instance's network connection. This method does not wait for outstanding network operations to complete.
executeQuery | () | método |
public function executeQuery(queryName:String, propertySpecifier:PropertySpecifier, ... args):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Executes a query with the provided name and arguments. You typically use this method with an RPCDataManager instance where queries have a specific name. You can also use this method with queries defined using the more general fill method approach as long as the first parameter to the fill method is a string value. The queryName is used as the first fill parameter.
Note that when you are finished with the objects returned by this method, you should call
releaseCollection()
method for collection results or releaseItem for single valued
item results. Alternatively, you can release all managed references retrieved from this
DataManager instance by calling the release()
method.
Call the refreshCollection()
method to refresh the contents of any collections returned by this
method.
Parâmetros
queryName:String — Name of the operation to invoke.
| |
propertySpecifier:PropertySpecifier — Set of properties to be retrieved.
| |
... args — List of arguments to the query.
|
mx.rpc:AsyncToken — AsyncToken bind to the result property of the AsyncToken to retrieve the
result. Otherwise, you can listen for the result property change event, add one or more
responders to the token and add additional information as dynamic properties of the
token to keep track of the results of the operation.
|
fill | () | método |
public function fill(value:ListCollectionView, ... args):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Fills the specified ListCollectionView (collection) instance based
on the associated fill method of the destination.
For example, for a LiveCycle Data Services destination that uses a Hibernate assembler,
the first parameter of the fill()
method is the collection to fill,
the second parameter is the Hibernate query to execute, and any other parameters
are Hibernate query parameters. The same format applies to the fill()
methods used in
service-wrapper classes for model-driven development.
The following example shows a fill()
method for a destination that
uses a Hibernate assembler. The assembler has
a query named getByDescription
that takes a query parameter named description
:
ProductService.fill(ac, "getByDescription", description);
For a LiveCycle Data Services destination that uses the fill-method approach in which you declare fill methods in XML elements in the destination configuration, if the following <fill-method> elements are in the destination configuration:
<fill-method> <name>loadPersons</name> <params>java.lang.String,java.lang.String</params> </fill-method> <fill-method> <name>loadPersons</name> <security-constraint ref="sample-users" /> </fill-method>Then calling
fill(myCollection, "firstName", "Bob")
invokes the first <fill-method>
since it contains two parameters, matching the <params> tag types
and count.
Likewise, calling fill(myCollection)
invokes the second
<fill-method> tag because it contains no <params> tag.
Any pending changes to items in this collection are removed. Note
that any data in the collection is cleared when you call fill. You
can call fill using a previously filled collection as well. In that case,
if the fill parameters are the same, the collection is cleared and the fill
method on the server is called again. If the fill parameters are different
the old collection is released and the new collection is filled.
Parâmetros
value:ListCollectionView — Reference to the collection that should
be filled with the specified arguments.
| |
... args — Variable list of arguments that should be passed
to the remote destination.
|
mx.rpc:AsyncToken — AsyncToken You can use this token to register one or more callback
functions to receive result or fault events from this fill operation.
This token is also returned in the call property of
the ResultEvent.RESULT or in the
FaultEvent.FAULT .
Custom data can be attached to this object and inspected later
during the event handling phase.
|
fillSubset | () | método |
public function fillSubset(value:ListCollectionView, ps:PropertySpecifier, ... args):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Fills the specified ListCollectionView (collection) instance based
on the associated fill method of the destination. Only a subset of the properties
are populated on each object, as specified in the propertySpecifier
parameter.
Parâmetros
value:ListCollectionView — Reference to the collection that should
be filled with the specified arguments.
| |
ps:PropertySpecifier — A PropertySpecifier object to be passed to the server's fill implementation,
specifying what subset of properties should be populated on each item.
| |
... args — Variable list of arguments that should be passed
to the remote destination.
|
mx.rpc:AsyncToken — AsyncToken You can use this token to register one or more callback
functions to receive result or fault events from this fill operation.
This token is also returned in the call property of
the ResultEvent.RESULT or in the
FaultEvent.FAULT .
Custom data can be attached to this object and inspected later
during the event handling phase.
|
findItem | () | método |
public function findItem(queryName:String, propertySpecifier:PropertySpecifier, ... args):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Executes a query that returns a single item.
Parâmetros
queryName:String — Name of the operation to invoke.
| |
propertySpecifier:PropertySpecifier — Set of properties to retrieve.
| |
... args — List of arguments to the query.
|
mx.rpc:AsyncToken — AsyncToken bind to the result property of the AsyncToken to retrieve the
result. Otherwise, you can listen for the result property change event, add one or more
responders to the token and add additional information as dynamic properties of the
token to keep track of the results of the operation.
|
getCacheData | () | método |
public function getCacheData(descriptor:CacheDataDescriptor):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns an ArrayCollection or a single managed object from the the local store. Calling this method does not update the last accessed time.
Parâmetros
descriptor:CacheDataDescriptor — CacheDataDescriptor for the desired cache data.
|
mx.rpc:AsyncToken — AsyncToken reference to the token that can be used to determine
when the result or fault has occurred for this operation.
The result property of the AsyncToken or on the associated event will
contain a new instance of an unmanaged ArrayCollection or ItemReference
for each call.
|
getCacheDescriptors | () | método |
public function getCacheDescriptors(view:ListCollectionView, options:uint = 0, item:Object = null):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Fills the specified ListCollectionView (collection) instance with CacheDataDescriptor instances. If no argument is specified, all associated CacheDataDescriptor instances for cached data under this service are returned.
Parâmetros
view:ListCollectionView — ListCollectionView reference to a collection that can be
filled with the desired descriptors.
| |
options:uint (default = 0 ) — Must be one of the following constants:
| |
item:Object (default = null ) — Object reference to a specific ItemReference ,
managed item, or ListCollectionView , when specified this
parameter overrides the options argument.
|
mx.rpc:AsyncToken — AsyncToken reference to the token that will identify this
operation in a result or fault event dispatched from this service.
|
getCacheIDs | () | método |
public function getCacheIDs(view:ListCollectionView):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Fills the specified ListCollectionView (collection) instance with all cache identifiers previously used in the application.
Parâmetros
view:ListCollectionView — ListcollectionView reference to a collection that should be
filled with all cache identifiers previously used in the application.
|
mx.rpc:AsyncToken — AsyncToken reference to the token that will identify this
operation in a result or fault event dispatched from this service.
|
getItem | () | método |
public function getItem(identity:Object, defaultValue:Object = null):ItemReference
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Makes an asynchronous request for an item matching the
specified identity. If you provide a defaultValue
, and the
item does not exist, the item is created instead using the information
in the defaultValue
.
This method returns an ItemReference instance.
If you receive a valid instance from the getItem()
method
call, you must call the releaseItem()
method to release an
instance of the item.
If you hang onto the ItemReference instance, you should call the
releaseItem()
method on the reference to be sure you
release the proper reference in case your client has made more than one
getItem()
method call for the same item.
If you do not hold onto the ItemReference instance, you can call the
releaseItem()
method on the DataManager with the item
itself.
Parâmetros
identity:Object — An Object that contains the identity properties for the desired object.
| |
defaultValue:Object (default = null ) — An instance of the type with the
default values that should be created if it doesn't exist.
|
ItemReference — ItemReference instance for the item you want to get. The ItemReference instance extends
AsyncToken so you can use it to receive notification of when the
item has been retrieved or when this call produces a fault.
The ItemReference instance is returned as the token property in
either the ResultEvent.RESULT or in the
FaultEvent.FAULT if you are listening for events on
the DataManager instance.
Custom data can be attached to this object and inspected later
during the event handling phase. You also can use data binding
to bind to the result property of the ItemReference instance.
This property is set to a valid value when the item is populated
from the remote destination and is bindable so you can simply
bind your user interface controls to the properties of the
ItemReference's result property.
If the item is removed from the server or another client, this
reference is set to null.
The ItemReference also has an invalid property
which is set to true if the are errors returning
the item or if the server returns null for an item.
|
getLocalItem | () | método |
public function getLocalItem(identity:Object):Object
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Looks up the supplied item with the given identity. If the item is already
managed on this client, the managed instance is returned. If not, null is
returned. Unlike the call to the getItem
method, this call does not make a request to the
server and does not add an additional reference to the item.
Parâmetros
identity:Object — An Object that contains the identity properties for the desired object.
|
Object — Object The managed object or null if the item with this id is not yet managed
on this client.
|
getPageInformation | () | método |
public function getPageInformation(view:ListCollectionView):PageInformation
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns page information for the specified collection.
Parâmetros
view:ListCollectionView — Collection of interest.
|
PageInformation — Page information for the specified collection.
|
getPendingOperation | () | método |
public function getPendingOperation(item:Object):uint
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns the pending operation in the message cache for the specified item. Use this method to provide visual feedback to a user of what type of change, if any, has been made to an item.
Parâmetros
item:Object — IManaged object that should be tested against.
|
uint — uint that indicates what pending operation has been performed.
The following are valid operations for an item:
|
initialize | () | método |
public function initialize():mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Forces initialization of the DataStore.
Retornamx.rpc:AsyncToken — AsyncToken reference to the token that will identify this
operation in a result or fault event dispatched from this service.
|
isCollectionManaged | () | método |
public function isCollectionManaged(view:ListCollectionView):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns true if the passed collection is managed by this service.
If the collection is managed by this service it is safe to pass the
collection to releaseCollection()
to release it from
management.
Parâmetros
view:ListCollectionView — The ListCollectionView reference to test whether it is
managed by this service.
|
Boolean — True if the collection is managed by this service; otherwise false.
|
isCollectionPaged | () | método |
public function isCollectionPaged(view:ListCollectionView):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns true if the passed collection is using paging features.
If the collection is paged by this service it is safe to pass the
collection to releaseItemsFromCollection()
to release individual
items in the collection from management.
Parâmetros
view:ListCollectionView — The ListCollectionView reference to test whether it is
managed by this service.
|
Boolean — True if the collection is using paging otherwise false.
|
isRangeResident | () | método |
public function isRangeResident(view:ListCollectionView, startIndex:int, numberOfItems:int):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns true if the supplied range of items is all paged in. Otherwise returns false.
Parâmetros
view:ListCollectionView — A ListCollectionView managed by this data service.
| |
startIndex:int — The starting index in the ListCollectionView.
| |
numberOfItems:int — The number of items in the ListCollectionView.
|
Boolean — true if the collection is all resident,
false if any of the items in the supplied
range are not resident.
|
localFill | () | método |
public function localFill(value:ListCollectionView, ps:PropertySpecifier, ... args):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Fills the specified ListCollectionView based on the associated <fill-method> elements based on the data from the local store. It will invoke the offlineAdapter.executeOfflineQuery() API to query the data and will not attempt to query the remote destination even if the application is connected. This is ideally used where the data is synced to the client and local queries are executed against that.
Parâmetros
value:ListCollectionView — Reference to the collection that should
be filled with the specified arguments.
| |
ps:PropertySpecifier — A PropertySpecifier object to be passed to the offline adapter,
specifying what subset of properties should be populated on each item.
| |
... args — args:Array variable list of arguments that should be passed
to the offline adapter.
|
mx.rpc:AsyncToken — AsyncToken You can use this token to register one or more callback
functions to receive result or fault events from this local fill operation.
This token is also returned in the call property of
the ResultEvent.RESULT or in the
FaultEvent.FAULT .
|
merge | () | método |
public function merge():void
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Merges any pending updates into the managed set of objects. The process of merging changes detect conflicts and process any pending item requests. This merges all messages for any other DataManager instances that share this DataStore instance.
refresh | () | método |
public function refresh():mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Refreshes all data managed by this DataManager instance. Fills, get item requests, and page
requests are made to the server to re-fetch all of the managed items.
Call the DataStore.refresh()
method to also refresh all associated items for lazy = true
associations.
mx.rpc:AsyncToken — AsyncToken You can use this token to register one or more callback
functions for the result or fault events of the refresh operation.
|
refreshCollection | () | método |
public function refreshCollection(value:ListCollectionView):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Refreshes a collection previously filled with the fill method or managed as a managed association. This method makes a request to the server, fetches the new version of any resident items in the collection using the fill parameters original used with this collection or by fetching the property from the parent item. If any changes are found, they merged into the collection in an incremental fashion.
Parâmetros
value:ListCollectionView — ListCollectionView managed by this DataManager instance.
|
mx.rpc:AsyncToken — AsyncToken You can use this token to register one or more callback
functions to receive result or fault events from this refresh operation.
Null is returned if there is nothing to refresh for a paged collection.
This token is also returned in the call property of
the ResultEvent.RESULT or in the
FaultEvent.FAULT .
Custom data can be attached to this object and inspected later
during the event handling phase.
|
release | () | método |
public function release(clear:Boolean = true, copyStillManagedItems:Boolean = true):void
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Releases all managed collections and items for the DataManager instance.
Parâmetros
clear:Boolean (default = true ) — Boolean indicating if the all items should be removed from
the list. In addition no copies will be made of any item.
| |
copyStillManagedItems:Boolean (default = true ) — If after releasing this data service references from managed
associations from another data services might hold references to some of these managed
objects. In that case, some managed collections in this data service might still be actively managed.
If you pass true for this flag, these references are either removed (clear=true) or cloned (clear=flase).
If you pass in false for this flag, those active references are left alone. Using false is the fastest
way to clear the state of the system. Using true ensures you don't have any managed
state in references to collections or items you retrieved from this data service.
|
Elementos da API relacionados
releaseCollection | () | método |
public function releaseCollection(view:ListCollectionView, clear:Boolean = false, copyStillManagedItems:Boolean = true):void
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Releases any item within the specified collection from management by this DataManager instance. If the item exists in more than one collection, a copy of the item is made. Any uncommitted changes made to an item that exists only in this collection are released, including deletes, creates and updates.
Parâmetros
view:ListCollectionView — ListCollectionView reference that should no longer receive
remote updates.
| |
clear:Boolean (default = false ) — Indicates if the all items should be removed from
the list. In addition no copies will be made of any item.
| |
copyStillManagedItems:Boolean (default = true ) — Indicates if there are other managed references to items in this collection, this
parameter controls whether copies of those items are made so that after this call you are guaranteed that
there are no longer any managed items in the collection. Specifying both clear and this option as false
will result in the fastest way to release managed references.
|
releaseItem | () | método |
public function releaseItem(item:IManaged, copyStillManagedItems:Boolean = true, enableStillManagedCheck:Boolean = true):IManaged
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Releases the specified item from management by this DataManager instance. If you hold
onto an ItemReference instance, call the releaseItem()
method
on the ItemReference instance to be sure you release the proper reference
when you might have made more than one getItem()
call that retrieves
the same item from different parts of your client application.
This call releases any associated resources, including nested properties.
The specified item no longer receives updates from the remote
destination.
In addition, if there are any uncommited changes to this item and it does
not appear in any other collection these changes will also be released.
If the specified item exists in more than one collection then the
value handed back will be a copy of the original unless the allowCopy
parameter is set to false
.
Parâmetros
item:IManaged — IManaged reference to the item to be released.
| |
copyStillManagedItems:Boolean (default = true ) — Boolean indicating whether to make copies of the items that are still
managed in the graph of objects. Passing a value of false clears the reference to these items.
| |
enableStillManagedCheck:Boolean (default = true ) — Pass a value of false for this parameter to disable
either the copy or the clear of still managed items. In that case, your returned value
is always the original managed value you released and if another reference is still
using that item, it continues to be managed even after the release.
|
IManaged — The released item which will be a copy if copyStillManagedItems is false and the
item is managed by another reference.
|
releaseItemsFromCollection | () | método |
public function releaseItemsFromCollection(collection:ListCollectionView, startIndex:int, numberOfItems:int):int
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Releases a range of items in the collection. When paging through a large collection
you may want to free up resources occupied by items in the collection and stop
subscribing for updates for those items. You specify the startIndex
of the first item
you want to release and the number of items to release. If an item at that position
is not yet paged that index is skipped.
Parâmetros
collection:ListCollectionView — Managed ListCollectionView.
| |
startIndex:int — Index of the first item to release.
| |
numberOfItems:int — Number of items to release starting at position.
numberOfItems should be greater than 0 and startIndex + numberOfItems should be less
than collection.length.
|
int — The number of references released.
|
releaseReference | () | método |
public function releaseReference(item:Object, propName:String):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Releases the value for a single-valued association. If the value is not paged in false is returned. If the value is paged in, that reference is released and true is returned. If this was the last reference to the specific item, the next attempt to access that item will cause the ItemPendingError and the value to be fetched again.
Parâmetros
item:Object — Parent item containing a property which is a single valued association.
| |
propName:String — Name of the property referring to a single valued association.
|
Boolean — true if the value was released.
|
revertChanges | () | método |
public function revertChanges(item:IManaged = null):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Reverts any uncommitted changes to the specified item.
Or if no item is supplied, it reverts all uncommitted changes.
If you revert a create operation, it removes the item. If you
revert a delete, it adds the item back in. Reverting an update
restores the original properties of the item that were in place before
you started changing it. Calling this method is equivalent to calling
the dataStore.revertChanges()
method.
One situation in which you would use this method is after a fault has occurred. In that case, any failed changes are put back into the uncommitted changes list. At that point you can either modify those changes to fix the problem or revert them using this method to keep those changes from being resubmitted again.
If an item is supplied and this item doesn't have any changes this method returns false. If no item is supplied and there are no changes this method returns false. Otherwise, it returns true.
Parâmetros
item:IManaged (default = null ) — reference to revert changes for or null to
revert all changes.
|
Boolean — Boolean indicating if any changes were reverted.
|
revertChangesForCollection | () | método |
public function revertChangesForCollection(collection:ListCollectionView = null):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Reverts the changes for any item contained in the specified collection which should be managed by this DataManager instance.
Parâmetros
collection:ListCollectionView (default = null ) — The collection to revert.
|
Boolean — Boolean true if any changes were reverted.
|
saveCache | () | método |
public function saveCache(value:Object = null):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
This method saves the current state of the DataManager instance's cache. The cache includes in-memory items and changes made to those items that have not been sent to the remote destination.
Parâmetros
value:Object (default = null ) — Object reference to either a managed ListCollectionView instance or an
object.
|
mx.rpc:AsyncToken — AsyncToken that can be used for notification of when the
operation successfully completes or fails.
|
Elementos da API relacionados
Exemplo ( Como usar este exemplo )
var customerService:DataService = new DataService("customers"); var customers:ArrayCollection = new ArrayCollection(); customerService.fill(customers); // ... var customer:Customer = Customer(customers[0]); customer.priority = "top"; customerService.saveCache(); // now all of the changes and items in the customers collection // will be persisted locally
saveCacheRequiredOn | () | método |
public function saveCacheRequiredOn(object:Object):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 4.5 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Indicates if there are pending changes for this particular object that are not saved to the local cache. This method can return false when comitRequiredOn would return true, indicating that the change is saved to the local cache, but not committed to the server.
Parâmetros
object:Object — The object that might have changes.
|
Boolean — true if the object has pending changes.
|
synchronizeAllFills | () | método |
public function synchronizeAllFills():mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 4.5 |
Versões de runtime: | Flash Player 10.1, AIR 2.0 |
Obtains the changed items for all previously executed fills on this data service (data manager).
Retornamx.rpc:AsyncToken — AsyncToken You can use this token to register one or more callback
functions to receive result or fault events from this operation.
|
synchronizeDataServices | () | método |
public static function synchronizeDataServices(services:Array):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 4.5 |
Versões de runtime: | Flash Player 10.1, AIR 2.0 |
A convenience method to allow the synchronization of all local data: a synchronizeAllFills() is invoked on each data service (data manager) specified such that the final result token is completed only when all the individual synchronizeAllFills() calls are completed.
Parâmetros
services:Array — An array of data services to synchronize.
|
mx.rpc:AsyncToken — AsyncToken You can use this token to register one or more callback
functions to receive result or fault events from this operation.
|
synchronizeFill | () | método |
public function synchronizeFill(... fillArgs):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 4.5 |
Versões de runtime: | Flash Player 10.1, AIR 2.0 |
Obtains the changed items that have changed on the server since the previous time a fill or synchronizeFill was invoked. These include created items, updated items, and deleted items. If no previous fill occurred, this is equivalent to performing a fill for the first time.
Parâmetros
... fillArgs — fillArgs The parameters of the fill.
|
mx.rpc:AsyncToken — AsyncToken You can use this token to register one or more callback
functions to receive result or fault events from this fill operation.
A ChangedItems instance is used as the result object in the ResultEvent
passed to the result handler, describing the changed items that were returned.
|
updateItem | () | método |
public function updateItem(item:Object, origItem:Object = null, changes:Array = null):mx.rpc:AsyncToken
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Triggers an update for the specified item. If you call this with the managed instance
it commits any changes you have made to that item and returns a token you can use to
track those changes. If there are no pending changes for that item, a null token is
returned. If you call this with another copy of the instance, it copies any changed
properties in the changes array into the managed instance logging any changes and then
commits those changes. If the autoCommit
is set to true
, the changes for this item are committed
immediately. If it is set to false
, the changes are queued until the commit()
method is called.
Parâmetros
item:Object — item to be updated.
| |
origItem:Object (default = null ) — version of the item before changes were made. This version is used for
conflict detection. May be null.
| |
changes:Array (default = null ) — array of property names that have been updated. Used for performance
improvement. May be null.
|
mx.rpc:AsyncToken — an AsyncToken you can use to track the changes (for example, a fault or result event is
delivered when changes to this item are committed). If there are no changes to an item
a null AsyncToken is returned and nothing is queued.
|
conflict | Evento |
mx.data.events.DataConflictEvent
propriedade DataConflictEvent.type =
mx.data.events.DataConflictEvent.CONFLICT
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | 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.
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:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The 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. |
target | The 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 | Evento |
mx.data.events.DataServiceFaultEvent
propriedade DataServiceFaultEvent.type =
mx.data.events.DataServiceFaultEvent.FAULT
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The DataManagerFaultEvent.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.
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:
Property | Value |
---|---|
bubbles | false |
cancelable | true, calling preventDefault() from the associated token's responder.fault method will prevent the service or operation from dispatching this event |
currentTarget | The 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. |
target | The 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. |
message | Evento |
mx.messaging.events.MessageEvent
propriedade MessageEvent.type =
mx.messaging.events.MessageEvent.MESSAGE
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The MessageEvent.MESSAGE
event is dispatched when the remote
destination pushes a notification of a data operation.
For example, when data is updated in the remote destination an update
operation is sent to all clients listening, this operation is converted to
a message event on this DataService.
The value of this constant is "message"
.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The 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. |
target | The 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 | Evento |
mx.events.PropertyChangeEvent
propriedade PropertyChangeEvent.type =
mx.events.PropertyChangeEvent.PROPERTY_CHANGE
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | 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
connected
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:
Property | Value |
---|---|
bubbles | Determined by the constructor; defaults to false. |
cancelable | Determined by the constructor; defaults to false. |
kind | The kind of change; PropertyChangeEventKind.UPDATE or PropertyChangeEventKind.DELETE. |
oldValue | The original property value. |
newValue | The new property value, if any. |
property | The property that changed. |
source | The object that contains the property that changed. |
currentTarget | The 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 . |
target | The 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 | Evento |
mx.rpc.events.ResultEvent
propriedade ResultEvent.type =
mx.rpc.events.ResultEvent.RESULT
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | 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 properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | true, preventDefault() from the associated token's responder.result method will prevent the service or operation from dispatching this event |
currentTarget | The 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. |
target | The 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 | Result that the RPC call returns. |
token | The token that represents the indiviudal call to the method. Used in the asynchronous completion token pattern. |
Wed Jun 13 2018, 11:10 AM Z