X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-XACML%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fxacml%2Fstd%2Fpap%2FStdPAPPolicy.java;h=a8c59e8926ea74a8d4b0742db5f39f0a169d4eb8;hb=7bb6ef9ad8a483bdac3ff1544cd0910ecebe5a98;hp=56676f38b9f50c86a8882ca2cca1560cfa649b11;hpb=7ea81288603904f0cb6f57936da44d6a3dd521a6;p=policy%2Fengine.git diff --git a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java index 56676f38b..a8c59e892 100644 --- a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java +++ b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-XACML * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 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. @@ -21,7 +21,6 @@ package org.onap.policy.xacml.std.pap; import java.io.Serializable; import java.net.URI; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -36,6 +35,7 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ private String onapName = null; private String configName = null; private Map dyanamicFieldConfigAttributes = new HashMap<>(); + private Map treatments = new HashMap<>(); private Map dropDownMap = new HashMap<>(); private Map dynamicSettingsMap = new HashMap<>(); private List dynamicRuleAlgorithmLabels; @@ -48,7 +48,7 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ private String policyID = null; private String ruleID = null; private String brmsController; - private ArrayList brmsDependency; + private List brmsDependency; private String configType = null; private Boolean editPolicy = false; private Boolean draft = false; @@ -82,7 +82,9 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ public StdPAPPolicy() { - + // + // Default empty constructor + // } //Constructor for sending location when pushing policies @@ -125,8 +127,9 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ } - //Constructor for Create/Update Decision Policies from Admin Console - public StdPAPPolicy(String policyName, String description, String onapName, String providerComboBox, Map attributes, Map settings, + //Constructor for Create/Update Decision Policies + public StdPAPPolicy(String policyName, String description, String onapName, String providerComboBox, + Map attributes, Map settings, Map treatments, List dynamicRuleAlgorithmLabels, List dynamicRuleAlgorithmCombo, List dynamicRuleAlgorithmField1, List dynamicRuleAlgorithmField2, Map dropDownMap, List dynamicVariableList, List dataTypeList, Boolean editPolicy, String domain, int highestVersion) { @@ -147,10 +150,10 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ this.editPolicy = editPolicy; this.domain = domain; this.highestVersion = highestVersion; + this.treatments = treatments; } - //Constructor for Create Config Policies from API and Admin Console //Constructor for Updating Config Policies from the API public StdPAPPolicy(String configPolicyType, String policyName, String description, String onapName, String configName, Map attributes, String configType, @@ -247,7 +250,7 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ public StdPAPPolicy (String configPolicyType, String policyName, String description, String configName, Boolean editPolicy, String domain, Map dyanamicFieldConfigAttributes, Integer highestVersion, String eCompName, - String configBodyData, String riskLevel, String riskType, String guard, String ttlDate, String brmsController, ArrayList brmsDependency) { + String configBodyData, String riskLevel, String riskType, String guard, String ttlDate, String brmsController, List brmsDependency) { this.configPolicyType = configPolicyType; this.policyName = policyName; @@ -271,7 +274,7 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ public StdPAPPolicy (String configPolicyType, String policyName, String description, String configName, Boolean editPolicy, String domain, Map dyanamicFieldConfigAttributes, Integer highestVersion, String eCompName, - String configBodyData,Map drlRuleAndUIParams, String riskLevel, String riskType, String guard, String ttlDate, String brmsController, ArrayList brmsDependency) { + String configBodyData,Map drlRuleAndUIParams, String riskLevel, String riskType, String guard, String ttlDate, String brmsController, List brmsDependency) { this.configPolicyType = configPolicyType; this.policyName = policyName; @@ -674,6 +677,11 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ return guard; } + @Override + public Map getTreatments() { + return treatments; + } + @Override public String toString() { return "StdPAPPolicy [policyName=" + policyName + ", policyDescription=" + policyDescription + ", onapName=" @@ -688,9 +696,10 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ + ",dataTypeList=" + dataTypeList + ",draft=" + ",oldPolicyFileName=" + oldPolicyFileName + ",serviceType=" + serviceType + ",uuid=" + uuid + ",msLocation=" + msLocation + ",priority=" + priority + ",deleteCondition=" + deleteCondition + ",dictionaryType=" + dictionaryType + ",dictionary=" + dictionary + ",dictionaryFields=" + dictionaryFields + ",uuid=" + uuid + ",msLocation=" + msLocation + ",priority=" - + priority + ",deleteCondition=" + deleteCondition + ",riskType="+riskType + ",riskLevel="+riskLevel + ",guard="+ guard + ",ttlDate="+ ttlDate + "]"; + + priority + ",deleteCondition=" + deleteCondition + ",riskType="+riskType + ",riskLevel="+riskLevel + ",guard="+ guard + ",ttlDate="+ ttlDate + + ",treatments=" + treatments + "]"; } - + // Methods needed for JSON Deserialization public void setPolicyName(String policyName) { this.policyName = policyName; @@ -900,11 +909,15 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable{ this.brmsController = brmsController; } - public ArrayList getBrmsDependency() { + public List getBrmsDependency() { return brmsDependency; } - public void setBrmsDependency(ArrayList brmsDependency) { + public void setBrmsDependency(List brmsDependency) { this.brmsDependency = brmsDependency; } -} \ No newline at end of file + + public void setTreatments(Map treatments) { + this.treatments = treatments; + } +}