Additional information about properties

Although some properties are specific to a resource, many properties are common to all resources. From any resource, a client can obtain the following information:

Although these properties are defined for all resources, some resources may return null or empty values for them or provide a PROPERTY_NOT_SUPPORTED_BY_SERVER exception for them.

All properties (except the location) must be explicitly requested from the server before they are available from a proxy.

The Resource class provides generic methods for accessing the property values defined by a proxy by using the PropertyName object for each property. WVCM defines the methods Resource.getProperty(PropertyNameList.PropertyName) and Resource.setProperty(PropertyNameList.PropertyName, Object). The getProperty method throws the exception PropertyException if the proxy does not contain a valid value for the property identified by the PropertyName object.

There is also the Resource.lookupProperty() method for retrieving a property value. If the property value is defined, lookupProperty() returns the same object as getProperty. If the property value is undefined, lookupProperty() returns the exception that is thrown by the getProperty method.

The setProperty, getProperty, and lookupProperty methods do not verify that the PropertyName is defined by the proxy class. Any proxy can be used to interact with any type of resource. Such interactions fail only when they attempt to write or retrieve values for properties that are not defined for the resource addressed by the proxy; the failures occur only when the API Provider attempts to transfer such property values to or from the resource. Note, however, that when constructing a proxy for a given location, the domain of the location must match the domain of the provider from which the proxy is being requested.

Accessing fields of a ClearQuest record

The CqRecord.FieldName class is a subclass of PropertyName used for naming the resource properties that are schema-defined fields of a ClearQuest® record. Note that, as with PropertyName, the type parameter specifies the field's value type.

CqFieldValue and CqHistoryFieldValue are extensions of StpProperty and represent the values of a ClearQuest record field and history field. You can use methods in the CqFieldValue interfaces to work with fields in ClearQuest records.
  • CqFieldValue is the representation for the value of a record field as an extended Property object.
  • CqHistoryFieldValue contains the value of a ClearQuest record history field. The value of this property is a collection of strings, each representing a single event in the lifetime of the record.

You can use these extensions that are specific to ClearQuest records to access fields of a record. For an example, see Nested properties


Feedback