From 7e6405c9f6b060a517ac11be307853024d3d4426 Mon Sep 17 00:00:00 2001 From: YuanHu Date: Tue, 27 Mar 2018 10:31:30 +0800 Subject: [PATCH] Get Icon Data of Extend Activity. Get Icon Data of Extend Activity. Issue-ID: SDC-1129 Change-Id: I55e46068258e114cea1241285f1cab3e387a09f2 Signed-off-by: YuanHu --- .../resources/WorkflowModelerResource.java | 2 +- .../workflowdesigner/resources/entity/Content.java | 2 +- .../resources/entity/ExtendActivity.java | 16 +++++ .../resources/entity/IconData.java | 68 ++++++++++++++++++++++ 4 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/IconData.java diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResource.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResource.java index 59a6677d..82f577b3 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResource.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/WorkflowModelerResource.java @@ -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(); diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java index d5e45774..5a246624 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/Content.java @@ -40,7 +40,7 @@ public class Content { /** * @param clazz the clazz to set */ - public void setClazz(String clazz) { + public void setClass(String clazz) { this.clazz = clazz; } diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivity.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivity.java index 529f43e9..30e35c13 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivity.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtendActivity.java @@ -23,6 +23,8 @@ public class ExtendActivity { private String type; + private IconData icon; + private Content content; /** @@ -53,6 +55,20 @@ public class ExtendActivity { this.type = type; } + /** + * @return the icon + */ + public IconData getIcon() { + return icon; + } + + /** + * @param icon the icon to set + */ + public void setIcon(IconData icon) { + this.icon = icon; + } + /** * @return the content */ 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 index 00000000..b84446fc --- /dev/null +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/IconData.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2018 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the Apache License, Version 2.0 + * and the Eclipse Public License v1.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ +package org.onap.sdc.workflowdesigner.resources.entity; + +/** + * + */ +public class IconData { + private String name; + + private int width; + + private int height; + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the width + */ + public int getWidth() { + return width; + } + + /** + * @param width the width to set + */ + public void setWidth(int width) { + this.width = width; + } + + /** + * @return the height + */ + public int getHeight() { + return height; + } + + /** + * @param height the height to set + */ + public void setHeight(int height) { + this.height = height; + } + + + +} -- 2.16.6