aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-REST/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'ECOMP-REST/src/main/java')
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/PolicyRestAdapter.java56
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/RainyDayParams.java100
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RainyDayTreatments.java118
3 files changed, 273 insertions, 1 deletions
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/PolicyRestAdapter.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/PolicyRestAdapter.java
index 8c54f2a2d..27da724e2 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/PolicyRestAdapter.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/PolicyRestAdapter.java
@@ -127,6 +127,12 @@ public class PolicyRestAdapter {
private String actionDictMethod = null;
private YAMLParams yamlparams;
+ //Rainy Day Decision
+ private RainyDayParams rainyday;
+ private Map<String,String> rainydayMap;
+ private List<String> errorCodeList;
+ private List<String> treatmentList;
+
//MicroSerice
private String serviceType = null;
private String uuid = null;
@@ -150,7 +156,7 @@ public class PolicyRestAdapter {
private String riskLevel;
private String guard = null;
private String ttlDate;
- private Map<String,String> matching;
+ private Map<String,String> matching;
private ArrayList<Object> triggerSignatures;
private ArrayList<Object> symptomSignatures;
@@ -839,4 +845,52 @@ public class PolicyRestAdapter {
public void setYamlparams(YAMLParams yamlparams) {
this.yamlparams = yamlparams;
}
+ /**
+ * @return the rainyday
+ */
+ public RainyDayParams getRainyday() {
+ return rainyday;
+ }
+ /**
+ * @param rainyday the rainyday to set
+ */
+ public void setRainyday(RainyDayParams rainyday) {
+ this.rainyday = rainyday;
+ }
+ /**
+ * @return the errorCodeList
+ */
+ public List<String> getErrorCodeList() {
+ return errorCodeList;
+ }
+ /**
+ * @param errorCodeList the errorCodeList to set
+ */
+ public void setErrorCodeList(List<String> errorCodeList) {
+ this.errorCodeList = errorCodeList;
+ }
+ /**
+ * @return the treatmentList
+ */
+ public List<String> getTreatmentList() {
+ return treatmentList;
+ }
+ /**
+ * @param treatmentList the treatmentList to set
+ */
+ public void setTreatmentList(List<String> treatmentList) {
+ this.treatmentList = treatmentList;
+ }
+ /**
+ * @return the rainydayMap
+ */
+ public Map<String,String> getRainydayMap() {
+ return rainydayMap;
+ }
+ /**
+ * @param rainydayMap the rainydayMap to set
+ */
+ public void setRainydayMap(Map<String,String> rainydayMap) {
+ this.rainydayMap = rainydayMap;
+ }
}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/RainyDayParams.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/RainyDayParams.java
new file mode 100644
index 000000000..8fdcc0ffb
--- /dev/null
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/RainyDayParams.java
@@ -0,0 +1,100 @@
+package org.openecomp.policy.rest.adapter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class RainyDayParams {
+ private String serviceType;
+ private String vnfType;
+ private String bbid;
+ private String workstep;
+ private ArrayList<Object> treatmentTableChoices;
+ private List<String> errorcode;
+ private List<String> treatment;
+
+ /**
+ * @return the serviceType
+ */
+ public String getServiceType() {
+ return serviceType;
+ }
+ /**
+ * @param serviceType the serviceType to set
+ */
+ public void setServiceType(String serviceType) {
+ this.serviceType = serviceType;
+ }
+ /**
+ * @return the vnfType
+ */
+ public String getVnfType() {
+ return vnfType;
+ }
+ /**
+ * @param vnfType the vnfType to set
+ */
+ public void setVnfType(String vnfType) {
+ this.vnfType = vnfType;
+ }
+ /**
+ * @return the workstep
+ */
+ public String getWorkstep() {
+ return workstep;
+ }
+ /**
+ * @param workstep the workstep to set
+ */
+ public void setWorkstep(String workstep) {
+ this.workstep = workstep;
+ }
+ /**
+ * @return the bbid
+ */
+ public String getBbid() {
+ return bbid;
+ }
+ /**
+ * @param bbid the bbid to set
+ */
+ public void setBbid(String bbid) {
+ this.bbid = bbid;
+ }
+ /**
+ * @return the treatmentTableChoices
+ */
+ public ArrayList<Object> getTreatmentTableChoices() {
+ return treatmentTableChoices;
+ }
+ /**
+ * @param treatmentTableChoices the treatmentTableChoices to set
+ */
+ public void setTreatmentTableChoices(ArrayList<Object> treatmentTableChoices) {
+ this.treatmentTableChoices = treatmentTableChoices;
+ }
+ /**
+ * @return the errorcode
+ */
+ public List<String> getErrorcode() {
+ return errorcode;
+ }
+ /**
+ * @param errorcode the errorcode to set
+ */
+ public void setErrorcode(List<String> errorcode) {
+ this.errorcode = errorcode;
+ }
+ /**
+ * @return the treatment
+ */
+ public List<String> getTreatment() {
+ return treatment;
+ }
+ /**
+ * @param treatment the treatment to set
+ */
+ public void setTreatment(List<String> treatment) {
+ this.treatment = treatment;
+ }
+
+}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RainyDayTreatments.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RainyDayTreatments.java
new file mode 100644
index 000000000..7219c7d36
--- /dev/null
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RainyDayTreatments.java
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP-REST
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.policy.rest.jpa;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+import javax.persistence.NamedQuery;
+import javax.persistence.OrderBy;
+import javax.persistence.Table;
+
+import java.io.Serializable;
+
+/**
+ * The persistent class for the RainyDayTreatment database table.
+ *
+ */
+@Entity
+@Table(name="RainyDayTreatments")
+@NamedQuery(name="RainyDayTreatments.findAll", query="SELECT e FROM RainyDayTreatments e")
+public class RainyDayTreatments implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2491410352490381323L;
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ @Column(name="id")
+ private int id;
+
+ @Column(name="bbid", nullable=false, length=255)
+ @OrderBy("asc")
+ private String bbid;
+
+ @Column(name="workstep", nullable=true, length=255)
+ private String workstep;
+
+ @Column(name="treatments", nullable=true, length=1028)
+ private String treatments;
+
+ public RainyDayTreatments() {
+
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ /**
+ * @return the bbid
+ */
+ public String getBbid() {
+ return bbid;
+ }
+
+ /**
+ * @param bbid the bbid to set
+ */
+ public void setBbid(String bbid) {
+ this.bbid = bbid;
+ }
+
+ /**
+ * @return the workstep
+ */
+ public String getWorkstep() {
+ return workstep;
+ }
+
+ /**
+ * @param workstep the workstep to set
+ */
+ public void setWorkstep(String workstep) {
+ this.workstep = workstep;
+ }
+
+ /**
+ * @return the treatments
+ */
+ public String getTreatments() {
+ return treatments;
+ }
+
+ /**
+ * @param treatments the treatments to set
+ */
+ public void setTreatments(String treatments) {
+ this.treatments = treatments;
+ }
+
+
+} \ No newline at end of file