diff options
author | YuanHu <yuan.hu1@zte.com.cn> | 2018-03-22 14:41:08 +0800 |
---|---|---|
committer | YuanHu <yuan.hu1@zte.com.cn> | 2018-03-22 16:29:02 +0800 |
commit | 3ddd89290adab8deef4d5d1a5c5687dac16b9059 (patch) | |
tree | 1babc99fa636af51c43268ead142f9c94ecbe05d /sdc-workflow-designer-server | |
parent | 27ba2b6f5ce147110912fdd01ba4006924b5e1e6 (diff) |
Code Optimization.
Code Optimization.
Issue-ID: SDC-1079
Change-Id: I118775236dc981fb0ec5564b92d2ae963bda983e
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-server')
5 files changed, 18 insertions, 15 deletions
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 8e8d9a1d..a30a026d 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 @@ -52,7 +52,7 @@ public class WorkflowDesignerApp extends Application<WorkflowDesignerConfigurati @Override public void run(WorkflowDesignerConfiguration configuration, Environment environment) { LOGGER.info("Start to initialize Workflow Designer."); - + AppConfig.setSdcServiceProxy(configuration.getSdcServiceProxy()); environment.jersey().register(new WorkflowModelerResource()); diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResource.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResource.java index d5bbdd4a..bd8a541f 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResource.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResource.java @@ -47,9 +47,10 @@ import io.swagger.annotations.ApiResponses; @Api(tags = {"Workflow Modeler"}) public class ExtendActivityResource { private static final Logger LOGGER = LoggerFactory.getLogger(ExtendActivityResource.class); - + /** */ - private static final String EXT_ACTIVITIES_DISPLAY_INFO_FILE_NAME = "ext-activities-display-info.json"; + private static final String EXT_ACTIVITIES_DISPLAY_INFO_FILE_NAME = + "ext-activities-display-info.json"; private static final String EXT_ACTIVITIES_FILE_NAME = "ext-activities.json"; @@ -62,7 +63,8 @@ public class ExtendActivityResource { @GET @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @ApiOperation(value = "Get Extend Activities.", response = ExtendActivity.class, responseContainer = "List") + @ApiOperation(value = "Get Extend Activities.", response = ExtendActivity.class, + responseContainer = "List") @ApiResponses(value = { @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class), @@ -84,7 +86,7 @@ public class ExtendActivityResource { } /** - * @param sence + * @param sence * @return * @throws IOException */ @@ -92,13 +94,14 @@ public class ExtendActivityResource { String json = FileCommonUtils.readString(EXT_ACTIVITIES_FILE_NAME); return JsonUtils.fromJson(json, ExtendActivity[].class); } - + @Path("/displayInfo") @GET @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @ApiOperation(value = "Get Extend Activities DisplayInfo", response = ExtActivityDisplayInfo.class) + @ApiOperation(value = "Get Extend Activities DisplayInfo", + response = ExtActivityDisplayInfo.class) @ApiResponses(value = { @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class), @@ -118,7 +121,7 @@ public class ExtendActivityResource { } /** - * @param sence + * @param sence * @return * @throws IOException */ 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 4899f7c8..59a6677d 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 @@ -130,7 +130,7 @@ public class WorkflowModelerResource { throw RestUtils.newInternalServerErrorException(e); } } - + /** * @param json * @param bpmn @@ -142,11 +142,11 @@ public class WorkflowModelerResource { return sb.toString(); } - + /** * * @return - * @throws DocumentException + * @throws DocumentException */ protected String readJsonfromBPMNFile(String bpmn) throws DocumentException { Document doc = DocumentHelper.parseText(bpmn); @@ -157,7 +157,7 @@ public class WorkflowModelerResource { return comment.getText().trim(); } } - + return null; } diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/CategoryData.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/CategoryData.java index 1c92120d..bd99ca46 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/CategoryData.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/CategoryData.java @@ -16,7 +16,7 @@ package org.onap.sdc.workflowdesigner.resources.entity; */
public class CategoryData {
private I18nString displayName;
-
+
private boolean collapse;
/**
@@ -46,5 +46,5 @@ public class CategoryData { public void setCollapse(boolean collapse) {
this.collapse = collapse;
}
-
+
}
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtActivityDisplayInfo.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtActivityDisplayInfo.java index 960a65cd..83a77953 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtActivityDisplayInfo.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/resources/entity/ExtActivityDisplayInfo.java @@ -18,7 +18,7 @@ import java.util.Map; */
public class ExtActivityDisplayInfo {
private Map<String, NodeCategory> nodes;
-
+
private Map<String, CategoryData> categoryData;
/**
|