package org.onap.policy.controller;
-
import com.att.research.xacml.util.XACMLProperties;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
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;
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;
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;
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;
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 {
return object;
}
-
public JSONObject convertToArrayElement(JSONObject json, String keyValue) {
return convertToArrayElement(json, new HashSet<>(), keyValue);
}
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 {
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) {
return map;
}
-
/**
* Read file.
*
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 {
}
+@Getter
+@Setter
class DCAEMicroServiceObject {
private String service;
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;
- }
-
}