當前位置: 首頁>>代碼示例>>Java>>正文


Java DisplayerSettings.setUUID方法代碼示例

本文整理匯總了Java中org.dashbuilder.displayer.DisplayerSettings.setUUID方法的典型用法代碼示例。如果您正苦於以下問題:Java DisplayerSettings.setUUID方法的具體用法?Java DisplayerSettings.setUUID怎麽用?Java DisplayerSettings.setUUID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.dashbuilder.displayer.DisplayerSettings的用法示例。


在下文中一共展示了DisplayerSettings.setUUID方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getProto

import org.dashbuilder.displayer.DisplayerSettings; //導入方法依賴的package包/類
public DisplayerSettings getProto(DisplayerType type, DisplayerSubType subType) {
    boolean hasSubproto = subType != null && subprotoMap.containsKey(subType);
    DisplayerSettings proto = hasSubproto ? subprotoMap.get(subType) : prototypeMap.get(type);
    proto = proto.cloneInstance();
    proto.setUUID(uuidGenerator.newUuid());
    if (subType != null) {
        proto.setSubtype(subType);
    }
    return proto;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:11,代碼來源:DisplayerPrototypes.java

示例2: getCloneCommand

import org.dashbuilder.displayer.DisplayerSettings; //導入方法依賴的package包/類
protected Command getCloneCommand() {
    return () -> {
        perspectiveCoordinator.editOn();

        DisplayerSettings clonedSettings = displayerSettings.cloneInstance();
        clonedSettings.setUUID(uuidGenerator.newUuid());
        clonedSettings.setTitle("Copy of " + clonedSettings.getTitle());
        DisplayerEditorPopup displayerEditor = beanManager.lookupBean(DisplayerEditorPopup.class).newInstance();
        displayerEditor.init(clonedSettings);
        displayerEditor.setOnSaveCommand(getSaveCloneCommand(displayerEditor));
        displayerEditor.setOnCloseCommand(getCloseCommand(displayerEditor));
    };
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:14,代碼來源:DisplayerScreenPresenter.java

示例3: fromJsonString

import org.dashbuilder.displayer.DisplayerSettings; //導入方法依賴的package包/類
public DisplayerSettings fromJsonString( String jsonString ) {
    DisplayerSettings ds = new DisplayerSettings();

    if (!isBlank(jsonString)) {

        JsonObject parseResult = Json.parse(jsonString);

        if ( parseResult != null ) {

            // UUID
            ds.setUUID(parseResult.getString(SETTINGS_UUID));
            parseResult.put(SETTINGS_UUID, (String) null);

            // First look if a dataset 'on-the-fly' has been specified
            JsonObject data = parseResult.getObject(DATASET_PREFIX);
            if (data != null) {
                DataSet dataSet = dataSetJsonMarshaller.fromJson(data);
                ds.setDataSet(dataSet);

                // Remove from the json input so that it doesn't end up in the settings map.
                parseResult.put(DATASET_PREFIX, (JsonValue) null);

            // If none was found, look for a dataset lookup definition
            } else if ((data = parseResult.getObject(DATASET_LOOKUP_PREFIX)) != null) {
                DataSetLookup dataSetLookup = dataSetLookupJsonMarshaller.fromJson(data);
                ds.setDataSetLookup(dataSetLookup);

                // Remove from the json input so that it doesn't end up in the settings map.
                parseResult.put(DATASET_LOOKUP_PREFIX, (JsonValue) null);
            }
            else {
                throw new RuntimeException("Displayer settings dataset lookup not specified");
            }

            // Parse the columns settings
            JsonArray columns = parseResult.getArray(COLUMNS_PREFIX);
            if (columns != null) {
                List<ColumnSettings> columnSettingsList = parseColumnsFromJson(columns);
                ds.setColumnSettingsList(columnSettingsList);

                // Remove from the json input so that it doesn't end up in the settings map.
                parseResult.put(COLUMNS_PREFIX, (JsonValue) null);
            }

            // Now parse all other settings
            ds.setSettingsFlatMap( parseSettingsFromJson(parseResult));
        }
    }
    return ds;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:51,代碼來源:DisplayerSettingsJSONMarshaller.java


注:本文中的org.dashbuilder.displayer.DisplayerSettings.setUUID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。