aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java2
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java13
-rw-r--r--src/test/java/org/onap/clamp/clds/it/CldsTemplateServiceItCase.java9
3 files changed, 3 insertions, 21 deletions
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index 34bd3d78..a9c81dbb 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -67,13 +67,13 @@ import org.onap.clamp.clds.dao.CldsDao;
import org.onap.clamp.clds.exception.CldsConfigException;
import org.onap.clamp.clds.exception.policy.PolicyClientException;
import org.onap.clamp.clds.exception.sdc.SdcCommunicationException;
-import org.onap.clamp.clds.model.CldsMonitoringDetails;
import org.onap.clamp.clds.model.CldsDbServiceCache;
import org.onap.clamp.clds.model.CldsEvent;
import org.onap.clamp.clds.model.CldsHealthCheck;
import org.onap.clamp.clds.model.CldsInfo;
import org.onap.clamp.clds.model.CldsModel;
import org.onap.clamp.clds.model.CldsModelProp;
+import org.onap.clamp.clds.model.CldsMonitoringDetails;
import org.onap.clamp.clds.model.CldsServiceData;
import org.onap.clamp.clds.model.CldsTemplate;
import org.onap.clamp.clds.model.DcaeEvent;
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java b/src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java
index 1b03922d..7a9ee70e 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java
@@ -38,7 +38,6 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
-import javax.xml.transform.TransformerException;
import org.onap.clamp.clds.dao.CldsDao;
import org.onap.clamp.clds.model.CldsTemplate;
@@ -156,8 +155,7 @@ public class CldsTemplateService extends SecureServiceBase {
@Path("/template/{templateName}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
- public CldsTemplate putTemplate(@PathParam("templateName") String templateName, CldsTemplate cldsTemplate)
- throws TransformerException, IOException {
+ public CldsTemplate putTemplate(@PathParam("templateName") String templateName, CldsTemplate cldsTemplate) {
Date startTime = new Date();
LoggingUtils.setRequestContext("CldsTemplateService: PUT template", getPrincipalName());
isAuthorized(permissionUpdateTemplate);
@@ -166,15 +164,6 @@ public class CldsTemplateService extends SecureServiceBase {
logger.info("PUT propText=" + cldsTemplate.getPropText());
logger.info("PUT imageText=" + cldsTemplate.getImageText());
cldsTemplate.setName(templateName);
- String bpmnText = cldsTemplate.getBpmnText();
- String imageText = cldsTemplate.getImageText();
- String propText = cldsTemplate.getPropText();
- cldsTemplate.setBpmnText(bpmnText);
- cldsTemplate.setImageText(imageText);
- cldsTemplate.setPropText(propText);
- logger.info(" bpmnText : " + cldsTemplate.getBpmnText());
- logger.info(" Image Text : " + cldsTemplate.getImageText());
- logger.info(" Prop Text : " + cldsTemplate.getPropText());
cldsTemplate.save(cldsDao, null);
// audit log
LoggingUtils.setTimeContext(startTime, new Date());
diff --git a/src/test/java/org/onap/clamp/clds/it/CldsTemplateServiceItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsTemplateServiceItCase.java
index 1caa637c..be2997a3 100644
--- a/src/test/java/org/onap/clamp/clds/it/CldsTemplateServiceItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/CldsTemplateServiceItCase.java
@@ -35,7 +35,6 @@ import java.security.Principal;
import java.util.List;
import javax.ws.rs.core.SecurityContext;
-import javax.xml.transform.TransformerException;
import org.junit.Before;
import org.junit.Test;
@@ -93,13 +92,7 @@ public class CldsTemplateServiceItCase {
cldsTemplate.setBpmnText(bpmnText);
cldsTemplate.setImageText(imageText);
cldsTemplate.setPropText(bpmnPropText);
- try {
- cldsTemplateService.putTemplate("testModel", cldsTemplate);
- } catch (IOException e) {
- logger.error("IOException while saving template", e);
- } catch (TransformerException ex) {
- logger.error("Transforming exception while saving template.", ex);
- }
+ cldsTemplateService.putTemplate("testModel", cldsTemplate);
}
@Test