套件 | mx.data |
類別 | public class Conflict |
繼承 | Conflict Error Object |
實作 | IExternalizable |
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Conflicts are determined by both the remote destination and the local DataService. A conflict detected by the DataService is considered a local conflict. A conflict detected by the remote destination is a remote conflict.
Custom assemblers can generate a remote conflict for any operation when
processing an update.
Local conflicts are determined by the ConflictDetector object.
To customize local conflict detection the ConflictDetector
can be extended and assigned to the DataService.conflictDetector
property.
All conflicts must be resolved before changes can be committed.
屬性 | 定義自 | ||
---|---|---|---|
cause : DataMessage [唯讀]
The DataMessage object that caused the conflict. | Conflict | ||
causedByLocalCommit : Boolean [唯讀]
Contains true if this conflict resulted from commiting a
local change to the remote destination,
and false if it resulted from a pushed change conflicting with a local change. | Conflict | ||
clientObject : Object [唯讀]
The state of the client object (whose property was changed)
at the time of the conflict. | Conflict | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
destination : String [唯讀]
The destination for the data service of the item involved
in this conflict. | Conflict | ||
errorID : int [唯讀]
包含與特定錯誤訊息相關聯的參照號碼。 | Error | ||
message : String
包含與 Error 物件有關聯的訊息。 | Error | ||
name : String
包含 Error 物件的名稱。 | Error | ||
originalObject : Object [唯讀]
The state of the original client object before its properties
were changed, as known at the time of the conflict. | Conflict | ||
propertyNames : Array [唯讀]
An Array of the names of the properties that were
in conflict between the client change and the remote item state. | Conflict | ||
resolved : Boolean [唯讀]
Indicates whether this Conflict has been resolved
(The acceptClient() or acceptServer() method has been
called). | Conflict | ||
serverObject : Object [唯讀]
The value of the server object whose property was to be changed. | Conflict | ||
serverObjectDeleted : Boolean [唯讀]
When the serverObject property of this class is null,
this property lets you know whether the server version is null
because the item was deleted on the server (true) or because
the item was removed from a fill that this client is subscribed to (false). | Conflict | ||
serverObjectReferencedIds : Object [唯讀]
If the serverObject has any properties with lazy="true",
returns an Object that stores the referencedId Arrays for
each lazily loaded property, using the property name as the
lookup key value. | Conflict |
方法 | 定義自 | ||
---|---|---|---|
Requeues the current local changes and updates the property values such
that a subsequent call to DataService.commit() should
succeed, causing these changes to override the previous ones. | Conflict | ||
Removes the conflicting local change and applies the property values
found on the Conflict.serverObject property to the local item. | Conflict | ||
在錯誤建構時傳回字串形式的錯誤呼叫堆疊。 | Error | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
Checks if this conflict describes the same item as the item of the given conflict. | Conflict | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
Conflict | |||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
Returns a String representation of this Conflict object. | Conflict | ||
會傳回指定之物件的基本值。 | Object | ||
Conflict |
常數 | 定義自 | ||
---|---|---|---|
NONE : String = "none" [靜態]
Conflict mode constant representing zero conflict detection. | Conflict | ||
OBJECT : String = "object" [靜態]
Conflict mode constant representing object level conflict detection. | Conflict | ||
PROPERTY : String = "property" [靜態]
Conflict mode constant representing property level conflict detection. | Conflict |
cause | 屬性 |
cause:DataMessage
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The DataMessage object that caused the conflict.
實作
public function get cause():DataMessage
causedByLocalCommit | 屬性 |
causedByLocalCommit:Boolean
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Contains true
if this conflict resulted from commiting a
local change to the remote destination,
and false
if it resulted from a pushed change conflicting with a local change.
實作
public function get causedByLocalCommit():Boolean
clientObject | 屬性 |
destination | 屬性 |
originalObject | 屬性 |
originalObject:Object
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The state of the original client object before its properties were changed, as known at the time of the conflict.
實作
public function get originalObject():Object
propertyNames | 屬性 |
propertyNames:Array
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
An Array of the names of the properties that were
in conflict between the client change and the remote item state.
All property names are String
values and exist in the
public namespace.
實作
public function get propertyNames():Array
resolved | 屬性 |
resolved:Boolean
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Indicates whether this Conflict has been resolved
(The acceptClient()
or acceptServer()
method has been
called).
實作
public function get resolved():Boolean
相關 API 元素
serverObject | 屬性 |
serverObjectDeleted | 屬性 |
serverObjectDeleted:Boolean
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
When the serverObject
property of this class is null,
this property lets you know whether the server version is null
because the item was deleted on the server (true) or because
the item was removed from a fill that this client is subscribed to (false).
This flag will return false if the serverObject
property is not null.
實作
public function get serverObjectDeleted():Boolean
serverObjectReferencedIds | 屬性 |
serverObjectReferencedIds:Object
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
If the serverObject
has any properties with lazy="true"
,
returns an Object that stores the referencedId
Arrays for
each lazily loaded property, using the property name as the
lookup key value.
實作
public function get serverObjectReferencedIds():Object
acceptClient | () | 方法 |
public function acceptClient():void
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Requeues the current local changes and updates the property values such
that a subsequent call to DataService.commit()
should
succeed, causing these changes to override the previous ones.
範例 ( 如何使用本範例 )
private function conflictHandler(event:DataConflictEvent):void { if (acceptClientCheck.selected) { event.conflict.acceptClient(); } else { event.conflict.acceptServer(); } }
acceptServer | () | 方法 |
public function acceptServer():void
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Removes the conflicting local change and applies the property values
found on the Conflict.serverObject
property to the local item.
範例 ( 如何使用本範例 )
private function conflictHandler(event:DataConflictEvent):void { if (acceptClientCheck.selected) { event.conflict.acceptClient(); } else { event.conflict.acceptServer(); } }
matches | () | 方法 |
public function matches(otherConflict:Conflict):Boolean
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
執行階段版本: | Flash Player 9, AIR 1.5 |
Checks if this conflict describes the same item as the item of the given conflict.
參數
otherConflict:Conflict — the other conflict object to compare.
|
Boolean — true if both conflict objects reference the same managed item.
|
readExternal | () | 方法 |
public function readExternal(input:IDataInput):void
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
參數
input:IDataInput |
toString | () | 方法 |
writeExternal | () | 方法 |
public function writeExternal(output:IDataOutput):void
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
參數
output:IDataOutput |
NONE | 常數 |
public static const NONE:String = "none"
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Conflict mode constant representing zero conflict detection.
OBJECT | 常數 |
public static const OBJECT:String = "object"
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Conflict mode constant representing object level conflict detection.
PROPERTY | 常數 |
public static const PROPERTY:String = "property"
語言版本: | ActionScript 3.0 |
產品版本: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Conflict mode constant representing property level conflict detection.
Tue Jun 12 2018, 03:47 PM Z