Package com.baidu.disconf.client.common.model

Examples of com.baidu.disconf.client.common.model.DisConfCommonModel


            disconfCenterItem.setValue(null);
        }

        //
        // disConfCommonModel
        DisConfCommonModel disConfCommonModel = makeDisConfCommonModel(
                disconfItem.env(), disconfItem.version());
        disconfCenterItem.setDisConfCommonModel(disConfCommonModel);

        // Disconf-web url
        String url = DisconfWebPathMgr.getRemoteUrlParameter(
                DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,
                disConfCommonModel.getApp(), disConfCommonModel.getVersion(),
                disConfCommonModel.getEnv(), key, DisConfigTypeEnum.ITEM);
        disconfCenterItem.setRemoteServerUrl(url);

        return disconfCenterItem;
    }
View Full Code Here


            // file name
            disconfCenterFile.setFileName(fileName);

            //
            // disConfCommonModel
            DisConfCommonModel disConfCommonModel = makeDisConfCommonModel("",
                    "");
            disconfCenterFile.setDisConfCommonModel(disConfCommonModel);

            // Remote URL
            String url = DisconfWebPathMgr.getRemoteUrlParameter(
                    DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,
                    disConfCommonModel.getApp(),
                    disConfCommonModel.getVersion(),
                    disConfCommonModel.getEnv(),
                    disconfCenterFile.getFileName(), DisConfigTypeEnum.FILE);
            disconfCenterFile.setRemoteServerUrl(url);

            disconfCenterFiles.add(disconfCenterFile);
        }
View Full Code Here

        //
        // Watch
        //
        if (watchMgr != null) {
            DisConfCommonModel disConfCommonModel = disconfStoreProcessor
                    .getCommonModel(keyName);
            watchMgr.watchPath(this, disConfCommonModel, keyName,
                    DisConfigTypeEnum.ITEM, value);
            LOGGER.debug("watch ok.");
        } else {
View Full Code Here

        // file name
        disconfCenterFile.setFileName(disconfFileAnnotation.filename());

        //
        // disConfCommonModel
        DisConfCommonModel disConfCommonModel = makeDisConfCommonModel(
                disconfFileAnnotation.env(), disconfFileAnnotation.version());
        disconfCenterFile.setDisConfCommonModel(disConfCommonModel);

        // Remote URL
        String url = DisconfWebPathMgr.getRemoteUrlParameter(
                DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,
                disConfCommonModel.getApp(), disConfCommonModel.getVersion(),
                disConfCommonModel.getEnv(), disconfCenterFile.getFileName(),
                DisConfigTypeEnum.FILE);
        disconfCenterFile.setRemoteServerUrl(url);

        // fields
        Field[] expectedFields = disconfFileClass.getDeclaredFields();
View Full Code Here

     * @return
     */
    protected static DisConfCommonModel makeDisConfCommonModel(String env,
            String version) {

        DisConfCommonModel disConfCommonModel = new DisConfCommonModel();

        // app
        disConfCommonModel.setApp(DisClientConfig.getInstance().APP);

        // env
        if (!env.isEmpty()) {
            disConfCommonModel.setEnv(env);
        } else {
            disConfCommonModel.setEnv(DisClientConfig.getInstance().ENV);
        }

        // version
        if (!version.isEmpty()) {
            disConfCommonModel.setVersion(version);
        } else {
            disConfCommonModel
                    .setVersion(DisClientConfig.getInstance().VERSION);
        }

        return disConfCommonModel;
    }
View Full Code Here

        LOGGER.debug("inject ok.");

        //
        // Watch
        //
        DisConfCommonModel disConfCommonModel = disconfStoreProcessor
                .getCommonModel(fileName);
        if (watchMgr != null) {
            watchMgr.watchPath(this, disConfCommonModel, fileName,
                    DisConfigTypeEnum.FILE,
                    GsonUtils.toJson(disconfCenterFile.getKV()));
View Full Code Here

        // file name
        disconfCenterFile.setFileName(disconfFileAnnotation.filename());

        //
        // disConfCommonModel
        DisConfCommonModel disConfCommonModel = makeDisConfCommonModel(
                disconfFileAnnotation.env(), disconfFileAnnotation.version(),
                disconfFileAnnotation.filename());
        disconfCenterFile.setDisConfCommonModel(disConfCommonModel);

        // Remote URL
        String url = DisconfWebPathMgr.getRemoteUrlParameter(
                DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,
                disConfCommonModel.getApp(), disConfCommonModel.getVersion(),
                disConfCommonModel.getEnv(), disconfCenterFile.getFileName(),
                DisConfigTypeEnum.FILE);
        disconfCenterFile.setRemoteServerUrl(url);

        // fields
        Field[] expectedFields = disconfFileClass.getDeclaredFields();
View Full Code Here

     * @return
     */
    private static DisConfCommonModel makeDisConfCommonModel(String env,
            String version, String fileName) {

        DisConfCommonModel disConfCommonModel = new DisConfCommonModel();

        // app
        disConfCommonModel.setApp(DisClientConfig.getInstance().APP);

        // env
        if (!env.isEmpty()) {
            disConfCommonModel.setEnv(env);
        } else {
            disConfCommonModel.setEnv(DisClientConfig.getInstance().ENV);
        }

        // version
        if (!version.isEmpty()) {
            disConfCommonModel.setVersion(version);
        } else {
            disConfCommonModel
                    .setVersion(DisClientConfig.getInstance().VERSION);
        }

        return disConfCommonModel;
    }
View Full Code Here

            disconfCenterItem.setValue(null);
        }

        //
        // disConfCommonModel
        DisConfCommonModel disConfCommonModel = makeDisConfCommonModel(
                disconfItem.env(), disconfItem.version(), key);
        disconfCenterItem.setDisConfCommonModel(disConfCommonModel);

        // Disconf-web url
        String url = DisconfWebPathMgr.getRemoteUrlParameter(
                DisClientSysConfig.getInstance().CONF_SERVER_STORE_ACTION,
                disConfCommonModel.getApp(), disConfCommonModel.getVersion(),
                disConfCommonModel.getEnv(), key, DisConfigTypeEnum.ITEM);
        disconfCenterItem.setRemoteServerUrl(url);

        return disconfCenterItem;
    }
View Full Code Here

        LOGGER.debug("inject ok.");

        //
        // Watch
        //
        DisConfCommonModel disConfCommonModel = disconfStoreProcessor
                .getCommonModel(fileName);
        if (watchMgr != null) {
            watchMgr.watchPath(this, disConfCommonModel, fileName,
                    DisConfigTypeEnum.FILE,
                    GsonUtils.toJson(disconfCenterFile.getKV()));
View Full Code Here

TOP

Related Classes of com.baidu.disconf.client.common.model.DisConfCommonModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.