Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents an item's attachment collection.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Namespace

Namespace: XmlNamespace

OnChange

____implementsInterface

____implementsInterface: string[]

____typeGenerics

____typeGenerics: string[]

____typeName

____typeName: string

Private owner

owner: Item

The item owner that owns this attachment collection

Accessors

AddedItems

Count

  • get Count(): number
  • Gets the total number of properties in the collection.

    Returns number

Items

ModifiedItems

Owner

  • interface

    :IOwnedProperty The owner of this attachment collection.

    Returns ServiceObject

  • Parameters

    Returns void

RemovedItems

Methods

AddFileAttachment

  • Adds a file attachment to the collection. - isContent parameter is required to be true to be able to use bas64 content directly

    Parameters

    • name: string

      The display name of the new attachment.

    • content: string

    Returns FileAttachment

    A FileAttachment instance.

Private AddFileAttachmentXXXXX

  • AddFileAttachmentXXXXX(fileName: string): FileAttachment
  • AddFileAttachmentXXXXX(name: string, fileName: string): FileAttachment
  • AddFileAttachmentXXXXX(name: string, fileContent: string, isContent: boolean): FileAttachment
  • Adds a file attachment to the collection.

    Parameters

    • fileName: string

      The name of the file representing the content of the attachment.

    Returns FileAttachment

    A FileAttachment instance.

  • Adds a file attachment to the collection.

    Parameters

    • name: string

      The display name of the new attachment.

    • fileName: string

      The name of the file representing the content of the attachment.

    Returns FileAttachment

    A FileAttachment instance.

  • Adds a file attachment to the collection. - isContent parameter is required to be true to be able to use bas64 content directly

    Parameters

    • name: string

      The display name of the new attachment.

    • fileContent: string

      base64 ontent of the file representing the content of the attachment.

    • isContent: boolean

      if true used as base64 content of file.

    Returns FileAttachment

    A FileAttachment instance.

AddItemAttachment

  • AddItemAttachment<TItem>(TItem: any, TItemElementName: string): ItemAttachmentOf<TItem>
  • Adds an item attachment to the collection

    type

    The type of the item to attach.

    Type parameters

    • TItem: Item

      Item type, not instance

    Parameters

    • TItem: any
    • TItemElementName: string

      XML Element Name of the Item class

    Returns ItemAttachmentOf<TItem>

    An ItemAttachment instance.

Changed

  • Changed(): void

Clear

  • Clear(): void
  • Removes all attachments from this collection.

    Returns void

ClearChangeLog

  • ClearChangeLog(): void
  • internal

    Disables the change log clearing mechanism. Attachment collections are saved separately from the items they belong to.

    Returns void

Contains

  • Determines whether a specific property is in the collection.

    Parameters

    • complexProperty: Attachment

      The property to locate in the collection.

    Returns boolean

    True if the property was found in the collection, false otherwise.

CreateComplexProperty

  • CreateComplexProperty(xmlElementName: string): Attachment
  • internal

    Instantiate the appropriate attachment type depending on the current XML element name.

    Parameters

    • xmlElementName: string

      The XML element name from which to determine the type of attachment to create.

    Returns Attachment

    An Attachment instance.

CreateDefaultComplexProperty

CreateFromXmlJsObjectCollection

  • CreateFromXmlJsObjectCollection(jsObjectCollection: any, service: ExchangeService): void
  • internal

    Loads from XMLJsObject collection to create a new collection item.

    interface

    IJsonCollectionDeserializer

    Parameters

    • jsObjectCollection: any

      The json collection.

    • service: ExchangeService

      The service.

    Returns void

GetCollectionItemXmlElementName

  • GetCollectionItemXmlElementName(complexProperty: Attachment): string
  • internal

    Determines the name of the XML element associated with the complexProperty parameter.

    Parameters

    • complexProperty: Attachment

      The attachment object for which to determine the XML element name with.

    Returns string

    The XML element name associated with the complexProperty parameter.

HasUnprocessedChanges

  • HasUnprocessedChanges(): boolean
  • internal

    Determines whether there are any unsaved attachment collection changes.

    Returns boolean

    True if attachment adds or deletes haven't been processed yet.

IndexOf

  • Searches for a specific property and return its zero-based index within the collection.

    Parameters

    • complexProperty: Attachment

      The property to locate in the collection.

    Returns number

    The zero-based index of the property within the collection.

Private InternalAdd

  • InternalAdd(complexProperty: Attachment): void
  • InternalAdd(complexProperty: Attachment, loading: boolean): void
  • internal

    Add complex property.

    Parameters

    • complexProperty: Attachment

      The complex property.

    Returns void

  • Parameters

    • complexProperty: Attachment

      The complex property.

    • loading: boolean

      If true, collection is being loaded.

    Returns void

InternalClear

  • InternalClear(): void

Private InternalCreateAttachments

  • InternalCreateAttachments(parentItemId: string, attachments: Attachment[]): IPromise<void>
  • Calls the CreateAttachment web method to create a list of attachments.

    Parameters

    • parentItemId: string

      The Id of the parent item of the new attachments.

    • attachments: Attachment[]

      The attachments to create.

    Returns IPromise<void>

Private InternalDeleteAttachments

  • Calls the DeleteAttachment web method to delete a list of attachments.

    Parameters

    • attachments: Attachment[]

      The attachments to delete.

    Returns IPromise<void>

InternalLoadFromXmlJsObject

  • InternalLoadFromXmlJsObject(jsObject: any, service: ExchangeService, readAction: function): void

InternalRemove

  • InternalRemove(complexProperty: Attachment): boolean
  • internal

    Remove specified complex property.

    Parameters

    • complexProperty: Attachment

      The complex property.

    Returns boolean

    True if the complex property was successfully removed from the collection, false otherwise.

InternalRemoveAt

  • InternalRemoveAt(index: number): void

InternalToJson

InternalValidate

  • InternalValidate(): void

ItemChanged

LoadFromXmlJsObject

ReadAttributesFromXmlJsObject

ReadElementsFromXmlJsObject

  • ReadElementsFromXmlJsObject(jsonProperty: any, service: ExchangeService): void

ReadElementsFromXmlJsObjectToPatch

  • ReadElementsFromXmlJsObjectToPatch(jsonProperty: any, service: ExchangeService): void

ReadTextValueFromXmlJsObject

Remove

  • Removes the specified attachment.

    Parameters

    • attachment: Attachment

      The attachment to remove.

    Returns boolean

    True if the attachment was successfully removed from the collection, false otherwise.

RemoveAt

  • RemoveAt(index: number): void
  • Removes the attachment at the specified index.

    Parameters

    • index: number

      Index of the attachment to remove.

    Returns void

RemoveFromChangeLog

  • RemoveFromChangeLog(complexProperty: Attachment): void

Save

  • internal

    Saves this collection by creating new attachment and deleting removed ones.

    Returns IPromise<void>

SetFieldValue

  • SetFieldValue<T>(field: IRefParam<T>, value: T): void

ShouldWriteToRequest

  • ShouldWriteToRequest(): boolean
  • internal

    Determine whether we should write collection to XML or not.

    Returns boolean

    True if collection contains at least one element.

UpdateFromXmlJsObject

UpdateFromXmlJsObjectCollection

  • UpdateFromXmlJsObjectCollection(jsObjectCollection: any, service: ExchangeService): void
  • internal

    Loads from XMLJsObject collection to update collection Items.

    interface

    IJsonCollectionDeserializer

    Parameters

    • jsObjectCollection: any

      The XMLJsObject collection.

    • service: ExchangeService

      The service.

    Returns void

Validate

  • Validate(): void
  • internal

    Validates this instance.

    Returns void

ValidateAndSave

  • internal

    Validates and saves this instance. Not in official EWS source, to workaround some promise errors with validate and save

    Returns IPromise<void>

WriteAttributesToXml

WriteDeleteUpdateToXml

WriteElementsToXml

WriteSetUpdateToXml

WriteToXml

___thisIndexer

  • Gets the property at the specified index.

    Parameters

    • index: number

      The zero-based index of the property to get.

    Returns Attachment

    The property at the specified index.

Generated using TypeDoc