PropertyClass - addProperty
PropertyClass - addProperty
Description :
This command attempts to add a new property to a specified class. If such a property already exists, the command fails.
You cannot use this command to add new properties whose types are user-defined String or Integer enumerations. To handle these types, use the commands addStringEnumProperty and addIntegerEnumProperty instead.
When you add a new property, you must specify its type. The syntax for specifying a property type is:
- Type := Kind | Kind :/ TypePath
- Kind := Primitive | List[Type] | Enum[Type] | Class
- TypePath := PrimitivePath | ClassPath
- PrimitivePath := String | Integer | ....
- ClassPath := /SystemObject/ClassName
The primitives are:
- Integer
- String
- Date
- Boolean
- FilePermission ACE
- Decimal
- FilePermission ACE Mask
- Unix Permission
- Regular Expression
- FileAudit ACE
- RegistryPermission ACE
- RegistryAudit ACE
- FileAudit ACE Mask
- RegistryPermission ACE Mask
- RegistryAudit ACE Mask
- Encrypted String
- Long Text
Here are some examples:
- Primitive:/String
- List[Primitive:/String]
- Enum[Primitive:/String:/RegistryDataTypeEnumeration]
- Class://SystemObject/Server
- Class://SystemObject/MyClass/MySubClass
Return type : java.lang.Void
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
fullyQualifiedClassName | String | Fully qualified name of the class to which you want to add a property. |
propertyName | String | Name of the property. |
description | String | Short description of the property. |
propertyType | String | Type of the property. |
isEditable | Boolean | Indicates whether or not the property is editable. |
isRequired | Boolean | Indicates whether or not the property is required. |
defaultValueAsString | String | Default value of the property. |
Example
The following example attempts to add a JVM_HEAP_SIZE property to the Apache class.
Script
PropertyClass addProperty Class://SystemObject/Application/Apache JVM_HEAP_SIZE "the heap-size value" Primitive:/Integer true false 1024