Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AttachmentsModel

The default implementation of the IAttachmentsModel.

Hierarchy

  • AttachmentsModel

Implements

Index

Constructors

constructor

  • Construct a new observable outputs instance.

    Parameters

    Returns AttachmentsModel

Properties

Private _changeGuard

_changeGuard: any

Private _changed

_changed: any

Private _createItem

_createItem: any

Create an attachment item and hook up its signals.

Private _isDisposed

_isDisposed: any

Private _map

_map: any

Private _modelDB

_modelDB: any

Private _onGenericChange

_onGenericChange: any

Handle a change to an item.

Private _onMapChanged

_onMapChanged: any

Handle a change to the list.

Private _onSerializedChanged

_onSerializedChanged: any

If the serialized version of the outputs have changed due to a remote action, then update the model accordingly.

Private _serialized

_serialized: any

Private _stateChanged

_stateChanged: any

Readonly contentFactory

contentFactory: IContentFactory

The attachment content factory used by the model.

Accessors

changed

  • A signal emitted when the model changes.

    Returns ISignal<this, ChangedArgs>

isDisposed

  • get isDisposed(): boolean
  • Test whether the model is disposed.

    Returns boolean

keys

  • get keys(): ReadonlyArray<string>
  • The keys of the attachments in the model.

    Returns ReadonlyArray<string>

length

  • get length(): number
  • Get the length of the items in the model.

    Returns number

stateChanged

  • A signal emitted when the model state changes.

    Returns ISignal<IAttachmentsModel, void>

Methods

clear

  • clear(): void
  • Clear all of the attachments.

    Returns void

dispose

  • dispose(): void
  • Dispose of the resources used by the model.

    Returns void

fromJSON

  • fromJSON(values: nbformat.IAttachments): void
  • Deserialize the model from JSON.

    Notes

    This will clear any existing data.

    Parameters

    • values: nbformat.IAttachments

    Returns void

get

  • Get an item at the specified key.

    Parameters

    • key: string

    Returns IAttachmentModel | undefined

has

  • has(key: string): boolean
  • Whether the specified key is set.

    Parameters

    • key: string

    Returns boolean

remove

  • remove(key: string): void
  • Remove the attachment whose name is the specified key

    Parameters

    • key: string

    Returns void

set

  • set(key: string, value: nbformat.IMimeBundle): void
  • Set the value at the specified key.

    Parameters

    • key: string
    • value: nbformat.IMimeBundle

    Returns void

toJSON

  • toJSON(): nbformat.IAttachments
  • Serialize the model to JSON.

    Returns nbformat.IAttachments

Generated using TypeDoc