Options
All
  • Public
  • Public/Protected
  • All
Menu
collboard-system

Hierarchy

Implements

  • IArtVersioningSystem
  • IDestroyable

Index

Constructors

Properties

artsObservable: Observable<AbstractArt>
closePreventionSystem: IClosePreventionSystem
commitsObservable: Observable<Commit>
commitsPool: ICommitData[]
cornerstoneArts: BehaviorSubject<CornerstoneArt>
moduleSignature: IModuleSignature
permissions: IPermissions
ready: Promise<void>

Promise which is resolved when the system is initialized and ready to use.

systems: ISystemsExtended

Accessors

  • Returns AbstractArt[]

  • Returns AbstractPlacedArt[]

  • get clientId(): uuid
  • Returns uuid

  • get commits(): ICommitData[]
  • Returns ICommitData[]

  • get commitsPlaced(): ICommitData[]
  • Returns ICommitData[]

  • get isDestroyed(): boolean
  • Is this object destroyed?

    Returns boolean

  • get isReady(): boolean
  • Checks if the system is initialized and ready to use.

    Returns boolean

  • get lastCommit(): null | ICommitData
  • Returns null | ICommitData

  • get lastCommitId(): number
  • Returns number

  • get sortCommitsByOperationId(): ICommitData[][]
  • Note: This is just a debug class

    Returns ICommitData[][]

Methods

  • checkIsReady(): void
  • Checks if the system is initialized and ready to use. If not, throws an error. If it is, do nothing.

    Returns void

  • checkWhetherNotDestroyed(errorMessage?: string, runBeforeError?: () => void): void
  • Checks, whether the object is not destroyed

    Parameters

    • Optional errorMessage: string

      Message that will replace default one before error

    • Optional runBeforeError: () => void

      Callback runed before error is thrown; typically this can be some logging

        • (): void
        • Returns void

    Returns void

  • createOperation(operationName: string): Operation
  • Parameters

    • operationName: string

    Returns Operation

  • createPrimaryOperation(): Operation
  • destroy(): Promise<void>
  • Returns Promise<void>

  • findCommitById(commitId: undefined | null | uuid): null | ICommitData
  • Parameters

    • commitId: undefined | null | uuid

      when null or undefined returns null

    Returns null | ICommitData

  • findCommitsByOperationId(operationId: uuid): ICommitData[]
  • findLastCommitOfArt(art: AbstractArt): null | ICommitData
  • findNextCommit(commit: ICommitData): null | ICommitData
  • Parameters

    • commit: ICommitData

    Returns null | ICommitData

  • findNextCommits(commit: ICommitData): ICommitData[]
  • Parameters

    • commit: ICommitData

    Returns ICommitData[]

  • findOriginCommit(commit: ICommitData): ICommitData
  • Parameters

    • commit: ICommitData

    Returns ICommitData

  • findPreviousCommit(commit: ICommitData): null | ICommitData
  • Parameters

    • commit: ICommitData

    Returns null | ICommitData

  • hasNextCommits(commit: ICommitData): boolean
  • Parameters

    • commit: ICommitData

    Returns boolean

  • init(): Promise<void>
  • isLastInItsTree(commit: ICommitData): boolean
  • Parameters

    • commit: ICommitData

    Returns boolean

  • pushCommitsToVersioningSystem(...commits: ICommitData[]): Promise<void>
  • setCommitWasPersisted(commitId: uuid, id: number): void
  • isDestroyable(obj: any): obj is IDestroyable
  • Chcek whether the given object is destroyable

    Parameters

    • obj: any

    Returns obj is IDestroyable