cloudcc-cli 1.9.5 → 1.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
+ # ReleaseV1.9.7
2
+ #### Release Date: 2025-3-12
3
+ #### Release Scope: Full
4
+ #### Release Content
5
+ * Optimization
6
+ * add class test.
7
+
8
+ # ReleaseV1.9.6
9
+ #### Release Date: 2025-3-11
10
+ #### Release Scope: Full
11
+ #### Release Content
12
+ * Optimization
13
+ * change triggers function name
14
+
1
15
  # ReleaseV1.9.5
2
16
  #### Release Date: 2025-3-11
3
17
  #### Release Scope: Full
package/core/pom.xml ADDED
@@ -0,0 +1,75 @@
1
+ <project xmlns="http://maven.apache.org/POM/4.0.0"
2
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
+ <modelVersion>4.0.0</modelVersion>
4
+
5
+ <groupId>com.example</groupId>
6
+ <artifactId>my-maven-project</artifactId>
7
+ <version>1.0-SNAPSHOT</version>
8
+
9
+ <dependencies>
10
+ <dependency>
11
+ <groupId>junit</groupId>
12
+ <artifactId>junit</artifactId>
13
+ <version>4.13.2</version>
14
+ <scope>test</scope>
15
+ </dependency>
16
+ <!-- 添加 fastjson 依赖 -->
17
+ <dependency>
18
+ <groupId>com.alibaba</groupId>
19
+ <artifactId>fastjson</artifactId>
20
+ <version>1.2.75</version>
21
+ </dependency>
22
+ <!-- 添加 log4j 依赖 -->
23
+ <dependency>
24
+ <groupId>log4j</groupId>
25
+ <artifactId>log4j</artifactId>
26
+ <version>1.2.17</version>
27
+ </dependency>
28
+ <!-- 添加 org.reflections 依赖 -->
29
+ <dependency>
30
+ <groupId>org.reflections</groupId>
31
+ <artifactId>reflections</artifactId>
32
+ <version>0.9.12</version>
33
+ </dependency>
34
+ <!-- 添加 Jackson 依赖 -->
35
+ <dependency>
36
+ <groupId>com.fasterxml.jackson.core</groupId>
37
+ <artifactId>jackson-databind</artifactId>
38
+ <version>2.13.3</version>
39
+ </dependency>
40
+ <!-- 添加 slf4j 依赖 -->
41
+ <dependency>
42
+ <groupId>org.slf4j</groupId>
43
+ <artifactId>slf4j-api</artifactId>
44
+ <version>1.7.32</version>
45
+ </dependency>
46
+ <dependency>
47
+ <groupId>org.slf4j</groupId>
48
+ <artifactId>slf4j-log4j12</artifactId>
49
+ <version>1.7.32</version>
50
+ </dependency>
51
+ <dependency>
52
+ <groupId>com.cloudcc.core</groupId>
53
+ <artifactId>ccopenapi</artifactId>
54
+ <version>0.1</version>
55
+ <scope>system</scope>
56
+ <systemPath>${project.basedir}/libs/ccopenapi.jar</systemPath>
57
+ </dependency>
58
+ </dependencies>
59
+
60
+ <build>
61
+ <sourceDirectory>./classes/demo01</sourceDirectory>
62
+ <testSourceDirectory>./classes/demo01</testSourceDirectory>
63
+ <plugins>
64
+ <plugin>
65
+ <groupId>org.apache.maven.plugins</groupId>
66
+ <artifactId>maven-compiler-plugin</artifactId>
67
+ <version>3.8.1</version>
68
+ <configuration>
69
+ <source>1.8</source>
70
+ <target>1.8</target>
71
+ </configuration>
72
+ </plugin>
73
+ </plugins>
74
+ </build>
75
+ </project>
@@ -0,0 +1,73 @@
1
+ package com.cloudcc.core;
2
+
3
+ import java.util.HashMap;
4
+
5
+ /**
6
+ * CCObject类是系统的核心对象类,继承自HashMap,用于存储和管理云平台对象数据
7
+ * 该类提供了对象API名称和共享状态的设置与获取功能
8
+ */
9
+ public class CCObject extends HashMap<String, Object> {
10
+ /** 对象API名称的键常量 */
11
+ public static final String OBJECT_API = "CCObjectAPI";
12
+ /** 对象共享状态的键常量 */
13
+ public static final String IS_SHARED = "isShared";
14
+ /** 汇总字段的键常量 */
15
+ public static final String SUM = "sum";
16
+
17
+ /**
18
+ * 无参构造函数,创建一个空的CCObject对象
19
+ */
20
+ public CCObject() {
21
+ }
22
+
23
+ /**
24
+ * 带对象API名称的构造函数
25
+ *
26
+ * @param ccobj 对象API名称
27
+ */
28
+ public CCObject(String ccobj) {
29
+ put(OBJECT_API, ccobj);
30
+
31
+ }
32
+
33
+ /**
34
+ * 带对象API名称和共享状态的构造函数
35
+ *
36
+ * @param ccobj 对象API名称
37
+ * @param isShared 共享状态标识
38
+ */
39
+ public CCObject(String ccobj, String isShared) {
40
+ put(OBJECT_API, ccobj);
41
+ put(IS_SHARED, "isShared");
42
+ }
43
+
44
+ /**
45
+ * 存储汇总值
46
+ *
47
+ * @param sumValueKey 汇总值的键名
48
+ * @param value 汇总值
49
+ */
50
+ public void putSumValue(String sumValueKey, String value) {
51
+ put(SUM + sumValueKey, value);
52
+ }
53
+
54
+ /**
55
+ * 获取汇总值
56
+ *
57
+ * @param sumValueKey 汇总值的键名
58
+ * @return 对应键名的汇总值
59
+ */
60
+ public Object getSumValue(String sumValueKey) {
61
+ return get(SUM + sumValueKey);
62
+ }
63
+
64
+ /**
65
+ * 获取对象的API名称
66
+ *
67
+ * @return 对象API名称字符串
68
+ */
69
+ public String getObjectApiName() {
70
+ return (String) get(OBJECT_API);
71
+ }
72
+
73
+ }