Reading properties
// create a PropertyRequest requesting the specified
// property names
PropertyRequest wantedProps = new PropertyRequest(Resource.DISPLAY_NAME, Resource.COMMENT);
// you must call doReadProperties to retrieve the properties
// through the proxy
my_resource = my_resource.doReadProperties(wantedProps);
// work with the properties
// for example, get and set values for these properties
// ...
The response from the server is returned through the API back to the client application as a new proxy that contains the requested properties. The property values obtained by the doReadProperties method are stored in the proxy it returns.
After a proxy is populated with properties, the value of these
properties can be extracted from the proxy by using either a PropertyName
object or the access method defined by the proxy class for the property.
The API provides getPropertyName
methods
for each statically-defined property, to get its value from a proxy.
See Naming convention for get and set property value methods for more information.