Setting up a property request
A VersionVault CM API client
application must acquire 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,
Resource.CONTENT_LENGTH,
Resource.CONTENT_TYPE,
Resource.CREATOR_DISPLAY_NAME,
Resource.DISPLAY_NAME);
For a specific resource interface, you can specify properties defined
in the interface itself or any of the interfaces it extends. For example,
PropertyRequest myPropRequest =
new PropertyRequest(StpResource.USER_FRIENDLY_LOCATION,
Resource.DISPLAY_NAME,
// include properties specific to versions
CcVersion.BRANCH,
CcVersion.ELEMENT.
// properties inherited from parents
Version.LABEL_NAME_LIST,
CcVobResource.VOB};
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.