File

src/models/events/idm/idm-state-event.ts

Description

Serializable, Generic IDM state event base class

Extends

IdmEvent

Implements

ISerializable

Index

Properties
Methods

Methods

deserialize
deserialize(input: any)

Deserializes a JSON object into this class

Parameters :
Name Type Optional Description
input any
Returns : this

Properties

sourceId
sourceId: string
Type : string

Source ID of the event

stateChangeFrom
stateChangeFrom: T
Type : T

The original state of the source

stateChangeTo
stateChangeTo: T
Type : T

The new state of the source

import { ISerializable } from '../../serialization/index';

import { IdmEvent }            from './idm-event';

/**
 * Serializable, Generic IDM state event base class
 */
export class IdmStateEvent<T>
    extends IdmEvent
    implements ISerializable<IdmStateEvent<T>> {

        /** Source ID of the event */
        sourceId: string;
        /** The original state of the source */
        stateChangeFrom: T;
        /** The new state of the source */
        stateChangeTo: T;

        /** Deserializes a JSON object into this class */
        deserialize(input: any) {
            this.sourceId = input.sourceId;
            return this;
        }
}

results matching ""

    No results matching ""