Skip to main content

Class: ProcedureCreate

Defined in: plugins/block-shareable-procedures/src/events_procedure_create.ts:16

Notifies listeners that a procedure data model has been created.

Extends​

Properties index​

PropertyDescription
groupAn ID for the group of events this block is associated with.
isBlankWhether or not the event was constructed without necessary parameters (to be populated by fromJson).
isUiEventWhether or not the event is a UI event.
procedureThe procedure model associated with this event.
recordUndoWhether this event is undoable or not.
typeA string used to check the type of the event.
workspaceIdThe workspace identifier for this event.
TYPE-

Methods index​

MethodDescription
getEventWorkspace_Get workspace the event belongs to.
isNullDoes this event record any change of state?
runReplays the event in the workspace.
toJsonEncode the event as JSON.

Constructors​

Constructor​

new ProcedureCreate(workspace, procedure): ProcedureCreate;

Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:26

Constructs the base procedure event.

Parameters​

ParameterTypeDescription
workspaceWorkspaceThe workspace the procedure model exists in.
procedureIProcedureModelThe procedure model associated with this event.

Returns​

ProcedureCreate

Inherited from​

ProcedureBase.constructor

Properties​

group​

group: string;

An ID for the group of events this block is associated with.

Groups define events that should be treated as an single action from the user's perspective, and should be undone together.

Inherited from​

ProcedureBase.group


isBlank​

isBlank: boolean = false;

Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:18

Whether or not the event was constructed without necessary parameters (to be populated by fromJson).

Inherited from​

ProcedureBase.isBlank


isUiEvent​

isUiEvent: boolean;

Whether or not the event is a UI event.

Inherited from​

ProcedureBase.isUiEvent


procedure​

readonly procedure: IProcedureModel;

Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:28

The procedure model associated with this event.

Inherited from​

ProcedureBase.procedure


recordUndo​

recordUndo: boolean;

Whether this event is undoable or not.

Inherited from​

ProcedureBase.recordUndo


type​

type: string = ProcedureCreate.TYPE;

Defined in: plugins/block-shareable-procedures/src/events_procedure_create.ts:20

A string used to check the type of the event.

Overrides​

ProcedureBase.type


workspaceId?​

workspaceId?: string;

The workspace identifier for this event.

Inherited from​

ProcedureBase.workspaceId


TYPE​

readonly static TYPE: "procedure_create" = 'procedure_create';

Defined in: plugins/block-shareable-procedures/src/events_procedure_create.ts:17

Overrides​

ProcedureBase.TYPE

Methods​

getEventWorkspace_()​

getEventWorkspace_(): Workspace;

Get workspace the event belongs to.

Returns​

Workspace

The workspace the event belongs to.

Throws​

if workspace is null.

Inherited from​

ProcedureBase.getEventWorkspace_


isNull()​

isNull(): boolean;

Does this event record any change of state?

Returns​

boolean

True if null, false if something changed.

Inherited from​

ProcedureBase.isNull


run()​

run(forward): void;

Defined in: plugins/block-shareable-procedures/src/events_procedure_create.ts:28

Replays the event in the workspace.

Parameters​

ParameterTypeDescription
forwardbooleanif true, play the event forward (redo), otherwise play it backward (undo).

Returns​

void

Overrides​

ProcedureBase.run


toJson()​

toJson(): ProcedureCreateJson;

Defined in: plugins/block-shareable-procedures/src/events_procedure_create.ts:45

Encode the event as JSON.

Returns​

ProcedureCreateJson

JSON representation.

Overrides​

ProcedureBase.toJson