Use the APIs in this category to define and retrieve application properties.
Description: Use this interface to set the predefined properties for an application type object. Application type objects are application instance, application unit, and application file.
If you want to set custom or user defined properties, use the set_custom_property API.
The below table lists the properties for application instance, unit, and file.
Table:
Is mandatory: No
Input parameter: String: Attribute name and attribute value
Return value: 0 if successful, else any positive number.
Example:
Application instance: my $inst = $appObj->add_application_inst("app_inst"); if (defined $inst) { $inst->set_property("FRIENDLY_NAME", "MyAppInstance"); } Application unit: my $inst = $appObj->add_application_inst("app_inst"); if (defined $inst) { my $unit = $inst->add_application_unit("app_unit"); $unit->set_property("OWNER", "MyOwner"); } Application file: my $inst = $appObj->add_application_inst("app_inst"); if (defined $inst) { my $file = $inst->add_application_file("master.data"); $file->set_property("SIZE", "100"); }
Description: Use this interface to define custom property of your choice.
You can use this interface to set custom defined properties for an application instance, application unit, and application file.
Is mandatory: No
Input parameter: String: Attribute name, attribute value, is_secure (true or false), and attribute type. Attribute is_secure and type are optional. If is_secure is set to true, then property value is encrypted.
Return value: 0 if property is added successfully, else any positive number.
Example:
Application instance: my $inst = $appObj->add_application_inst("app_inst"); if (defined $inst) { $inst->set_custom_property("HOMEDIR", "MyDir"); } Application unit: my $inst = $appObj->add_application_inst("app_inst"); if (defined $inst) { my $unit = $inst->add_application_unit("app_unit"); $unit->set_custom_property("USER", "MyUser"); } Application file: my $inst = $appObj->add_application_inst("app_inst"); if (defined $inst) { my $file = $inst->add_application_file("master.data"); $file->set_custom_property("CHECKSUM", "123456789"); }