Setting up a property request

A HCL Compass CM API client application must first get a proxy to a resource before it can read or update properties.

Before a client can access properties from a proxy it must read those properties from the resource into a proxy. The client application must include the name of the properties in a property request when reading them from the resource into a proxy. For example:
// Create a PropertyRequest - specify the names of 
// properties wanted from the resource. 
PropertyRequest myPropList1 =
  new PropertyRequest(Resource.COMMENT,
For a specific resource interface, you can specify properties defined in the interface itself or any of the interfaces it extends. For example, for a HCL Compass query you can specify properties that are defined in the CqQuery interface, the CqContextResource interface, the CqResource interface, the StpResource interface, or the Resource interface:
PropertyRequest myPropListr =
     new PropertyRequest(StpResource.USER_FRIENDLY_LOCATION, 
                // include properties specific to the Query 

After you include the property names in a PropertyRequest, you can pass this request to the doReadProperties() method of the Resource proxy to read the specified properties.