Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AttachmentsModel

The default implementation of the IAttachmentsModel. The namespace for AttachmentsModel class statics.

Hierarchy

  • AttachmentsModel

Implements

Index

Constructors

constructor

Properties

Private _changeGuard

_changeGuard: boolean = false

Private _changed

_changed: Signal<this, IChangedArgs<IAttachmentModel>> = new Signal<this, IAttachmentsModel.ChangedArgs>(this)

Private _isDisposed

_isDisposed: boolean = false

Private _map

_map: ObservableMap<IAttachmentModel> = new ObservableMap<IAttachmentModel>()

Private _modelDB

_modelDB: IModelDB = null

Private _serialized

_serialized: IObservableValue = null

Private _stateChanged

_stateChanged: Signal<IAttachmentsModel, void> = new Signal<IAttachmentsModel, void>(this)

contentFactory

contentFactory: IContentFactory

The attachment content factory used by the model.

Static defaultContentFactory

defaultContentFactory: ContentFactory = new ContentFactory()

The default attachment model factory.

Accessors

changed

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

Methods

Private _createItem

  • _createItem(options: IOptions): IAttachmentModel
  • Create an attachment item and hook up its signals.

    Parameters

    • options: IOptions

    Returns IAttachmentModel

Private _onGenericChange

  • _onGenericChange(): void
  • Handle a change to an item.

    Returns void

Private _onMapChanged

  • _onMapChanged(sender: IObservableMap<IAttachmentModel>, args: IChangedArgs<IAttachmentModel>): void
  • Handle a change to the list.

    Parameters

    • sender: IObservableMap<IAttachmentModel>
    • args: IChangedArgs<IAttachmentModel>

    Returns void

Private _onSerializedChanged

  • _onSerializedChanged(sender: IObservableValue, args: IChangedArgs): void
  • If the serialized version of the outputs have changed due to a remote action, then update the model accordingly.

    Parameters

    • sender: IObservableValue
    • args: IChangedArgs

    Returns void

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: IAttachments): void
  • Deserialize the model from JSON.

    Notes

    This will clear any existing data.

    Parameters

    • values: IAttachments

    Returns void

get

  • get(key: string): IAttachmentModel
  • Get an item at the specified key.

    Parameters

    • key: string

    Returns IAttachmentModel

has

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

    Parameters

    • key: string

    Returns boolean

set

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

    Parameters

    • key: string
    • value: IMimeBundle

    Returns void

toJSON

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

    Returns IAttachments

Generated using TypeDoc