|
@@ -5,9 +5,7 @@ import com.persagy.adm.diagram.core.model.base.Container;
|
|
|
import com.persagy.adm.diagram.core.model.base.XY;
|
|
|
import com.persagy.adm.diagram.core.model.template.DiagramTemplate;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Comparator;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* 系统图
|
|
@@ -72,6 +70,11 @@ public class Diagram {
|
|
|
@Expose
|
|
|
private String state;
|
|
|
|
|
|
+ /**
|
|
|
+ * 其他字段信息
|
|
|
+ */
|
|
|
+ @Expose(serialize = false)
|
|
|
+ private Map<String, Object> extraProps;
|
|
|
|
|
|
/**
|
|
|
* 节点列表
|
|
@@ -242,6 +245,20 @@ public class Diagram {
|
|
|
this.state = state;
|
|
|
}
|
|
|
|
|
|
+ public Object getExtraProp(String propName) {
|
|
|
+ return extraProps != null ? extraProps.get(propName) : null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setExtraProp(String propName, Object propValue) {
|
|
|
+ if(extraProps == null)
|
|
|
+ extraProps = new HashMap<>();
|
|
|
+
|
|
|
+ if(propValue != null)
|
|
|
+ extraProps.put(propName, propValue);
|
|
|
+ else
|
|
|
+ extraProps.remove(propName);
|
|
|
+ }
|
|
|
+
|
|
|
public DiagramTemplate getTemplate() {
|
|
|
return template;
|
|
|
}
|