本文整理汇总了Java中com.baidu.disconf.client.common.model.DisconfCenterFile.setFileName方法的典型用法代码示例。如果您正苦于以下问题:Java DisconfCenterFile.setFileName方法的具体用法?Java DisconfCenterFile.setFileName怎么用?Java DisconfCenterFile.setFileName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.baidu.disconf.client.common.model.DisconfCenterFile
的用法示例。
在下文中一共展示了DisconfCenterFile.setFileName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDisconfCenterFile
import com.baidu.disconf.client.common.model.DisconfCenterFile; //导入方法依赖的package包/类
/**
*
*/
public static DisconfCenterBaseModel getDisconfCenterFile(String fileName) {
DisconfCenterFile disconfCenterFile = new DisconfCenterFile();
fileName = fileName.trim();
//
// file name
disconfCenterFile.setFileName(fileName);
// file type
disconfCenterFile.setSupportFileTypeEnum(SupportFileTypeEnum.getByFileName(fileName));
//
// disConfCommonModel
DisConfCommonModel disConfCommonModel = makeDisConfCommonModel(DisClientConfigExt.GLOBAL_APP, "", DisClientConfigExt.GLOBAL_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);
return disconfCenterFile;
}
示例2: getDisconfCenterFile
import com.baidu.disconf.client.common.model.DisconfCenterFile; //导入方法依赖的package包/类
/**
*
*/
public static DisconfCenterBaseModel getDisconfCenterFile(String fileName) {
DisconfCenterFile disconfCenterFile = new DisconfCenterFile();
fileName = fileName.trim();
//
// file name
disconfCenterFile.setFileName(fileName);
// 非注解式
disconfCenterFile.setIsTaggedWithNonAnnotationFile(true);
// file type
disconfCenterFile.setSupportFileTypeEnum(SupportFileTypeEnum.getByFileName(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);
return disconfCenterFile;
}