Naming convention for get and set property value methods

For each resource type the HCL VersionVault CM API provides specific methods to get and possibly set the property values of properties defined by the interface. For example, for the CcVob interface defines the PropertyNames BRANCH_TYPE_LIST, IS_PROJECT_VOB and VOB_TAG. Corresponding to these, it defines the methods getBranchTypeList, getIsProjectVob and getVobTag.

The HCL CM API uses the following naming convention for PropertyName fields and the corresponding get and set methods for the property value. For a given PropertyName XXXXX_YYY_ZZZZZ (for example, DISPLAY_NAME):
  • The get method for the property is getXxxxxYyyZzzzz (for example, getDisplayName or getComment).
  • The set method for the property is setXxxxxYyyZzzzz (for example, setDisplayName or setComment).
For example:
String  displayName =  my_resource.getDisplayName();
String  comment =  my_resource.getComment();

If a set method is not defined, the property cannot be set directly with the HCL VersionVault CM API.

You can also get and set property values with the getProperty and setProperty methods.
  • getXxxxxYyyZzzzz() is equivalent to getProperty(XXXXX_YYY_ZZZZZ). For example, getDisplayName is equivalent to getProperty(DISPLAY_NAME).
  • setXxxxxYyyZzzzz(val) is equivalent to setProperty(XXXXX_YYY_ZZZZZ, val). For example, setDisplayName(val) is equivalent to setProperty(DISPLAY_NAME, val)

For more information, see Additional information about properties.