Attributes
Attribute, specifically its type is used to control different behaviour of the content and values in the platform. Some attributes defined 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 works 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
:
Property | Type | Required |
---|---|---|
contentType | AttributeContentType | Yes |
constraints | list of BaseAttributeConstraint | No |
properties | AttributeProperties | Yes |
attributeCallback | AttributeCallback | No |
Attribute Types
Based on the usage and specific behaviour you want to provide, Attribute
can be one of the following defined types in AttributeType:
AttributeType | Class | Short description |
---|---|---|
DATA | DataAttribute | Full fledged data carriers used by in the platform for information exchange |
INFO | InfoAttributes | Information 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 |
GROUP | GroupAttributes | Advanced type of attribute that can group multiple attributes. Main use is when the attributes are dependent on the content selected from other attributes |
META | MetadataAttributes | Metadata representation that can be exchanged between the platform and connectors |
CUSTOM | CustomAttributes | Used 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:
Property name / Attribute type | DataAttribute | InfoAttributeP | GroupAttributes | MetadataAttribute | CustomAttribute |
---|---|---|---|---|---|
contentType | |||||
constraints | |||||
properties | |||||
attributeCallback |
- - the property is required
- - the property is optional
- - the property is not applicable
Attribute structure samples
The following samples show how the Attribute
can be defined in the platform for different types:
- DATA
- INFO
- GROUP
- META
- CUSTOM
{
"uuid": "c7a8f8f0-f8f8-4f8f-8f8f-f8f8f8f8f8f8",
"name": "certificateTemplate",
"label": "Certificate Template",
"type": "data",
"contentType": "string",
"content": [
{
"reference": "Template 1",
"data": "template1"
},
{
"reference": "Template 2",
"data": "template2"
},
{
"reference": "Template 3",
"data": "template3"
}
],
"properties": {
"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}"
}
]
}
{
"uuid": "c7a8f8f0-f8f8-4f8f-8f8f-f8f8f8f8f8f8",
"name": "certificateTemplate",
"label": "Certificate Template",
"type": "info",
"contentType": "string",
"content": [
{
"reference": "Template 1",
"data": "template1"
}
],
"properties": {
"readOnly": false,
"visible": true,
"group": "Certificate Configuration"
},
"description": "Available certificate templates that can be selected for the certificate request",
}
{
"uuid": "c7a8f8f0-f8f8-4f8f-8f8f-f8f8f8f8f8f8",
"name": "group1",
"label": "Option A Attributes",
"type": "group",
"content": [
{
"uuid": "c7a8f8f0-f8f8-4f8f-8f8f-f8f8f8f8f8f8",
"name": "certificateTemplate",
"label": "Certificate Template",
"type": "data",
"contentType": "string",
"content": [
{
"reference": "Template 1",
"data": "template1"
},
{
"reference": "Template 2",
"data": "template2"
},
{
"reference": "Template 3",
"data": "template3"
}
],
"properties": {
"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}"
}
]
}
],
"description": "Available certificate templates that can be selected for the certificate request",
}
{
"uuid": "c7a8f8f0-f8f8-4f8f-8f8f-f8f8f8f8f8f8",
"name": "discoverySource",
"label": "Discovery Source",
"type": "meta",
"contentType": "string",
"content": [
{
"reference": "Internet",
"data": "internet.com"
}
],
"properties": {
"readOnly": false,
"visible": true,
"global": true,
"group": "Discovery"
},
"description": "Source from where the certificate is discovered",
}
{
"uuid": "c7a8f8f0-f8f8-4f8f-8f8f-f8f8f8f8f8f8",
"name": "purpose",
"label": "Purpose",
"type": "custom",
"contentType": "string",
"content": [
{
"reference": "",
"data": "Created to test the custom attribute"
}
],
"properties": {
"required": true,
"readOnly": false,
"visible": true,
"list": true,
"multiSelect": true,
"group": "Certificate Configuration"
},
"description": "Sample description for the custom attribute"
}
Attribute
model
Th following diagram represents the Attribute
model inherited from the AbstractBaseAttribute
. Details can be found in the CZERTAINLY Interfaces repository.