Content
Attribute supports various content defined by contentType.
For more details about Attribute types and contentType, see Attributes.
Content properties
Each content type must extends BaseAttributeContent which is abstracted from AttributeContent.
The content has the following properties defined and inherited from BaseAttributeContent:
| Property | Type | Short description | Required |
|---|---|---|---|
reference | string | Reference that can be used for the content value. It is usefull especially when the data contains an object, or any other more complex data structure | No |
data | AttributeContent | The value of the content, depending on the contentType from supported AttributeContentType | Yes |
Supported content types
Supported content types are defined in AttributeContentType.
The following content types are available and supported:
AttributeContentType | Class | Data |
|---|---|---|
STRING | StringAttributeContent | string |
INTEGER | IntegerAttributeContent | integer |
SECRET | SecretAttributeContent | SecretAttributeContentData |
FILE | FileAttributeContent | FileAttributeContentData |
BOOLEAN | BooleanAttributeContent | boolean |
TEXT | TextAttributeContent | string |
CODEBLOCK | CodeBlockAttributeContent | CodeBlockAttributeContentData |
FLOAT | FloatAttributeContent | float |
DATE | DateAttributeContent | date |
DATETIME | DateTimeAttributeContent | datetime |
TIME | TimeAttributeContent | time |
CREDENTIAL | CredentialAttributeContent | CredentialDto |
OBJECT | ObjectAttributeContent | object |
One Attribute can define only one contentType. Multiple different content types for one Attribute is not supported.
Content type samples
The table below shows the AttributeContentType and the sample for each type.
| Associated |
|---|---|
| |
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
|
you would sent following content |
|
|
|
|
Content model
The following diagram represents the content model inherited from the AttributeContent. Details can be found in the CZERTAINLY Interfaces repository.