Software AG Products 10.5 | Using CentraSite | Type Management | Managing Types through Command Line Interface | Removing Attribute from Asset Type Definition
 
Removing Attribute from Asset Type Definition
Pre-requisites:
To remove an attribute from a type definition through the CentraSite Command Line Interface, you must have the CentraSite Administrator role.
A user-defined attribute cannot be deleted from an asset type definition when there are asset instances of that type containing a value for the attribute.
CentraSite provides a command remove Attribute for this purpose. This command helps to automatically remove the attribute's value from all of the existing asset instances, before removing it from the type definition.
Follow these general guidelines when removing an attribute from the asset type definition:
*If you have one or more existing asset instances of this type, the remove operation of an attribute from the type definition can take some time to complete.
*You cannot remove a predefined attribute from any of the predefined asset types. You can, however, remove a custom (that is, user-defined) attribute from any predefined asset type.
*To remove an attribute from a type definition
*Run the command remove Attribute.
The syntax is of the format: C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd remove Attribute [-url <CENTRASITE-URL>] -user <USER-ID> -password <PASSWORD> -assetType <ASSET-TYPE> [-attributeKind <ATTRIBUTE-KIND>] -attributeName <ATTRIBUTE-NAME>
The input parameters are:
Parameter
Description
CENTRASITE-URL
(Optional). The URL of the CentraSite registry. For example, http://localhost:53307/CentraSite/CentraSite.
USER-ID
The user ID of a registered CentraSite user who has the CentraSite Administrator role. For example, Administrator.
PASSWORD
The password for the CentraSite user identified by the parameter USER-ID.
ASSET-TYPE
The name of the asset type, in the format "{<namespace of the asset type>}SchemaName".
ATTRIBUTE-KIND
A one-character code representing the type of the attribute you wish to remove. Allowable values are "C" for Classification, "R" for Relationship, "F" for File and "S" for all other attribute types. The use of the attributeKind parameter is optional.
ATTRIBUTE-NAME
The name of the attribute schema for attributes whose AttributeKind is "S". For attributes with an AttributeKind other than "S" it is the name of the attribute itself.
Example (all in one line):
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd remove Attribute -url http://localhost:53307/CentraSite/CentraSite -user Administrator -password manage -assetType {http://namespaces.CentraSite.com/Schema}XMLSchema -attributeKind S -attributeName test_String_Attribute
The response to this command could be:
Executing the command : remove Attribute

Successfully executed the command : remove Attribute