-
Notifications
You must be signed in to change notification settings - Fork 0
/
PropertySetEvent.ts
52 lines (47 loc) · 1.37 KB
/
PropertySetEvent.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import * as Common from "cubitt-common";
import {Event} from "./Event";
import {EventType} from "./../EventType";
/**
* Base event for any set property of some element.
*/
export abstract class PropertySetEvent extends Event {
/**
* The RFC4122 v4 compliant ID of the element for which the property was set.
*/
public elementId: Common.Guid;
/**
* The name of the property that was set.
*/
public propertyName: string;
/**
* The value of the property that was set.
*/
public propertyValue: any;
/**
* @param sourceId The RFC4122 v4 compliant ID of the command that caused this event.
* @param version The new current version number.
* @param type The type of this event.
* @param timestamp The timestamp for the moment this event was created in milliseconds elapsed since 1 January 1970 00:00:00 UTC.
* @param elementId The RFC4122 v4 compliant ID of the element for which the property was set.
* @param propertyName The name of the property that was set.
* @param propertyValue The value of the property that was set.
*/
constructor(
sourceId: Common.Guid,
version: number,
type: EventType,
timestamp: number,
elementId: Common.Guid,
propertyName: string,
propertyValue: any
) {
super(
sourceId,
version,
type,
timestamp);
this.elementId = elementId;
this.propertyName = propertyName;
this.propertyValue = propertyValue;
}
}