API for Attribute Specs

Part of the Object based program API.

class AttributeSpecApi

API to access attribute specs.

Returned by

PackageAttrSpec

Returns the object representing the package attribute specification of the current workspace as defined in the settings file pkgattr.spec.

Returns:

Package attribute spec object

Return type:

PackageAttrSpec

ProjectAttrSpec

Returns the object representing the project attribute specification of the current workspace as defined in the settings file prjattr.spec.

Returns:

Project attribute spec object

Return type:

ProjectAttrSpec

CreateAttributeDef(identifier)

Creates a new plain attribute definition.

Parameters:
identifier : str

Identifier of the new definition

Returns:

New attribute definition

Return type:

AttributeDef

Raises:

ApiError – If identifier has invalid type or is empty.

CreateAttributeOptionDef(identifier)

Creates a new attribute option definition.

Parameters:
identifier : str

Identifier of the new option definition

Returns:

New attribute option definition

Return type:

AttributeOptionDef

Raises:

ApiError – If identifier has invalid type or is empty.

CreateChoiceAttributeDef(identifier)

Creates a new choice attribute definition.

Parameters:
identifier : str

Identifier of the new choice definition

Returns:

New choice attribute definition

Return type:

ChoiceAttributeDef

Raises:

ApiError – If identifier has invalid type or is empty.