- log.info("Creating Tosca Records and storing into SDC Artifacs");
- String[] docs = {"Tosca", "Yang"};
- ArtifactHandlerProviderUtil ahpUtil = new ArtifactHandlerProviderUtil();
- String PDFileContents = document_information.getString(ARTIFACT_CONTENTS);
-
- // Tosca generation
- OutputStream toscaStream = new ByteArrayOutputStream();
- String toscaContents = null;
- ArtifactProcessorImpl toscaGenerator = new ArtifactProcessorImpl();
- toscaGenerator.generateArtifact(PDFileContents, toscaStream);
- toscaContents = toscaStream.toString();
- log.info("Generated Tosca File : " + toscaContents);
-
- String yangContents = "YANG generation is in Progress";
- String yangName = null;
-
- for (String doc : docs) {
- document_information.put(ARTIFACT_TYPE, doc.concat("Type"));
- document_information.put(ARTIFACT_DESRIPTION, doc.concat("Model"));
- if (doc.equals("Tosca"))
- document_information.put(ARTIFACT_CONTENTS,
+ try {
+ log.info("Creating Tosca Records and storing into SDC Artifacs");
+ String[] docs = {"Tosca", "Yang"};
+ ArtifactHandlerProviderUtil ahpUtil = new ArtifactHandlerProviderUtil();
+ String PDFileContents = document_information.getString(ARTIFACT_CONTENTS);
+
+ // Tosca generation
+ OutputStream toscaStream = new ByteArrayOutputStream();
+ String toscaContents = null;
+ ArtifactProcessorImpl toscaGenerator = new ArtifactProcessorImpl();
+ toscaGenerator.generateArtifact(PDFileContents, toscaStream);
+ toscaContents = toscaStream.toString();
+ log.info("Generated Tosca File : " + toscaContents);
+
+ String yangContents = "YANG generation is in Progress";
+ String yangName = null;
+
+ for (String doc : docs) {
+ document_information.put(ARTIFACT_TYPE, doc.concat("Type"));
+ document_information.put(ARTIFACT_DESRIPTION, doc.concat("Model"));
+ if (doc.equals("Tosca")) {
+ document_information.put(ARTIFACT_CONTENTS,