CentraSite Documentation : CentraSite Administrator’s Guide : Object Type Management : Creating a New Type : Define Attributes for a Type : General Procedure : Using the Dialog
Using the Dialog
To define attributes for an asset type
1. Go to panel 2 in the Add Asset Type wizard (if you are creating a new type) or the Edit Asset Type wizard (if you are modifying an existing type). If you need procedures for this step, see Creating a New Type or Viewing or Editing a Type.
2. To add a new attribute to the type, click Add Attribute.
Complete the following fields in the Add Attribute dialog box:
In this field...
Specify...
Name
The display name for the attribute. This is the attribute name that users will see when they view instances of this type in the user interface, therefore, the name should be meaningful.
The display name can contain any combination of characters, including spaces. You can change an attribute's display name at any time.
Note:  
If you are defining a Relationship attribute, by default the attribute's name will be derived from the name of the association type that you assign to the attribute. You can, however, assign a custom name to the Relationship attribute by specifying the Name attribute.
Schema Name
The schema name for the attribute. The schema name is the internal name that CentraSite assigns to the attribute. This name can contain only letters, numbers and the underscore character (_).
If you do not enter a schema name, CentraSite automatically generates a schema name for the attribute based on the name you enter in the Name field. However, if the name that CentraSite generates includes invalid characters, you will be prompted to provide a valid schema name when you save the attribute. For information about valid schema names, see Attribute Names.
After you create and save the attribute, you can no longer change its schema name.
Note:  
Relationship, File, and Classification attributes do not require schema names.
Description
Optional. A brief description for the attribute.
Required
Whether the attribute is required or optional. When you enable this option, CentraSite prevents users from saving an asset of this type without first assigning a value to this attribute.
In the user interface, a required attribute is displayed with an asterisk (*) next to its name.
Note:  
An attribute can be a required attribute and have a default value. If you do not supply a value for an attribute that is required and has a default value, the default value is automatically assigned to this attribute.
When editing an existing type:
*If there are no instances of the type in the registry, you can add a required attribute to an existing type.
*If there are instances of the type in the registry, you can add a required attribute of type slot or classification, but not of type relationship or file.
*If you add a new required attribute, no automatic update of existing instances takes place. This prevents the potential degradation of performance that could arise from the automatic update of a large number of instances.
*You can enable the Required option for an existing attribute even if there are empty instances of the attribute. But in this case a default value must be provided for the attribute.
*You can disable the Required option for an attribute at any time (even if assigned instances of the attribute already exist in the registry).
Read-only
Whether users can modify the value of the attribute.
The Read-only option prevents the attribute's value from being changed after an asset is created. When you enable this option, users can assign a value to the attribute when an asset of this type is initially created. However, they cannot modify the attribute after the asset has been saved.
You can enable or disable the Read-only option for an attribute at any time (even if instances of the type already exist in the registry).
Multiplicity
Whether the attribute can hold a just a single value or multiple values (i.e., an array of values). Enabling the Multi Value option allows users to assign more than one value to the attribute.
Note:  
The Multiplicity option is not available for the Boolean attribute type.
When editing an existing asset type:
*You can switch an attribute's Multiplicity option from Single Value to Multi Value at any time (even if instances of the type already exist in the registry).
*You can switch an attribute's Multiplicity option from Multi Value to Single Value only if:
*No instances of the type exist in the registry.
—OR—
*Instances of the type exist in the registry, but each instance has at most one value assigned to this attribute. (i.e., no instances exist wherein this attribute has multiple values).
Data Type
The attribute's type. Be aware that after you create an attribute, you cannot change its type.
Depending on the data type you select, additional type-specific fields or check boxes now appear in the dialog. Provide the appropriate information for these additional fields or check boxes. For details, see Defining Data Types.
Default Value
Optional. The value that is to be assigned to the attribute by default.
Note:  
The Default Value option is not available for all attribute types.
When editing an existing asset type:
*You can change a default value, assign a default value, or remove a default value from an attribute at any time. Changing the attribute's default value does not immediately affect any existing instances of the attribute.
*If you add a default value to an attribute that did not previously have one, and the registry contains empty instances of that attribute, the default value will be assigned to those assets the next time that they are saved to the registry.
*If you add a new attribute to an existing type and you assign a default value to that attribute, the default value will be assigned to the existing instances of that type the next time those instances are saved to the registry.
If the attribute has the Required option set, then the following conditions apply:
*When you create a new asset type with one or more required attributes, you do not need to provide a default value for these attributes during the creation process.
*If instances of an asset type exist, and you update the type definition in any manner, regardless of whether you edit the required attributes or not (for example, adding a new optional attribute, adding a new required attribute, or even editing the type name), you must provide a default value for each required attribute of that type. Required attributes that have no value will be set to the default value the next time the instance is saved to the registry.
*If instances with missing required attributes are viewed in CentraSite Control, these attributes are simulated and displayed with the default value. But the default value will not be added to the instance until the next save of the instance.
For the Data Type field, complete the type-specific options as described in Defining Data Types.
Click OK to save the attribute.
3. Repeat step 2 for each attribute that you want to add to the asset type.
4. If you need to edit an attribute that you have added to the asset type, click the name of the attribute in panel 2 and make your changes in the Edit Attribute dialog box. Be aware that certain options for an attribute cannot be changed after the attribute is created.
5. If you need to delete an attribute, select the attribute in panel 2 and click Delete.
Important:  
CentraSite will not allow you to delete an attribute if an assigned instance of the attribute is present in the registry.
Copyright © Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback