Get Icon Data of Extend Activity. 77/38777/1
authorYuanHu <yuan.hu1@zte.com.cn>
Tue, 27 Mar 2018 02:31:30 +0000 (10:31 +0800)
committerYuanHu <yuan.hu1@zte.com.cn>
Tue, 27 Mar 2018 02:31:30 +0000 (10:31 +0800)
Get Icon Data of Extend Activity.

Issue-ID: SDC-1129

Change-Id: I55e46068258e114cea1241285f1cab3e387a09f2
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResource.java
sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java
sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivity.java
sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/IconData.java [new file with mode: 0644]

index 59a6677..82f577b 100644 (file)
@@ -118,7 +118,7 @@ public class WorkflowModelerResource {
       String bpmn = buildBPMN(srcUri, processName);
       String jsonBpmn = insertJson2Bpmn(json, bpmn);
 
-      save2SDC(json, jsonBpmn);
+//      save2SDC(json, jsonBpmn);
       FileCommonUtils.write(WORKFLOW_XML_TEMP_FILE_NAME, jsonBpmn);
 
       return Response.status(Response.Status.OK).entity(json).build();
index d5e4577..5a24662 100644 (file)
@@ -40,7 +40,7 @@ public class Content {
   /**\r
    * @param clazz the clazz to set\r
    */\r
-  public void setClazz(String clazz) {\r
+  public void setClass(String clazz) {\r
     this.clazz = clazz;\r
   }\r
 \r
index 529f43e..30e35c1 100644 (file)
@@ -23,6 +23,8 @@ public class ExtendActivity {
   \r
   private String type;\r
   \r
+  private IconData icon;\r
+  \r
   private Content content;\r
 \r
   /**\r
@@ -53,6 +55,20 @@ public class ExtendActivity {
     this.type = type;\r
   }\r
 \r
+  /**\r
+   * @return the icon\r
+   */\r
+  public IconData getIcon() {\r
+    return icon;\r
+  }\r
+\r
+  /**\r
+   * @param icon the icon to set\r
+   */\r
+  public void setIcon(IconData icon) {\r
+    this.icon = icon;\r
+  }\r
+\r
   /**\r
    * @return the content\r
    */\r
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/IconData.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/IconData.java
new file mode 100644 (file)
index 0000000..b84446f
--- /dev/null
@@ -0,0 +1,68 @@
+/**\r
+ * Copyright (c) 2018 ZTE Corporation.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the Apache License, Version 2.0\r
+ * and the Eclipse Public License v1.0 which both accompany this distribution,\r
+ * and are available at http://www.eclipse.org/legal/epl-v10.html\r
+ * and http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Contributors:\r
+ *     ZTE - initial API and implementation and/or initial documentation\r
+ */\r
+package org.onap.sdc.workflowdesigner.resources.entity;\r
+\r
+/**\r
+ *\r
+ */\r
+public class IconData {\r
+  private String name;\r
+  \r
+  private int width;\r
+  \r
+  private int height;\r
+\r
+  /**\r
+   * @return the name\r
+   */\r
+  public String getName() {\r
+    return name;\r
+  }\r
+\r
+  /**\r
+   * @param name the name to set\r
+   */\r
+  public void setName(String name) {\r
+    this.name = name;\r
+  }\r
+\r
+  /**\r
+   * @return the width\r
+   */\r
+  public int getWidth() {\r
+    return width;\r
+  }\r
+\r
+  /**\r
+   * @param width the width to set\r
+   */\r
+  public void setWidth(int width) {\r
+    this.width = width;\r
+  }\r
+\r
+  /**\r
+   * @return the height\r
+   */\r
+  public int getHeight() {\r
+    return height;\r
+  }\r
+\r
+  /**\r
+   * @param height the height to set\r
+   */\r
+  public void setHeight(int height) {\r
+    this.height = height;\r
+  }\r
+  \r
+  \r
+\r
+}\r