// 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 // ...
サーバーからの応答は、要求されたプロパティが入った新規プロキシとして、ClearQuest® CM API を通してクライアント アプリケーションに返されます。 doReadProperties メソッドが入手したプロパティ値は、メソッドが 返すプロキシ内に保管されます。
プロキシにプロパティが設定されると、PropertyName オブジェクトかプロパティのプロキシ クラスで定義されている アクセス メソッドのいずれかを使用することで、それらのプロパティの値を プロキシから抽出できます。API には、静的に定義される各プロパティに対し、プロキシから値を取得するための getPropertyName メソッドが用意されています。 詳しくは、プロパティ値の get メソッドと set メソッドの命名規則を参照してください。