Feedback オブジェクト

WVCM Feedback オブジェクトは、サーバーとの対話中に、 サーバーに追加のフィードバックを要求するための構造です。 PropertyRequest は、Feedback のインスタンスの 1 つです。DetailedFeedback も インスタンスの 1 つであり、サーバーとの一度の対話で、複数リソースの特定のプロパティを 取得できるようにします。

ほぼすべての do メソッドが、Feedback 引数を受け入れます。 操作が実行されると、DetailedFeedback オブジェクトは、DetailedFeedback オブジェクトが 要求するプロパティ値が入ったリソース プロキシを渡されます。 例を次に示します。
final ResourceList<Resource> modified = provider.resourceList();
    // Write properties from the current dialog tab 
    // and fetch the properties for the "newTab"
    Feedback request = new DetailedFeedback() {
        public PropertyRequest getPropertyRequestForModified()
            {
                return DISPLAY_PROPERTIES_FOR_SIDE_EFFECTS;
            }
        public PropertyRequest getPropertyRequestForResult()
            {
                return computePropertiesNeededForTab(newTab);
            }
            public boolean isAbortRequested()
            {
                return false;
            }
            public void notifyActive(String message)
            {
            }
            public void notifyIsModified(Resource resource)
            {
                modified.add(record);
            }
            public void notifyPercentComplete(int percentComplete)
            {
            }
};
    CqRecord newTab = (CqRecord)record.doWriteProperties(request);

    // Update display to reflect side-effects of the operation
    RefreshDisplay(modified);
    if (isEmpty(record.updatedPropertyNameList())) {
        // All fields were written, so proceed to next tab...
        record = newTab;
        // setup the new tab...
    } else {
        // Report failures and stay on the old tab
    }

フィードバック