Create SVG in UI
[clamp.git] / src / main / java / org / onap / clamp / loop / template / LoopElementModel.java
index dfdfc42..70cdbe2 100644 (file)
@@ -24,7 +24,6 @@
 package org.onap.clamp.loop.template;
 
 import com.google.gson.annotations.Expose;
-import java.io.IOException;
 import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Set;
@@ -76,11 +75,12 @@ public class LoopElementModel extends AuditEntity implements Serializable {
     @Column(columnDefinition = "MEDIUMTEXT", name = "blueprint_yaml")
     private String blueprint;
 
-    public static String MICRO_SERVICE_TYPE = "MICRO_SERVICE_TYPE";
-    public static String OPERATIONAL_POLICY_TYPE = "OPERATIONAL_POLICY_TYPE";
+    public static final String MICRO_SERVICE_TYPE = "MICRO_SERVICE_TYPE";
+    public static final String OPERATIONAL_POLICY_TYPE = "OPERATIONAL_POLICY_TYPE";
     /**
      * The type of element.
      */
+    @Expose
     @Column(nullable = false, name = "loop_element_type")
     private String loopElementType;
 
@@ -251,16 +251,15 @@ public class LoopElementModel extends AuditEntity implements Serializable {
      * Create a policy instance from the current loop element model.
      *
      * @return A Policy object.
-     * @throws IOException in case of failure when creating an operational policy
      */
-    public Policy createPolicyInstance(Loop loop, ToscaConverterWithDictionarySupport toscaConverter)
-            throws IOException {
+    public Policy createPolicyInstance(Loop loop, ToscaConverterWithDictionarySupport toscaConverter) {
         if (LoopElementModel.MICRO_SERVICE_TYPE.equals(this.getLoopElementType())) {
             return new MicroServicePolicy(loop, loop.getModelService(), this, toscaConverter);
         }
         else if (LoopElementModel.OPERATIONAL_POLICY_TYPE.equals(this.getLoopElementType())) {
             return new OperationalPolicy(loop, loop.getModelService(), this, toscaConverter);
-        } else {
+        }
+        else {
             return null;
         }
     }