Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines event data format for discovering objects based on external and object IDs or object types.

Hierarchy

  • CommunicationEventData
    • DiscoverEventData

Index

Constructors

constructor

  • new DiscoverEventData(externalId?: string, objectId?: string, objectTypes?: string[], coreTypes?: CoreType[]): DiscoverEventData
  • Create a DiscoverEventData instance for the given IDs or types.

    The following combinations of parameters are valid (use undefined for unused parameters):

    • externalId can be used exclusively or in combination with objectId property. Only if used exclusively it can be combined with objectTypes or coreTypes properties.
    • objectId can be used exclusively or in combination with externalId property. Must not be used in combination with objectTypes or coreTypes properties.
    • objectTypes must not be used with objectId property. Should not be used in combination with coreTypes.
    • coreTypes must not be used with objectId property. Should not be used in combination with objectTypes.

    Parameters

    • Optional externalId: string

      The external ID of the object(s) to be discovered or undefined.

    • Optional objectId: string

      The internal UUID of the object to be discovered or undefined.

    • Optional objectTypes: string[]

      Restrict objects by object types (logical OR).

    • Optional coreTypes: CoreType[]

      Restrict objects by core types (logical OR).

    Returns DiscoverEventData

Accessors

coreTypes

  • Restrict objects by core types (logical OR). Not to be used with objectId property. Should not be used in combination with objectTypes.

    Returns CoreType[]

externalId

  • get externalId(): string
  • The external ID of the object(s) to be discovered. Can be used exclusively or in combination with objectId property. If used exclusively it can be combined with objectTypes or coreTypes properties.

    Returns string

isDiscoveringExternalAndObjectId

  • get isDiscoveringExternalAndObjectId(): boolean

isDiscoveringExternalId

  • get isDiscoveringExternalId(): boolean
  • Determines whether this event data discovers an object based on an external ID but not an object ID.

    Returns boolean

isDiscoveringObjectId

  • get isDiscoveringObjectId(): boolean

isDiscoveringTypes

  • get isDiscoveringTypes(): boolean

objectId

  • get objectId(): string
  • The internal UUID of the object to be discovered. Can be used exclusively or in combination with externalId property. Must not be used in combination with objectTypes or coreTypes properties.

    Returns string

objectTypes

  • get objectTypes(): string[]
  • Restrict objects by object types (logical OR). Not to be used with objectId property. Should not be used in combination with coreTypes.

    Returns string[]

Methods

isCoreTypeCompatible

  • isCoreTypeCompatible(coreType: CoreType): boolean
  • Determines whether the given CoreType is compatible with this event data. Returns true, if the specified core type is contained in the coreTypes property; false otherwise.

    Parameters

    • coreType: CoreType

      name of the core type to check

    Returns boolean

isObjectTypeCompatible

  • isObjectTypeCompatible(objectType: string): boolean
  • Determines whether the given ObjectType is compatible with this event data. Returns true, if the specified type is contained in the objectTypes property; false otherwise.

    Parameters

    • objectType: string

      name of the object type to check

    Returns boolean

matchesObject

  • Determines whether the given object matches the requirements of this event data. Matches all specified fields (objectId, externalId, coreType and objectType). Returns false for undefined objects.

    Parameters

    • object: CoatyObject

      CoatyObject to match with the event data specifications.

    Returns boolean

toJsonObject

  • toJsonObject(): { coreTypes: CoreType[]; externalId: string; objectId: string; objectTypes: string[] }
  • Returns { coreTypes: CoreType[]; externalId: string; objectId: string; objectTypes: string[] }

    • coreTypes: CoreType[]
    • externalId: string
    • objectId: string
    • objectTypes: string[]

Static createFrom

Generated using TypeDoc