2025-06-23 10:41:33 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include "CommonDataPublic.h"
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
namespace DBPlatformSpace
|
|
|
|
|
{
|
|
|
|
|
class DBPService;
|
|
|
|
|
class DBPSession;
|
|
|
|
|
class MetaDataManager;
|
|
|
|
|
class InstanceDataManager;
|
|
|
|
|
class LogManager;
|
|
|
|
|
|
|
|
|
|
#define M_DPS_VERSION 3
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///数据平台初始化类
|
2025-06-23 10:41:33 +08:00
|
|
|
|
class DBPlatformNew
|
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
static DBPService* _spCurrService;
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
static string _sReleaseVersion; ///<(数据平台内部用) 发布版本信息 [5/9/2022 wwu]
|
2025-06-23 10:41:33 +08:00
|
|
|
|
public:
|
2025-06-23 18:01:09 +08:00
|
|
|
|
static MetaDataManager* _spCurrDBPConfigMDM; ///<(数据平台内部用)
|
|
|
|
|
static InstanceDataManager* _spCurrDBPConfigIDM; ///<(数据平台内部用)
|
2025-06-23 10:41:33 +08:00
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
static InstanceDataManager* _spCurrDBPProjectManageIDM; ///<(数据平台内部用)
|
2025-06-23 10:41:33 +08:00
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
static InstanceDataManager* _spCurrWorkDBIDM; ///<(数据平台内部用)
|
2025-06-23 10:41:33 +08:00
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
static string _sPlatformStatus; ///< 平台状态,返回接口执行结果。
|
|
|
|
|
static string _sDefaultProjectTopFolder; ///<(数据平台内部用)
|
2025-06-23 10:41:33 +08:00
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
static string _sXMLTemplatePath; ///<(数据平台内部用)// [5/9/2024 wwu]
|
2025-06-23 10:41:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ODI DBPlatformNew();
|
|
|
|
|
ODI ~DBPlatformNew();
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///以元模型数据文件路径初始化 // [5/3/2022 wwu]
|
2025-06-23 10:41:33 +08:00
|
|
|
|
ODI DBPlatformNew(string dbConfigDBPath);
|
|
|
|
|
void DBPlatformNew_initial();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///设置当前工作db文件
|
2025-06-23 10:41:33 +08:00
|
|
|
|
/**
|
2025-06-23 18:01:09 +08:00
|
|
|
|
* @param [in] dbPath db文件的完整路径
|
|
|
|
|
*@param [in] isAutoUpgrade 设置工作文件的时候,是否自动升级(0不自动;1自动)。默认:自动1。
|
|
|
|
|
* @return 执行状态,状态码+返回信息字符串
|
2025-06-23 10:41:33 +08:00
|
|
|
|
*/
|
|
|
|
|
static ODI ResultMsg setCurrentWorkDB(string dbPath,int isAutoUpgrade= 1);
|
|
|
|
|
static ODI InstanceDataManager* getCurrentWorkDBIDM();
|
|
|
|
|
static ODI string getCurrentWorkDB();
|
|
|
|
|
|
|
|
|
|
//// [9/1/2023 wwu]
|
|
|
|
|
//static ODI ResultMsg getCurrentWorkDBInfo(string &metaProjectGUID, string &metaProjectID, string &metaModelID);
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///设置项目文件夹默认存储总路径
|
2025-06-23 10:41:33 +08:00
|
|
|
|
/**
|
2025-06-23 18:01:09 +08:00
|
|
|
|
* @param [in] folderPath 默认目录完整路径
|
|
|
|
|
* @return 执行状态,状态码+返回信息字符串
|
2025-06-23 10:41:33 +08:00
|
|
|
|
*/
|
|
|
|
|
static ODI ResultMsg setDefaultProjectTopFolder(string folderPath);
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///获取项目文件夹默认存储总路径
|
2025-06-23 10:41:33 +08:00
|
|
|
|
/**
|
2025-06-23 18:01:09 +08:00
|
|
|
|
* @return 路径字符串
|
2025-06-23 10:41:33 +08:00
|
|
|
|
*/
|
|
|
|
|
static ODI string getDefaultProjectTopFolder();
|
|
|
|
|
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///批量提交更新命令(待细化)
|
2025-06-23 10:41:33 +08:00
|
|
|
|
/**
|
2025-06-23 18:01:09 +08:00
|
|
|
|
* @return 执行状态,状态码+返回信息字符串
|
2025-06-23 10:41:33 +08:00
|
|
|
|
*/
|
|
|
|
|
static ODI ResultMsg updateCommit();
|
|
|
|
|
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///获取当前数据平台版本信息
|
2025-06-23 10:41:33 +08:00
|
|
|
|
static ODI string getReleaseVersion();
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///(数据平台内部用)
|
2025-06-23 10:41:33 +08:00
|
|
|
|
static ResultMsg createNewDBP(string modelName, string dbFileName, string location, string desc,int modelType = 0);
|
|
|
|
|
|
|
|
|
|
static ODI LogManager* LOGGER();
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///设置当前元数据db文件(*.dbp)
|
2025-06-23 10:41:33 +08:00
|
|
|
|
/**
|
2025-06-23 18:01:09 +08:00
|
|
|
|
* @param [in] dbPath db文件的完整路径
|
|
|
|
|
* @return 执行状态,状态码+返回信息字符串
|
2025-06-23 10:41:33 +08:00
|
|
|
|
*/
|
|
|
|
|
static ODI ResultMsg setCurrDBPConfigDB(string dbPath);
|
|
|
|
|
|
|
|
|
|
static ODI InstanceDataManager* getCurrDBPConfigIDM();
|
|
|
|
|
|
|
|
|
|
static ODI MetaDataManager* getCurrDBPConfigMDM();
|
|
|
|
|
|
|
|
|
|
static ODI string getCurrentDBPConfigDB();// [8/31/2023 wwu]
|
|
|
|
|
|
|
|
|
|
static ODI string getCurrPlatformStatus(); // [5/3/2022 wwu]
|
|
|
|
|
|
|
|
|
|
static ODI DBPService* getCurrService();// [9/4/2023 wwu]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------
|
2025-06-23 18:01:09 +08:00
|
|
|
|
//[5/9/2024 wwu] XML文件存取相关
|
2025-06-23 10:41:33 +08:00
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///设置XML输入输出格式模板路径
|
2025-06-23 10:41:33 +08:00
|
|
|
|
/**
|
2025-06-23 18:01:09 +08:00
|
|
|
|
* @param [in] xtfilePath XML格式模板文件的完整路径
|
|
|
|
|
* @return 执行状态,状态码+返回信息字符串
|
2025-06-23 10:41:33 +08:00
|
|
|
|
*/
|
|
|
|
|
static ODI ResultMsg setXMLTemplatePath(string xtfilePath);
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///获取XML输入输出格式模板路径
|
2025-06-23 10:41:33 +08:00
|
|
|
|
/**
|
2025-06-23 18:01:09 +08:00
|
|
|
|
* @return XML格式模板文件的完整路径
|
2025-06-23 10:41:33 +08:00
|
|
|
|
*/
|
|
|
|
|
static ODI string getXMLTemplatePath();
|
|
|
|
|
|
|
|
|
|
|
2025-06-23 18:01:09 +08:00
|
|
|
|
///检测工作数据库的版本(*.ccsp/*.dbp)// [4/23/2024 wwu]
|
2025-06-23 10:41:33 +08:00
|
|
|
|
/**
|
2025-06-23 18:01:09 +08:00
|
|
|
|
* @param [in] dbPath dbp文件的完整路径
|
|
|
|
|
* @param [out] versionType dbp文件的版本与组件数据结构版本的比较情况
|
|
|
|
|
* @return 执行状态,状态码+返回信息字符串
|
2025-06-23 10:41:33 +08:00
|
|
|
|
*/
|
2025-06-23 18:01:09 +08:00
|
|
|
|
#define WORKDB_VERSION_H 1 //workDB文件的版本高于当前组件数据结构版本
|
|
|
|
|
#define WORKDB_VERSION_M 2 //workDB文件的版本等于当前组件数据结构版本
|
|
|
|
|
#define WORKDB_VERSION_L 3 //workDB文件的版本低于当前组件数据结构版本
|
2025-06-23 10:41:33 +08:00
|
|
|
|
static ODI ResultMsg CheckWorkDBVersionType(string dbPath, int & versionType);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|