From: YuanHu Date: Mon, 19 Mar 2018 08:41:15 +0000 (+0800) Subject: Save Workflow Artifact to SDC. X-Git-Tag: v1.1.0~64 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=43bed0e28512332aecc3b70f9e24840682c59e92;p=sdc%2Fsdc-workflow-designer.git Save Workflow Artifact to SDC. Get SDC Serive Proxy Information from conf file. Call rest api to save workflow artifact to SDC Issue-ID: SDC-1004 Change-Id: I620674def79bdfb9fd71aebc96d0774bc7dfddd8 Signed-off-by: YuanHu --- diff --git a/distribution/src/main/assembly/conf/workflow-designer.yml b/distribution/src/main/assembly/conf/workflow-designer.yml index 2e8409a9..b8242075 100644 --- a/distribution/src/main/assembly/conf/workflow-designer.yml +++ b/distribution/src/main/assembly/conf/workflow-designer.yml @@ -16,6 +16,10 @@ defaultName: ${DW_DEFAULT_NAME:-Stranger} msbServerAddr: http://127.0.0.1:80 +sdcServiceProxy: + xEcompInstanceId: workflow + authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU= + # use the simple server factory if you only want to run on a single port server: type: simple diff --git a/sdc-workflow-designer-server/pom.xml b/sdc-workflow-designer-server/pom.xml index 98733c90..b47f8453 100644 --- a/sdc-workflow-designer-server/pom.xml +++ b/sdc-workflow-designer-server/pom.xml @@ -27,6 +27,8 @@ 2.9.1 + 2.2.4 + 5.0 1.7 4.10 1.2.4 @@ -157,6 +159,26 @@ ${jackson.version} + + + com.google.code.gson + gson + ${gson.version} + + + + + com.eclipsesource.jaxrs + consumer + + + com.eclipsesource.jaxrs + jersey-all + + + ${jaxrs.consumer.version} + + org.apache.velocity velocity diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/SDCServiceProxyInfo.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/SDCServiceProxyInfo.java new file mode 100644 index 00000000..5d8b8eaa --- /dev/null +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/SDCServiceProxyInfo.java @@ -0,0 +1,50 @@ +/** + * 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; + +/** + * + */ +public class SDCServiceProxyInfo { + private String xEcompInstanceId; + + private String authorization; + + /** + * @return the xEcompInstanceId + */ + public String getxEcompInstanceId() { + return xEcompInstanceId; + } + + /** + * @param xEcompInstanceId the xEcompInstanceId to set + */ + public void setxEcompInstanceId(String xEcompInstanceId) { + this.xEcompInstanceId = xEcompInstanceId; + } + + /** + * @return the authorization + */ + public String getAuthorization() { + return authorization; + } + + /** + * @param authorization the authorization to set + */ + public void setAuthorization(String authorization) { + this.authorization = authorization; + } + +} diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/WorkflowDesignerApp.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/WorkflowDesignerApp.java index e2ec2711..ba0fcd72 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/WorkflowDesignerApp.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/WorkflowDesignerApp.java @@ -30,7 +30,6 @@ import io.swagger.jaxrs.config.BeanConfig; import io.swagger.jaxrs.listing.ApiListingResource; public class WorkflowDesignerApp extends Application { - private static final Logger LOGGER = LoggerFactory.getLogger(WorkflowDesignerApp.class); public static void main(String[] args) throws Exception { @@ -55,6 +54,7 @@ public class WorkflowDesignerApp extends Application