Options
All
  • Public
  • Public/Protected
  • All
Menu

The Document definition for an ActorDelta. Defines the DataSchema and common behaviors for an ActorDelta which are shared between both client and server. ActorDeltas store a delta that can be applied to a particular Actor in order to produce a new Actor.

mixes

ActorDeltaData

memberof

document

param data

Initial data used to construct the ActorDelta.

param context

Construction context options.

Hierarchy

Index

Constructors

Methods

  • canUserModify(user: any, action: any, data?: {}): any
  • testUserPermission(user: any, permission: any, __namedParameters?: { exact: boolean }): any
  • override

    Parameters

    • user: any
    • permission: any
    • __namedParameters: { exact: boolean } = {}
      • exact: boolean

    Returns any

  • getBaseCollection(collectionName: string): Collection
  • Retrieve the base actor's collection, if it exists.

    Parameters

    • collectionName: string

      The collection name.

    Returns Collection

  • toObject(source?: boolean): {}
  • override

    Parameters

    • source: boolean = true

    Returns {}

    • Apply an ActorDelta to an Actor and return the resultant synthetic Actor.

      Parameters

      • delta: ActorDelta

        The ActorDelta.

      • baseActor: Actor

        The base Actor.

      • context: any = {}

      Returns Actor

    • #mergeEmbeddedCollections(documentClass: typeof Document, baseData: any, deltaData: any): void
    • Merge delta Document embedded collections with the base Document.

      Parameters

      • documentClass: typeof Document

        The parent Document class.

      • baseData: any

        The base Document data.

      • deltaData: any

        The delta Document data.

      Returns void

    • #mergeEmbeddedCollection(base?: any[], delta?: any[]): any[]
    • Apply an embedded collection delta.

      Parameters

      • base: any[] = []

        The base embedded collection.

      • delta: any[] = []

        The delta embedded collection.

      Returns any[]

    Properties

    metadata: any = ...

    Default metadata which applies to each instance of this Document type.