Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandFactory

Factory for creation of Commands from JSON objects.

Hierarchy

  • CommandFactory

Index

Methods

Static Protected getCommandType

  • Attempts to create a CommandType from a string.

    Parameters

    • type: string

      string containing a CommandType text.

    Returns CommandType

Static parse

  • parse(jsonObject: Object): Command
  • Attempts to create a Command from a JSON object.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    Returns Command

Static Protected parseAddConnectorCommand

  • Attempts to create an AddConnectorCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns AddConnectorCommand

Static Protected parseAddEdgeCommand

  • Attempts to create an AddEdgeCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns AddEdgeCommand

Static Protected parseAddModelCommand

  • Attempts to create an AddModelCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns AddModelCommand

Static Protected parseAddNodeCommand

  • Attempts to create an AddNodeCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns AddNodeCommand

Static Protected parseDeleteConnectorCommand

  • Attempts to create an DeleteConnectorCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns DeleteConnectorCommand

Static Protected parseDeleteConnectorPropertyCommand

Static Protected parseDeleteEdgeCommand

  • Attempts to create an DeleteEdgeCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns DeleteEdgeCommand

Static Protected parseDeleteEdgePropertyCommand

  • Attempts to create a DeleteEdgePropertyCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns DeleteEdgePropertyCommand

Static Protected parseDeleteModelCommand

  • Attempts to create an DeleteModelCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns DeleteModelCommand

Static Protected parseDeleteModelPropertyCommand

Static Protected parseDeleteNodeCommand

  • Attempts to create an DeleteNodeCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns DeleteNodeCommand

Static Protected parseDeleteNodePropertyCommand

  • Attempts to create a DeleteNodePropertyCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns DeleteNodePropertyCommand

Static Protected parseProperties

  • parseProperties(properties: Object): Dictionary<any>
  • Parses a properties object and returns a valid properties object.

    Parameters

    • properties: Object

    Returns Dictionary<any>

Static Protected parseSetConnectorPropertyCommand

Static Protected parseSetEdgePropertyCommand

  • Attempts to create a SetEdgePropertyCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns SetEdgePropertyCommand

Static Protected parseSetModelPropertyCommand

  • Attempts to create a SetModelPropertyCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns SetModelPropertyCommand

Static Protected parseSetNodePropertyCommand

  • Attempts to create a SetNodePropertyCommand.

    Parameters

    • jsonObject: Object

      JSON Object representing the Command.

    • keys: Dictionary<ValidationType>

      Keys of the jsonObject that will be validated against the matched ValidationTypes.

    Returns SetNodePropertyCommand

Static Protected validateObject

  • validateObject(object: Object, keysWithType: Dictionary<ValidationType>): void
  • Validates the keys of the passed objects against the passed ValidationTypes.

    Parameters

    • object: Object

      Object that should be validated.

    • keysWithType: Dictionary<ValidationType>

      Dictionary of the keys that will be validated, with as value the type of validation.

    Returns void

Generated using TypeDoc