|
@@ -1,66 +1,75 @@
|
|
package com.persagy.adm.diagram.core;
|
|
package com.persagy.adm.diagram.core;
|
|
|
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
-import com.persagy.adm.diagram.core.model.template.DiagramTemplate;
|
|
|
|
-import com.persagy.adm.diagram.entity.DiagramType;
|
|
|
|
import com.persagy.adm.diagram.core.model.Diagram;
|
|
import com.persagy.adm.diagram.core.model.Diagram;
|
|
import com.persagy.adm.diagram.core.model.legend.Legend;
|
|
import com.persagy.adm.diagram.core.model.legend.Legend;
|
|
|
|
+import com.persagy.adm.diagram.core.model.template.DiagramTemplate;
|
|
|
|
+import com.persagy.adm.diagram.entity.DiagramType;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
* IO策略接口
|
|
* IO策略接口
|
|
|
|
+ *
|
|
* @author zhaoyk
|
|
* @author zhaoyk
|
|
*/
|
|
*/
|
|
public interface DataStrategy {
|
|
public interface DataStrategy {
|
|
|
|
|
|
- String implQualifier = "demo";
|
|
|
|
|
|
+ String implQualifier = "demo";
|
|
|
|
|
|
- List<DiagramType> getDiagramTypes();
|
|
|
|
|
|
+ List<DiagramType> getDiagramTypes();
|
|
|
|
|
|
- //模板
|
|
|
|
- List<DiagramTemplate> getTemplates();
|
|
|
|
|
|
+ //模板
|
|
|
|
+ List<DiagramTemplate> getTemplates();
|
|
|
|
|
|
- List<DiagramTemplate> getTemplates(String diagramType);
|
|
|
|
|
|
+ List<DiagramTemplate> getTemplates(String diagramType);
|
|
|
|
|
|
- DiagramTemplate saveTemplate(DiagramTemplate template);
|
|
|
|
|
|
+ DiagramTemplate saveTemplate(DiagramTemplate template);
|
|
|
|
|
|
- boolean deleteTemplate(String templateId);
|
|
|
|
|
|
+ boolean deleteTemplate(String templateId);
|
|
|
|
|
|
- DiagramTemplate getTemplate(String templateId);
|
|
|
|
|
|
+ DiagramTemplate getTemplate(String templateId);
|
|
|
|
|
|
|
|
|
|
- //图例
|
|
|
|
- List<Legend> getLegends(String systemCode);
|
|
|
|
|
|
+ //图例
|
|
|
|
+ List<Legend> getLegends(String systemCode);
|
|
|
|
|
|
- Legend saveLegend(Legend legend, String systemCode);
|
|
|
|
|
|
+ Legend saveLegend(Legend legend, String systemCode);
|
|
|
|
|
|
- boolean deleteLegend(String legendId, String systemCode);
|
|
|
|
|
|
+ boolean deleteLegend(String legendId, String systemCode);
|
|
|
|
|
|
- Legend getLegend(String legendId, String systemCode);
|
|
|
|
|
|
+ Legend getLegend(String legendId, String systemCode);
|
|
|
|
|
|
- List<Legend> getLegendsForEquipment(String equipmentType);
|
|
|
|
|
|
+ List<Legend> getLegendsForEquipment(String equipmentType);
|
|
|
|
|
|
|
|
|
|
- //系统图
|
|
|
|
- List<Diagram> getDiagrams(String projectId, String systemId, String groupCode);
|
|
|
|
|
|
+ //系统图
|
|
|
|
+ List<Diagram> getDiagrams(String projectId, String systemId, String groupCode);
|
|
|
|
|
|
- List<Diagram> getDiagrams(String diagramType, String projectId, String systemId, String groupCode); //按系统图类型查询
|
|
|
|
|
|
+ List<Diagram> getDiagrams(String diagramType, String projectId, String systemId, String groupCode, String name); //按系统图类型查询
|
|
|
|
|
|
- Diagram saveDiagram(Diagram diagram);
|
|
|
|
|
|
+ Diagram saveDiagram(Diagram diagram);
|
|
|
|
|
|
- boolean deleteDiagram(String diagramId);
|
|
|
|
|
|
+ boolean deleteDiagram(String diagramId);
|
|
|
|
|
|
- Diagram getDiagram(String diagramId);
|
|
|
|
|
|
+ Diagram getDiagram(String diagramId);
|
|
|
|
|
|
|
|
|
|
- //系统图数据
|
|
|
|
- List<ObjectNode> loadObjectsByType(List<String> equipmentTypes, String projectId, String systemId, String groupCode);
|
|
|
|
|
|
+ //系统图数据
|
|
|
|
+ List<ObjectNode> loadObjectsByType(List<String> equipmentTypes, String projectId, String systemId, String groupCode);
|
|
|
|
|
|
- List<ObjectNode> loadRelationsByType(List<String[]> relationTypes, List<String> objectIds, String projectId, String groupCode);
|
|
|
|
|
|
+ List<ObjectNode> loadRelationsByType(List<String[]> relationTypes, List<String> objectIds, String projectId, String groupCode);
|
|
|
|
|
|
- List<ObjectNode> loadObjectsById(List<String> objectIds, String projectId, String groupCode);
|
|
|
|
|
|
+ List<ObjectNode> loadObjectsById(List<String> objectIds, String projectId, String groupCode);
|
|
|
|
|
|
- List<ObjectNode> loadRelationsById(List<String> relationIds, String projectId, String groupCode);
|
|
|
|
|
|
+ List<ObjectNode> loadRelationsById(List<String> relationIds, String projectId, String groupCode);
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取所有系统实例
|
|
|
|
+ *
|
|
|
|
+ * @param projectId 项目id
|
|
|
|
+ * @param groupCode 集团code
|
|
|
|
+ * @return 实例列表
|
|
|
|
+ */
|
|
|
|
+ List<ObjectNode> loadSystemInstance(String projectId, String groupCode);
|
|
}
|
|
}
|