Class: TagSet

TagSet


new TagSet()

Implements:

Methods


createInstance(tag [, properties] [, id])

Creates an instance and returns it's tag

Parameters:
Name Type Argument Description
tag string

New instance tag

properties Object.<string, (string|olympe.dc.Reference)> <optional>

Instance's properties (map of properties names to values)

id number <optional>

operationId

Implements:
Returns:

True if the creation was successful

Type
boolean

createRelation(relationTag, leftInstTag, rightInstTag [, id])

Creates a relation between two instances.

Parameters:
Name Type Argument Description
relationTag string

Tag of the relation

leftInstTag string

Left instance tag

rightInstTag string

Right instance tag

id number <optional>

operationId

Implements:

deleteInstance(tag [, id])

Deletes an instance

  • Removing a non existing instance does not trigger an error
  • Removing an instance that still has relations does not trigger an error
Parameters:
Name Type Argument Description
tag string
id number <optional>

operationId

Implements:

deleteRelation(relationTag, leftInstTag, rightInstTag [, id])

Removes a relation between two instances

Parameters:
Name Type Argument Description
relationTag string

Tag of the relation

leftInstTag string

Left instance tag

rightInstTag string

Right instance tag

id number <optional>

operationId

Implements:

getTags()

Returns:
Type
Set.<string>

updateInstance(tag [, properties] [, forceUpdate] [, id])

Updates an instance.

  • If the instance does not exist, it will be automatically created
  • Depending on the implementation, updates will be rejected if the provided "new" version is lower than the stored one
Parameters:
Name Type Argument Default Description
tag string

Instance tag

properties Object.<string, *> <optional>

Instance properties

forceUpdate boolean <optional>
false

If true, do not do any version check and accepts any update (used by rollbacks)

id number <optional>

operationId

Implements:
Returns:

True if the update was successful

Type
boolean