Resource | @tomic

Hierarchy

  • Resource

Constructors

constructor

  • new Resource(subject: string, newResource?: boolean): Resource
  • Parameters

    • subject: string
    • Optional newResource: boolean

    Returns Resource

Properties

appliedCommitSignatures

appliedCommitSignatures: Set<string>

Private commitBuilder

commitBuilder: any

Optional commitError

commitError?: Error

Optional error

error?: Error

loading

loading: boolean

new

new: boolean

Private propvals

propvals: any

Private subject

subject: any

Accessors

title

Methods

canWrite

  • canWrite(store: Store, agent?: string, child?: string): Promise<[boolean, undefined | string]>
  • Parameters

    • store: Store
    • Optional agent: string
    • Optional child: string

    Returns Promise<[boolean, undefined | string]>

clone

destroy

  • destroy(store: Store, agent?: Agent): Promise<void>
  • Returns Promise<void>

get

getArray

getChildrenCollection

  • getChildrenCollection(): string
  • Returns string

getClasses

  • getClasses(): string[]
  • Returns string[]

getCommitBuilder

getPropVals

getRights

getSubject

  • getSubject(): string
  • Returns string

getSubjectNoParams

  • getSubjectNoParams(): string
  • Returns string

getSubjects

  • getSubjects(propUrl: string): string[]
  • Parameters

    • propUrl: string

    Returns string[]

hasClasses

  • hasClasses(...classSubjects: string[]): boolean
  • Parameters

    • Rest ...classSubjects: string[]

    Returns boolean

isReady

  • isReady(): boolean
  • Returns boolean

isUnauthorized

  • Returns boolean

pushPropVal

  • pushPropVal(propUrl: string, ...values: JSONArray): void
  • Parameters

    Returns void

removePropVal

  • removePropVal(propertyUrl: string): void
  • Parameters

    • propertyUrl: string

    Returns void

removePropValLocally

  • removePropValLocally(propertyUrl: string): void
  • Parameters

    • propertyUrl: string

    Returns void

save

  • save(store: Store, differentAgent?: Agent): Promise<string>
  • Parameters

    Returns Promise<string>

set

  • set(prop: string, value: JSONValue, store: Store, validate?: boolean): Promise<void>
  • Parameters

    • prop: string
    • value: JSONValue
    • store: Store
    • Optional validate: boolean

    Returns Promise<void>

setError

  • setError(e: Error): void
  • Parameters

    • e: Error

    Returns void

setSubject

  • setSubject(subject: string): void
  • Parameters

    • subject: string

    Returns void

setUnsafe

  • setUnsafe(prop: string, val: JSONValue): void
  • Returns void