Hierarchy

  • MetamodelApi

Index

Methods

createEnumerationLiteral

  • createEnumerationLiteral(attributePersistentName: string, literalName: string, literalDescription: string, literalColorRGB: string): boolean
  • Create a new literal for an existing enumeration attribute

    example
    // Creates a new enumeration literal "iteratec" for "Manufacturer" with red color
    api.metamodelApi.createEnumerationLiteral("Manufacturer", "iteratec", "", "FF0000");

    Parameters

    • attributePersistentName: string

      Persistent name of the enumeration attribute

    • literalName: string

      Name of the enumeration literal

    • literalDescription: string

      Description for the enumeration literal

    • literalColorRGB: string

      Color to associate with the responsibility literal

    Returns boolean

    Whether the literal was successfully added or not.

createResponsibilityLiteral

  • createResponsibilityLiteral(attributePersistentName: string, userEntityId: number, literalColorRGB: string): boolean
  • Create a new literal for an existing responsibility attribute

    example
    // Creates a new responsibility literal for "Accountability" with red color
    api.metamodelApi.createResponsibilityLiteral("Accountability", user.getId(), "FF0000");

    Parameters

    • attributePersistentName: string

      Persistent name of the responsibility attribute

    • userEntityId: number

      Id of the user or user group to which the literal should refer to

    • literalColorRGB: string

      Hex description of the color to associate with the responsibility literal

    Returns boolean

    Whether the literal was successfully added or not.

getAttribute

  • getAttribute(persistentName: string): Attribute | null
  • Get an attribute object by its persistent name

    Parameters

    • persistentName: string

      Persistent name of the attribute

    Returns Attribute | null

    The attribute or null if it does not exist

getAttributes

  • Get a list of all attributes

    Returns Attribute[]

getAttributesAssignedToBuildingBlockType

  • Get a list of attribute objects assignable to building blocks of a specific type

    Parameters

    Returns Attribute[]

removeEnumerationLiteral

  • removeEnumerationLiteral(attributePersistentName: string, literalName: string): boolean
  • Remove a literal from a enumeration attribute.

    Parameters

    • attributePersistentName: string

      Persistent name of the enumeration attribute

    • literalName: string

      Name of the enumeration literal

    Returns boolean

    Whether the literal was successfully deleted or not.

removeResponsibilityLiteral

  • removeResponsibilityLiteral(attributePersistentName: string, userEntityId: number): boolean
  • Remove a literal from a responsibility attribute.

    Parameters

    • attributePersistentName: string

      Persistent name of the responsibility attribute

    • userEntityId: number

      Id of the user or user group to which the literal refers to

    Returns boolean

    Whether the literal was successfully deleted or not.

Legend

Generated using TypeDoc