X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ONAP-XACML%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fxacml%2Fstd%2Fpap%2FStdPAPPolicy.java;h=435e3c347d043a4e89f6437def9ea3b43b0dc4dc;hp=264b2b784b2aa335282c7a3f0ebd3e5a5481ac5f;hb=84223fab05c1493df05db20016a83687bdaee975;hpb=6ed1731fa2ce340d745dc2d39ffc6a066f50fbc2 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 264b2b784..435e3c347 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 @@ -3,6 +3,7 @@ * ONAP-XACML * ================================================================================ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Modified Copyright (C) 2018 Samsung Electronics Co., Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -101,16 +102,23 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable { this.configPolicyType = configPolicyType; } - //Constructor for Create Config Policies from API and Admin Console - //Constructor for Updating Config Policies from the API - //convenience constructor + /** + * Constructor for + * Create Config Policies from API and Admin Console + * Updating Config Policies from the API + * Create/Update Action Policies from API + * Create/Update Decision Policies + * @param stdPAPPolicyParams Input params object + */ public StdPAPPolicy(StdPAPPolicyParams stdPAPPolicyParams) { this.configPolicyType=stdPAPPolicyParams.getConfigPolicyType(); this.policyName = stdPAPPolicyParams.getPolicyName(); this.policyDescription = stdPAPPolicyParams.getDescription(); this.onapName = stdPAPPolicyParams.getOnapName(); + this.providerComboBox = stdPAPPolicyParams.getProviderComboBox(); this.configName = stdPAPPolicyParams.getConfigName(); - this.dyanamicFieldConfigAttributes = stdPAPPolicyParams.getAttributes(); + this.dyanamicFieldConfigAttributes = stdPAPPolicyParams.getDyanamicFieldConfigAttributes(); + this.dynamicSettingsMap = stdPAPPolicyParams.getDynamicSettingsMap(); this.configType = stdPAPPolicyParams.getConfigType(); this.configBodyData = stdPAPPolicyParams.getConfigBodyData(); this.editPolicy = stdPAPPolicyParams.getEditPolicy(); @@ -120,55 +128,16 @@ public class StdPAPPolicy implements OnapPAPPolicy, Serializable { this.riskType = stdPAPPolicyParams.getRiskType(); this.guard = stdPAPPolicyParams.getGuard(); this.ttlDate = stdPAPPolicyParams.getTtlDate(); - } - - //Constructor for Create/Update Action Policies from API - public StdPAPPolicy(String policyName, String description, Map attributes, - List dynamicRuleAlgorithmLabels, List dynamicRuleAlgorithmCombo, - List dynamicRuleAlgorithmField1, List dynamicRuleAlgorithmField2, - String actionPerformer, String actionAttribute, Boolean editPolicy, - String domain, int highestVersion) { - - this.policyName = policyName; - this.policyDescription = description; - this.dyanamicFieldConfigAttributes = attributes; - this.dynamicRuleAlgorithmLabels = dynamicRuleAlgorithmLabels; - this.dynamicRuleAlgorithmCombo = dynamicRuleAlgorithmCombo; - this.dynamicRuleAlgorithmField1 = dynamicRuleAlgorithmField1; - this.dynamicRuleAlgorithmField2 = dynamicRuleAlgorithmField2; - this.actionPerformer = actionPerformer; - this.actionAttribute = actionAttribute; - this.editPolicy = editPolicy; - this.domain = domain; - this.highestVersion = highestVersion; - - } - - //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) { - this.policyName = policyName; - this.policyDescription = description; - this.onapName = onapName; - this.setProviderComboBox(providerComboBox); - this.dyanamicFieldConfigAttributes = attributes; - this.dynamicSettingsMap = settings; - this.dynamicRuleAlgorithmLabels = dynamicRuleAlgorithmLabels; - this.dynamicRuleAlgorithmCombo = dynamicRuleAlgorithmCombo; - this.dynamicRuleAlgorithmField1 = dynamicRuleAlgorithmField1; - this.dynamicRuleAlgorithmField2 = dynamicRuleAlgorithmField2; - this.dynamicVariableList = dynamicVariableList; - this.dataTypeList = dataTypeList; - this.dropDownMap = dropDownMap; - this.editPolicy = editPolicy; - this.domain = domain; - this.highestVersion = highestVersion; - this.treatments = treatments; + this.dynamicRuleAlgorithmLabels = stdPAPPolicyParams.getDynamicRuleAlgorithmLabels(); + this.dynamicRuleAlgorithmCombo = stdPAPPolicyParams.getDynamicRuleAlgorithmCombo(); + this.dynamicRuleAlgorithmField1 = stdPAPPolicyParams.getDynamicRuleAlgorithmField1(); + this.dynamicRuleAlgorithmField2 = stdPAPPolicyParams.getDynamicRuleAlgorithmField2(); + this.dynamicVariableList = stdPAPPolicyParams.getDynamicVariableList(); + this.dataTypeList = stdPAPPolicyParams.getDataTypeList(); + this.dropDownMap = stdPAPPolicyParams.getDropDownMap(); + this.actionPerformer = stdPAPPolicyParams.getActionPerformer(); + this.actionAttribute = stdPAPPolicyParams.getActionAttribute(); + this.treatments = stdPAPPolicyParams.getTreatments(); } //convenience constructor