feat: 增强应用和文件API功能

主要更新:
- AppInfo: 添加了icon、os、type等字段的详细文档说明
- AppTypeConstant: 新增应用类型分类工具类,支持按类型、操作系统、分类筛选应用
- Confidential: 实现文件密级管理功能,包括获取密级列表和标密操作
- JHAppApiExecution: 重构getWebSessionUrl方法,改为通过API获取会话URL
- JHFileApiExecution: 新增getConfList和markConf方法支持文件密级功能
- 优化代码格式,规范注释和文档

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
yanlongqi
2025-11-21 18:20:11 +08:00
parent 89a3783e69
commit 69c4037b4b
13 changed files with 328 additions and 80 deletions

View File

@@ -21,20 +21,35 @@ public class JHFileApiExtendExecution implements JHApiExecution {
this.execution = execution;
}
public static String GET_FILE_ENV_PATH = "/appform/ws/api/files/path/{env}";
public FilePath getFileEnvPath(String username, FileEnvType env, FileSystemType type) {
Map<String, Object> params = new HashMap<>(1);
if (StringUtils.isNotBlank(type.getType())) {
params.put("type", type.getType());
}
String url = JHApiClient.getUrl(GET_FILE_ENV_PATH.replace("{env}", env.getEnv()), params);
return execution.get(url, username, new TypeReference<ResponseResult<FilePath>>() {
/**
* 删除作业
*
* @param username 用户名
* @param jobId 作业ID
*/
public void deleteJob(String username, String jobId) {
execution.delete("/appform/ws/api/jobs/" + jobId, username);
}
/**
* 获取集群的应用的CPU核数和排队作业数
*
* @param username 用户名
* @param jobQueue 队列没有要求就填写normal
* @param jobPlatform 作业查询条件type==LINUX64
* @param appName 应用IDcommon_sub
* @return
*/
public JobTooltipDTO getJobTooltipInfo(String username, String jobQueue, String jobPlatform, String appName) {
Map<String, Object> params = new HashMap<>();
params.put("jobQueue", jobQueue);
params.put("jobPlatform", jobPlatform);
params.put("isTestApp", false);
params.put("appName", appName);
String path = JHApiClient.getUrl("/appform/ws/api/jobs/tooltip", params);
return execution.get(path, username, new TypeReference<ResponseResult<JobTooltipDTO>>() {
});
}
public FilePath getFileHomeEnvPath(String username, FileSystemType type) {
return getFileEnvPath(username, FileEnvType.HOME_ENV, type);
}
}