Skip to main content

Attributes

Attribute, specifically its type, is used to control different behaviour of the content and values in the platform. Some attributes define the data that are exchanged between technologies, some of them may represent read-only information, and some of them may contain additional attributes that are grouped together or work as a wizard.

Attribute properties

The following is a list of properties that can be used to define the behaviour of the Attribute and extends properties of the BaseAttribute:

PropertyTypeRequired
contentTypeAttributeContentTypeYes
constraintslist of BaseAttributeConstraintNo
propertiesAttributePropertiesYes
attributeCallbackAttributeCallbackNo

Attribute Types

Based on the usage and specific behaviour you want to provide, Attribute can be one of the following defined types in AttributeType:

AttributeTypeClass v2Class v3Short description
DATADataAttributeV2DataAttributeV3Full fledged data carriers used in the platform for information exchange
INFOInfoAttributeV2InfoAttributeV3Information carriers whose primary responsibility is to provide additional helper information. The content of this attribute is not sent back to the platform, it is just informative
GROUPGroupAttributeV2GroupAttributeV3Advanced type of attribute that can group multiple attributes. Main use is when the attributes are dependent on the content selected from other attributes
METAMetadataAttributeV2MetadataAttributeV3Metadata representation that can be exchanged between the platform and connectors
CUSTOMCustomAttributeV2CustomAttributeV3User defined attributes for storing additional information about the objects supported in the platform

Attribute properties and types

The following matrix shows which Attribute properties are supported for each Attribute type (here, the version is omitted for simplicity, but the same applies for both v2 and v3):

Property name / Attribute typeDataAttributeInfoAttributeGroupAttributeMetadataAttributeCustomAttribute
contentType
constraints
properties
attributeCallback
  • - the property is required
  • - the property is optional
  • - the property is not applicable

Attribute structure samples

Use V3 for new implementations

V2 attributes are deprecated. New connector implementations should use V3. V2 samples are provided for reference when maintaining existing connectors.

The following samples show how the Attribute can be defined in the platform for different types:

{
"uuid": "c7a8f8f0-f8f8-4f8f-8f8f-f8f8f8f8f8f8",
"name": "certificateTemplate",
"type": "data",
"version": 2,
"contentType": "string",
"content": [
{
"reference": "Template 1",
"data": "template1"
},
{
"reference": "Template 2",
"data": "template2"
},
{
"reference": "Template 3",
"data": "template3"
}
],
"properties": {
"label": "Certificate Template",
"required": true,
"readOnly": false,
"visible": true,
"list": true,
"multiSelect": true,
"group": "Certificate Configuration"
},
"description": "Available certificate templates that can be selected for the certificate request",
"constraints": [
{
"description": "Certificate Template Regex",
"errorMessage": "Certificate Template must be a valid string",
"type": "regexp",
"data": "^[a-z\\s]{0,255}"
}
]
}

The following diagram represents the Attribute model inherited from the AbstractBaseAttribute. Details can be found in the CZERTAINLY Interfaces repository.