aboutsummaryrefslogtreecommitdiffstats
path: root/deprecated-workflow-designer/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java
diff options
context:
space:
mode:
Diffstat (limited to 'deprecated-workflow-designer/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java')
-rw-r--r--deprecated-workflow-designer/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java64
1 files changed, 0 insertions, 64 deletions
diff --git a/deprecated-workflow-designer/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java b/deprecated-workflow-designer/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java
deleted file mode 100644
index 4b369ff3..00000000
--- a/deprecated-workflow-designer/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Copyright (c) 2017 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.writer;
-
-import java.io.StringWriter;
-
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.Velocity;
-import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.exception.ParseErrorException;
-import org.apache.velocity.exception.ResourceNotFoundException;
-import org.onap.sdc.workflowdesigner.config.Config;
-import org.onap.sdc.workflowdesigner.model.Process;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class BpmnPlanArtefactWriter {
-
- private Process process;
-
- private final static String TEMPLATE_PATH = Config.PROPERTIES.getProperty(Config.TEMPLATE_PATH);
-
- private static Logger log = LoggerFactory.getLogger(BpmnPlanArtefactWriter.class);
-
- public BpmnPlanArtefactWriter(Process process) throws Exception {
- this.process = process;
- Velocity.init();
- }
-
- public String completePlanTemplate() throws ResourceNotFoundException, ParseErrorException, Exception {
- log.debug("Completing BPMN process template...");
-
- VelocityContext context = new VelocityContext();
-
- VelocityEngine ve = new VelocityEngine();
- ve.setProperty("resource.loader", "class");
- ve.setProperty("class.resource.loader.class",
- "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
- Template planTemplate = ve.getTemplate(TEMPLATE_PATH + "bpmn_template.xml");
-
- context.put("process", process);
- context.put("templatePath", TEMPLATE_PATH);
- StringWriter planWriter = new StringWriter();
- planTemplate.merge(context, planWriter);
-
- String bpmnProcessContent = planWriter.toString();
-
- log.debug("Completed BPMN process template" + bpmnProcessContent);
-
- return bpmnProcessContent;
-
- }
-
-}