+ * 数据服务 配置 + *
+ */ +@Data +@TableName("dataservice_config") +public class DataserviceConfig extends BaseDO { + + private static final long serialVersionUID = 1L; + + @TableField("project_id") + private Long projectId; + + @TableField("`name`") + private String name; + + @TableField("path") + private String path; + + @TableField("method") + private String method; + + @TableField("content_type") + private String contentType; + + @TableField("`status`") + private String status; + + @TableField("parameter_map_id") + private Long parameterMapId; + + @TableField(exist = false) + private DataserviceParameterMap parameterMap; + + @TableField("result_map_id") + private Long resultMapId; + + @TableField(exist = false) + private DataserviceResultMap resultMap; + + @TableField("remark") + private String remark; + +} diff --git a/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/dataservice/DataserviceParameterMap.java b/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/dataservice/DataserviceParameterMap.java new file mode 100644 index 000000000..43f797155 --- /dev/null +++ b/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/dataservice/DataserviceParameterMap.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.sliew.scaleph.dao.entity.master.dataservice; + +import cn.sliew.scaleph.dao.entity.BaseDO; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.util.List; + +/** + *+ * 数据服务 请求参数集 + *
+ */ +@Data +@TableName("dataservice_parameter_map") +public class DataserviceParameterMap extends BaseDO { + + private static final long serialVersionUID = 1L; + + @TableField("project_id") + private Long projectId; + + @TableField("`name`") + private String name; + + @TableField(exist = false) + private List+ * 数据服务 请求参数映射 + *
+ */ +@Data +@TableName("dataservice_parameter_mapping") +@Schema(name = "DataserviceParameterMapping对象", description = "数据服务 请求参数映射") +public class DataserviceParameterMapping extends BaseDO { + + private static final long serialVersionUID = 1L; + + @Schema(description = "请求参数集id") + @TableField("parameter_map_id") + private Long parameterMapId; + + @Schema(description = "属性") + @TableField("property") + private String property; + + @Schema(description = "java 类型") + @TableField("java_type") + private String javaType; + + @Schema(description = "jdbc 类型") + @TableField("jdbc_type") + private String jdbcType; + + @Schema(description = "类型转换器") + @TableField("type_handler") + private String typeHandler; + +} diff --git a/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/dataservice/DataserviceResultMap.java b/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/dataservice/DataserviceResultMap.java new file mode 100644 index 000000000..12ce7d4aa --- /dev/null +++ b/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/dataservice/DataserviceResultMap.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.sliew.scaleph.dao.entity.master.dataservice; + +import cn.sliew.scaleph.dao.entity.BaseDO; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.util.List; + +/** + *+ * 数据服务 返回结果集 + *
+ */ +@Data +@TableName("dataservice_result_map") +public class DataserviceResultMap extends BaseDO { + + private static final long serialVersionUID = 1L; + + @TableField("project_id") + private Long projectId; + + @TableField("`name`") + private String name; + + @TableField(exist = false) + private List+ * 数据服务 返回结果映射 + *
+ */ +@Data +@TableName("dataservice_result_mapping") +@Schema(name = "DataserviceResultMapping对象", description = "数据服务 返回结果映射") +public class DataserviceResultMapping extends BaseDO { + + private static final long serialVersionUID = 1L; + + @Schema(description = "返回结果集id") + @TableField("result_map_id") + private Long resultMapId; + + @Schema(description = "属性") + @TableField("property") + private String property; + + @Schema(description = "java 类型") + @TableField("java_type") + private String javaType; + + @Schema(description = "列") + @TableField("`column`") + private String column; + + @Schema(description = "jdbc 类型") + @TableField("jdbc_type") + private String jdbcType; + + @Schema(description = "类型转换器") + @TableField("type_handler") + private String typeHandler; + +} diff --git a/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/mapper/master/dataservice/DataserviceConfigMapper.java b/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/mapper/master/dataservice/DataserviceConfigMapper.java new file mode 100644 index 000000000..6d896a655 --- /dev/null +++ b/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/mapper/master/dataservice/DataserviceConfigMapper.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.sliew.scaleph.dao.mapper.master.dataservice; + +import cn.sliew.scaleph.dao.entity.master.dataservice.DataserviceConfig; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +/** + *+ * 数据服务 配置 Mapper 接口 + *
+ */ +@Repository +public interface DataserviceConfigMapper extends BaseMapper+ * 数据服务 请求参数集 Mapper 接口 + *
+ */ +@Repository +public interface DataserviceParameterMapMapper extends BaseMapper+ * 数据服务 请求参数映射 Mapper 接口 + *
+ */ +@Repository +public interface DataserviceParameterMappingMapper extends BaseMapper+ * 数据服务 返回结果集 Mapper 接口 + *
+ */ +@Repository +public interface DataserviceResultMapMapper extends BaseMapper+ * 数据服务 返回结果映射 Mapper 接口 + *
+ */ +@Repository +public interface DataserviceResultMappingMapper extends BaseMapper+ * 数据服务 配置 + *
+ */ +@Data +@Schema(name = "DataserviceConfig对象", description = "数据服务 配置") +public class DataserviceConfigDTO extends BaseDTO { + + private static final long serialVersionUID = 1L; + + @Schema(description = "project id") + private Long projectId; + + @Schema(description = "name") + private String name; + + @Schema(description = "uri path") + private String path; + + @Schema(description = "http method") + private String method; + + @Schema(description = "http content type") + private String contentType; + + @Schema(description = "status, disabled or enabled") + private String status; + + @Schema(description = "parameter map") + private DataserviceParameterMapDTO parameterMap; + + @Schema(description = "result map") + private DataserviceResultMapDTO resultMap; + + @Schema(description = "备注") + private String remark; + +} diff --git a/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceParameterMapDTO.java b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceParameterMapDTO.java new file mode 100644 index 000000000..f00c99e40 --- /dev/null +++ b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceParameterMapDTO.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.sliew.scaleph.dataservice.service.dto; + +import cn.sliew.scaleph.system.model.BaseDTO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + *+ * 数据服务 请求参数集 + *
+ */ +@Data +@Schema(name = "DataserviceParameterMap对象", description = "数据服务 请求参数集") +public class DataserviceParameterMapDTO extends BaseDTO { + + private static final long serialVersionUID = 1L; + + @Schema(description = "project id") + private Long projectId; + + @Schema(description = "name") + private String name; + + @Schema(description = "备注") + private String remark; + +} diff --git a/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceParameterMappingDTO.java b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceParameterMappingDTO.java new file mode 100644 index 000000000..c6f8f0cb1 --- /dev/null +++ b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceParameterMappingDTO.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.sliew.scaleph.dataservice.service.dto; + +import cn.sliew.scaleph.dao.entity.BaseDO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + *+ * 数据服务 请求参数映射 + *
+ */ +@Data +@Schema(name = "DataserviceParameterMapping对象", description = "数据服务 请求参数映射") +public class DataserviceParameterMappingDTO extends BaseDO { + + private static final long serialVersionUID = 1L; + + @Schema(description = "请求参数集id") + private Long parameterMapId; + + @Schema(description = "属性") + private String property; + + @Schema(description = "java 类型") + private String javaType; + + @Schema(description = "jdbc 类型") + private String jdbcType; + + @Schema(description = "类型转换器") + private String typeHandler; + +} diff --git a/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceResultMapDTO.java b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceResultMapDTO.java new file mode 100644 index 000000000..c8dbe1df3 --- /dev/null +++ b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceResultMapDTO.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.sliew.scaleph.dataservice.service.dto; + +import cn.sliew.scaleph.system.model.BaseDTO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + *+ * 数据服务 返回结果集 + *
+ */ +@Data +@Schema(name = "DataserviceResultMap对象", description = "数据服务 返回结果集") +public class DataserviceResultMapDTO extends BaseDTO { + + private static final long serialVersionUID = 1L; + + @Schema(description = "project id") + private Long projectId; + + @Schema(description = "name") + private String name; + + @Schema(description = "备注") + private String remark; + +} diff --git a/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceResultMappingDTO.java b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceResultMappingDTO.java new file mode 100644 index 000000000..f94f7be31 --- /dev/null +++ b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/dto/DataserviceResultMappingDTO.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.sliew.scaleph.dataservice.service.dto; + +import cn.sliew.scaleph.dao.entity.BaseDO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + *+ * 数据服务 返回结果映射 + *
+ */ +@Data +@Schema(name = "DataserviceResultMapping对象", description = "数据服务 返回结果映射") +public class DataserviceResultMappingDTO extends BaseDO { + + private static final long serialVersionUID = 1L; + + @Schema(description = "返回结果集id") + private Long resultMapId; + + @Schema(description = "属性") + private String property; + + @Schema(description = "java 类型") + private String javaType; + + @Schema(description = "列") + private String column; + + @Schema(description = "jdbc 类型") + private String jdbcType; + + @Schema(description = "类型转换器") + private String typeHandler; + +} diff --git a/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/impl/DataserviceConfigServiceImpl.java b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/impl/DataserviceConfigServiceImpl.java new file mode 100644 index 000000000..44c4dcbee --- /dev/null +++ b/scaleph-dataservice/src/main/java/cn/sliew/scaleph/dataservice/service/impl/DataserviceConfigServiceImpl.java @@ -0,0 +1,89 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package cn.sliew.scaleph.dataservice.service.impl; + +import cn.sliew.scaleph.common.util.BeanUtil; +import cn.sliew.scaleph.dao.entity.master.dataservice.DataserviceConfig; +import cn.sliew.scaleph.dao.mapper.master.dataservice.DataserviceConfigMapper; +import cn.sliew.scaleph.dataservice.service.DataserviceConfigService; +import cn.sliew.scaleph.dataservice.service.convert.DataserviceConfigConvert; +import cn.sliew.scaleph.dataservice.service.dto.DataserviceConfigDTO; +import cn.sliew.scaleph.dataservice.service.param.DataserviceConfigAddParam; +import cn.sliew.scaleph.dataservice.service.param.DataserviceConfigListParam; +import cn.sliew.scaleph.dataservice.service.param.DataserviceConfigUpdateParam; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import java.util.List; + +import static cn.sliew.milky.common.check.Ensures.checkState; + +@Service +public class DataserviceConfigServiceImpl implements DataserviceConfigService { + + @Autowired + private DataserviceConfigMapper dataserviceConfigMapper; + + @Override + public PageIt can't cancel an Operation if it is terminated. + * + * @param sessionHandle handle to identify the session. + * @param operationHandle handle to identify the operation.JarURLConnection + */ + void cancelOperation(SessionHandle sessionHandle, OperationHandle operationHandle) throws SqlGatewayException; + + /** + * Close the operation and release all used resource by the operation. + * + * @param sessionHandle handle to identify the session. + * @param operationHandle handle to identify the operation. + */ + void closeOperation(SessionHandle sessionHandle, OperationHandle operationHandle) throws SqlGatewayException; + + /** + * Get the {@link OperationInfo} of the operation. + * + * @param sessionHandle handle to identify the session. + * @param operationHandle handle to identify the operation. + */ + OperationInfo getOperationInfo(SessionHandle sessionHandle, OperationHandle operationHandle) throws SqlGatewayException; + + /** + * Get the result schema for the specified Operation. + * + *
Note: The result schema is available when the Operation is in the {@link
+ * OperationStatus#FINISHED}.
+ *
+ * @param sessionHandle handle to identify the session.
+ * @param operationHandle handle to identify the operation.
+ */
+ ResolvedSchema getOperationResultSchema(SessionHandle sessionHandle, OperationHandle operationHandle) throws SqlGatewayException;
+
+}
diff --git a/scaleph-engine/scaleph-engine-sql-gateway/src/main/java/cn/sliew/scaleph/engine/sql/gateway/services/ResultFetcherService.java b/scaleph-engine/scaleph-engine-sql-gateway/src/main/java/cn/sliew/scaleph/engine/sql/gateway/services/ResultFetcherService.java
new file mode 100644
index 000000000..8667cffdb
--- /dev/null
+++ b/scaleph-engine/scaleph-engine-sql-gateway/src/main/java/cn/sliew/scaleph/engine/sql/gateway/services/ResultFetcherService.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package cn.sliew.scaleph.engine.sql.gateway.services;
+
+import org.apache.flink.table.gateway.api.operation.OperationHandle;
+import org.apache.flink.table.gateway.api.results.FetchOrientation;
+import org.apache.flink.table.gateway.api.results.ResultSet;
+import org.apache.flink.table.gateway.api.session.SessionHandle;
+import org.apache.flink.table.gateway.api.utils.SqlGatewayException;
+
+public interface ResultFetcherService {
+
+ /**
+ * Fetch the results from the operation. When maxRows is Integer.MAX_VALUE, it means to fetch
+ * all available data.
+ *
+ * @param sessionHandle handle to identify the session.
+ * @param operationHandle handle to identify the operation.
+ * @param token token to identify results.
+ * @param maxRows max number of rows to fetch.
+ * @return Returns the results.
+ */
+ ResultSet fetchResults(SessionHandle sessionHandle, OperationHandle operationHandle, long token, int maxRows) throws SqlGatewayException;
+
+ /**
+ * Fetch the results from the operation. When maxRows is Integer.MAX_VALUE, it means to fetch
+ * all available data. It promises to return at least one rows if the results is not
+ * end-of-stream.
+ *
+ * @param sessionHandle handle to identify the session.
+ * @param operationHandle handle to identify the operation.
+ * @param orientation orientation to fetch the results.
+ * @param maxRows max number of rows to fetch.
+ * @return Returns the results.
+ */
+ ResultSet fetchResults(SessionHandle sessionHandle, OperationHandle operationHandle, FetchOrientation orientation, int maxRows) throws SqlGatewayException;
+}
diff --git a/scaleph-engine/scaleph-engine-sql-gateway/src/main/java/cn/sliew/scaleph/engine/sql/gateway/services/SessionService.java b/scaleph-engine/scaleph-engine-sql-gateway/src/main/java/cn/sliew/scaleph/engine/sql/gateway/services/SessionService.java
new file mode 100644
index 000000000..9ffa7a75e
--- /dev/null
+++ b/scaleph-engine/scaleph-engine-sql-gateway/src/main/java/cn/sliew/scaleph/engine/sql/gateway/services/SessionService.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package cn.sliew.scaleph.engine.sql.gateway.services;
+
+import org.apache.flink.table.gateway.service.session.Session;
+
+import java.util.Map;
+
+/**
+ * 多级的 session 管理。
+ * 默认配置。scaleph 系统级别
+ * 全局配置。用户全局配置级别
+ * 用户级别。和用户 id 关联 || 项目级别。和项目 id 关联
+ *
+ * SessionContext 中信息分为配置信息和状态信息。配置来自 SessoinEnvironment 和 DefaultContext 类的配置信息
+ * SessionState 和 OperationManager 信息属于状态信息。SessionState 信息可以通过配置信息重建,OperationManager 信息由
+ * OperationService 类管理
+ */
+public interface SessionService {
+
+ // -------------------------------------------------------------------------------------------
+ // Global Session
+ // -------------------------------------------------------------------------------------------
+
+ Map