Use lombok for data objects
[policy/engine.git] / POLICY-SDK-APP / src / main / java / org / onap / policy / controller / CreateDcaeMicroServiceController.java
index a8df74a..2b7974d 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.onap.policy.controller;
 
-
 import com.att.research.xacml.util.XACMLProperties;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.DeserializationFeature;
@@ -31,6 +30,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.JsonNodeFactory;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.gson.Gson;
+
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.File;
@@ -59,6 +59,7 @@ import java.util.UUID;
 import java.util.regex.Pattern;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
+
 import javax.json.Json;
 import javax.json.JsonArray;
 import javax.json.JsonArrayBuilder;
@@ -68,6 +69,8 @@ import javax.json.JsonReader;
 import javax.json.JsonValue;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import lombok.Getter;
+import lombok.Setter;
 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType;
@@ -75,6 +78,7 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeValueType;
 import oasis.names.tc.xacml._3_0.core.schema.wd_17.MatchType;
 import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
 import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
+
 import org.apache.commons.compress.utils.IOUtils;
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.fileupload.FileUploadException;
@@ -825,7 +829,8 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
         return jsonResult;
     }
 
-    @RequestMapping(value = {"/policyController/getDCAEMSTemplateData.htm"},
+    @RequestMapping(
+            value = {"/policyController/getDCAEMSTemplateData.htm"},
             method = {org.springframework.web.bind.annotation.RequestMethod.POST})
     public ModelAndView getDCAEMSTemplateData(HttpServletRequest request, HttpServletResponse response)
             throws IOException {
@@ -1042,7 +1047,6 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
         return object;
     }
 
-
     public JSONObject convertToArrayElement(JSONObject json, String keyValue) {
         return convertToArrayElement(json, new HashSet<>(), keyValue);
     }
@@ -1135,8 +1139,8 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
         return keys;
     }
 
-
-    @RequestMapping(value = {"/policyController/getModelServiceVersioneData.htm"},
+    @RequestMapping(
+            value = {"/policyController/getModelServiceVersioneData.htm"},
             method = {org.springframework.web.bind.annotation.RequestMethod.POST})
     public ModelAndView getModelServiceVersionData(HttpServletRequest request, HttpServletResponse response)
             throws IOException {
@@ -1201,7 +1205,8 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
                 modelName);
     }
 
-    @RequestMapping(value = {"/get_DCAEPriorityValues"},
+    @RequestMapping(
+            value = {"/get_DCAEPriorityValues"},
             method = {org.springframework.web.bind.annotation.RequestMethod.GET},
             produces = MediaType.APPLICATION_JSON_VALUE)
     public void getDCAEPriorityValuesData(HttpServletRequest request, HttpServletResponse response) {
@@ -1321,7 +1326,6 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
         return map;
     }
 
-
     /**
      * Read file.
      *
@@ -1448,7 +1452,8 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
         return attribute;
     }
 
-    @RequestMapping(value = {"/ms_dictionary/set_MSModelData"},
+    @RequestMapping(
+            value = {"/ms_dictionary/set_MSModelData"},
             method = {org.springframework.web.bind.annotation.RequestMethod.POST})
     public void SetMSModelData(HttpServletRequest request, HttpServletResponse response)
             throws IOException, FileUploadException {
@@ -1733,6 +1738,8 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
 }
 
 
+@Getter
+@Setter
 class DCAEMicroServiceObject {
 
     private String service;
@@ -1749,128 +1756,5 @@ class DCAEMicroServiceObject {
     private String riskLevel;
     private String guard = null;
     private Object uiContent;
-
-    public String getGuard() {
-        return guard;
-    }
-
-    public void setGuard(String guard) {
-        this.guard = guard;
-    }
-
-    public String getRiskType() {
-        return riskType;
-    }
-
-    public void setRiskType(String riskType) {
-        this.riskType = riskType;
-    }
-
-    public String getRiskLevel() {
-        return riskLevel;
-    }
-
-    public void setRiskLevel(String riskLevel) {
-        this.riskLevel = riskLevel;
-    }
-
-    public String getPolicyScope() {
-        return policyScope;
-    }
-
-    public void setPolicyScope(String policyScope) {
-        this.policyScope = policyScope;
-    }
-
-    public String getPriority() {
-        return priority;
-    }
-
-    public void setPriority(String priority) {
-        this.priority = priority;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
     private Object content;
-
-
-    public String getPolicyName() {
-        return policyName;
-    }
-
-    public void setPolicyName(String policyName) {
-        this.policyName = policyName;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getConfigName() {
-        return configName;
-    }
-
-    public void setConfigName(String configName) {
-        this.configName = configName;
-    }
-
-    public Object getContent() {
-        return content;
-    }
-
-    public void setContent(Object content) {
-        this.content = content;
-    }
-
-    public String getService() {
-        return service;
-    }
-
-    public void setService(String service) {
-        this.service = service;
-    }
-
-    public String getLocation() {
-        return location;
-    }
-
-    public void setLocation(String location) {
-        this.location = location;
-    }
-
-    public String getUuid() {
-        return uuid;
-    }
-
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-
-    public String getTemplateVersion() {
-        return templateVersion;
-    }
-
-    public void setTemplateVersion(String templateVersion) {
-        this.templateVersion = templateVersion;
-    }
-
-    public Object getUiContent() {
-        return uiContent;
-    }
-
-    public void setUiContent(Object uiContent) {
-        this.uiContent = uiContent;
-    }
-
 }