Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The Conflict class is used to represent error that has occurred due to an update operation.
Conflicts are generated for many reasons.
For example, another client has updated the same property of an item.
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
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The DataMessage
object that caused the conflict.
Implementation public function get cause():DataMessage
causedByLocalCommit:Boolean
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | 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.
Implementation public function get causedByLocalCommit():Boolean
clientObject:Object
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The state of the client object (whose property was changed)
at the time of the conflict.
Implementation public function get clientObject():Object
destination:String
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The destination for the data service of the item involved
in this conflict.
Implementation public function get destination():String
originalObject:Object
[read-only]
The state of the original client object before its properties
were changed, as known at the time of the conflict.
Implementation public function get originalObject():Object
propertyNames:Array
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | 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.
Implementation public function get propertyNames():Array
resolved:Boolean
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Indicates whether this Conflict has been resolved
(acceptClient()
or acceptServer()
has been
called).
Implementation public function get resolved():Boolean
See also
serverObject:Object
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
The value of the server object whose property was to be changed.
Implementation public function get serverObject():Object
serverObjectDeleted:Boolean
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | 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.
Implementation public function get serverObjectDeleted():Boolean
serverObjectReferencedIds:Object
[read-only]
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | 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.
Implementation public function get serverObjectReferencedIds():Object
public function acceptClient():void
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | 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.
Example (
How to use this example )
private function conflictHandler(event:DataConflictEvent):void
{
if (acceptClientCheck.selected)
{
event.conflict.acceptClient();
}
else
{
event.conflict.acceptServer();
}
}
public function acceptServer():void
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Removes the conflicting local change and applies the property values
found on Conflict.serverObject
to the local item.
Example (
How to use this example )
private function conflictHandler(event:DataConflictEvent):void
{
if (acceptClientCheck.selected)
{
event.conflict.acceptClient();
}
else
{
event.conflict.acceptServer();
}
}
public function readExternal(input:IDataInput):void
A class implements this method to decode itself from a data stream by calling the methods of the IDataInput
interface. This method must read the values in the same sequence and with the same types as
were written by the writeExternal()
method.
Parameters
| input:IDataInput — The name of the class that implements the IDataInput interface.
|
public function toString():String
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Returns a String representation of this Conflict object.
Returns | String — A String representation of this Conflict object.
|
public function writeExternal(output:IDataOutput):void
A class implements this method to encode itself for a data stream by calling the methods of the IDataOutput
interface.
Parameters
| output:IDataOutput — The name of the class that implements the IDataOutput interface.
|
public static const NONE:String = "none"
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Conflict mode constant representing zero conflict detection.
public static const OBJECT:String = "object"
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Conflict mode constant representing object level conflict detection.
public static const PROPERTY:String = "property"
Language Version: | ActionScript 3.0 |
Product Version: | LiveCycle Data Services 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Conflict mode constant representing property level conflict detection.