summaryrefslogtreecommitdiffstats
path: root/ECOMP-XACML/src/main
diff options
context:
space:
mode:
authorRavindra Bakkamanthala <rb7147@att.com>2017-05-23 14:56:12 -0400
committerRavindra Bakkamanthala <rb7147@att.com>2017-05-23 16:49:56 -0400
commit87c95be02a8a4d77e165dede90777e811b59dcae (patch)
tree4712199fc3520b530dda0c4d3b074c327df547f2 /ECOMP-XACML/src/main
parent7e547eaa55920dfbc9691eab33bb728395b50cf2 (diff)
Commit includes ControlLoopPolicy API and bugfixes
Change-Id: I3e18bb8b4c31a0d908bb0cff4c85e2a3fb450a63 Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
Diffstat (limited to 'ECOMP-XACML/src/main')
-rw-r--r--ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java16
-rw-r--r--ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPAPPolicy.java6
-rw-r--r--ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDP.java4
-rw-r--r--ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroup.java8
-rw-r--r--ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroupStatus.java24
-rw-r--r--ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPPIPConfig.java2
-rw-r--r--ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPStatus.java14
-rw-r--r--ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pip/engines/aaf/AAFEngine.java8
8 files changed, 41 insertions, 41 deletions
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java
index 951f89110..83ff56ebf 100644
--- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java
+++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java
@@ -155,7 +155,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
this.groups = this.readProperties(this.repository, properties);
} catch (IOException e) {
PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE, e, "StdEngine", "Failed to load properties file");
- this.groups = new HashSet<StdPDPGroup>();
+ this.groups = new HashSet<>();
}
//
// Initialize the default group
@@ -377,7 +377,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
// Add the default PIP configuration.
String list = props.getProperty(XACMLProperties.PROP_PIP_ENGINES);
if (list != null && list.length() > 0) {
- Set<PDPPIPConfig> pipConfigs = new HashSet<PDPPIPConfig>();
+ Set<PDPPIPConfig> pipConfigs = new HashSet<>();
for (String pipID : list.split("[,]")) {
StdPDPPIPConfig config = new StdPDPPIPConfig(pipID, props);
if (config.isConfigured()) {
@@ -561,7 +561,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
//
private Set<StdPDPGroup> readProperties(Path repository, Properties properties) throws PAPException {
- Set<StdPDPGroup> groups = new HashSet<StdPDPGroup>();
+ Set<StdPDPGroup> groups = new HashSet<>();
//
// See if there is a groups property
//
@@ -616,7 +616,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
//
// Iterate our groups
//
- List<String> ids = new ArrayList<String>();
+ List<String> ids = new ArrayList<>();
for (PDPGroup group : this.groups) {
ids.add(group.getId());
properties.setProperty(group.getId() + ".name", (group.getName() == null ? "" : group.getName()));
@@ -624,7 +624,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
//
// Iterate its PDPs
//
- List<String> pdps = new ArrayList<String>();
+ List<String> pdps = new ArrayList<>();
for (PDP pdp : group.getPdps()) {
pdps.add(pdp.getId());
properties.setProperty(pdp.getId() + ".name", (pdp.getName() == null ? "" : pdp.getName()));
@@ -717,7 +717,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
if (group.getPdps().size() == 1) {
pdpList = group.getPdps().iterator().next().getId();
} else if (group.getPdps().size() > 1) {
- Set<String> ids = new HashSet<String>();
+ Set<String> ids = new HashSet<>();
for (PDP pdp : group.getPdps()) {
ids.add(pdp.getId());
}
@@ -792,7 +792,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
@Override
public Set<EcompPDPGroup> getEcompPDPGroups() throws PAPException {
- final Set<EcompPDPGroup> grps = new HashSet<EcompPDPGroup>();
+ final Set<EcompPDPGroup> grps = new HashSet<>();
for (EcompPDPGroup g : this.groups) {
grps.add(g);
}
@@ -978,7 +978,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
}
// The movePDP function will modify the set of PDPs in the group.
// To avoid concurrent modification exceptions we need to duplicate the list before calling that function.
- List<EcompPDP> pdpList = new ArrayList<EcompPDP>();
+ List<EcompPDP> pdpList = new ArrayList<>();
for (EcompPDP pdp : pdps) {
pdpList.add(pdp);
}
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPAPPolicy.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPAPPolicy.java
index 0606daa79..61ba86b8a 100644
--- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPAPPolicy.java
+++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPAPPolicy.java
@@ -35,9 +35,9 @@ public class StdPAPPolicy implements EcompPAPPolicy, Serializable{
private String policyDescription = null;
private String ecompName = null;
private String configName = null;
- private Map<String, String> dyanamicFieldConfigAttributes = new HashMap<String, String>();
- private Map<String, String> dropDownMap = new HashMap<String, String>();
- private Map<String, String> dynamicSettingsMap = new HashMap<String, String>();
+ private Map<String, String> dyanamicFieldConfigAttributes = new HashMap<>();
+ private Map<String, String> dropDownMap = new HashMap<>();
+ private Map<String, String> dynamicSettingsMap = new HashMap<>();
private List<String> dynamicRuleAlgorithmLabels;
private List<String> dynamicRuleAlgorithmCombo;
private List<String> dynamicRuleAlgorithmField1;
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDP.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDP.java
index b8fb59b60..7e3c1e61a 100644
--- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDP.java
+++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDP.java
@@ -47,9 +47,9 @@ public class StdPDP extends StdPDPItemSetChangeNotifier implements EcompPDP, Com
private PDPStatus status = new StdPDPStatus();
- private Set<PDPPolicy> policies = new HashSet<PDPPolicy>();
+ private Set<PDPPolicy> policies = new HashSet<>();
- private Set<PDPPIPConfig> pipConfigs = new HashSet<PDPPIPConfig>();
+ private Set<PDPPIPConfig> pipConfigs = new HashSet<>();
public StdPDP() {
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroup.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroup.java
index 1a52dcb73..b28c04e29 100644
--- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroup.java
+++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroup.java
@@ -72,13 +72,13 @@ public class StdPDPGroup extends StdPDPItemSetChangeNotifier implements EcompPDP
private StdPDPGroupStatus status = new StdPDPGroupStatus(Status.UNKNOWN);
- private Set<EcompPDP> pdps = new HashSet<EcompPDP>();
+ private Set<EcompPDP> pdps = new HashSet<>();
- private Set<PDPPolicy> policies = new HashSet<PDPPolicy>();
+ private Set<PDPPolicy> policies = new HashSet<>();
- private Set<PDPPolicy> selectedPolicies = new HashSet<PDPPolicy>();
+ private Set<PDPPolicy> selectedPolicies = new HashSet<>();
- private Set<PDPPIPConfig> pipConfigs = new HashSet<PDPPIPConfig>();
+ private Set<PDPPIPConfig> pipConfigs = new HashSet<>();
private String operation;
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroupStatus.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroupStatus.java
index dcb1f8fe0..6b248bf69 100644
--- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroupStatus.java
+++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPGroupStatus.java
@@ -33,29 +33,29 @@ public class StdPDPGroupStatus implements PDPGroupStatus {
private Status status = Status.UNKNOWN;
- private Set<String> loadErrors = new HashSet<String>();
+ private Set<String> loadErrors = new HashSet<>();
- private Set<String> loadWarnings = new HashSet<String>();
+ private Set<String> loadWarnings = new HashSet<>();
- private Set<PDPPolicy> loadedPolicies = new HashSet<PDPPolicy>();
+ private Set<PDPPolicy> loadedPolicies = new HashSet<>();
- private Set<PDPPolicy> failedPolicies = new HashSet<PDPPolicy>();
+ private Set<PDPPolicy> failedPolicies = new HashSet<>();
- private Set<PDPPIPConfig> loadedPIPConfigs = new HashSet<PDPPIPConfig>();
+ private Set<PDPPIPConfig> loadedPIPConfigs = new HashSet<>();
- private Set<PDPPIPConfig> failedPIPConfigs = new HashSet<PDPPIPConfig>();
+ private Set<PDPPIPConfig> failedPIPConfigs = new HashSet<>();
- private Set<PDP> inSynchPDPs = new HashSet<PDP>();
+ private Set<PDP> inSynchPDPs = new HashSet<>();
- private Set<PDP> outOfSynchPDPs = new HashSet<PDP>();
+ private Set<PDP> outOfSynchPDPs = new HashSet<>();
- private Set<PDP> failedPDPs = new HashSet<PDP>();
+ private Set<PDP> failedPDPs = new HashSet<>();
- private Set<PDP> updatingPDPs = new HashSet<PDP>();
+ private Set<PDP> updatingPDPs = new HashSet<>();
- private Set<PDP> lastUpdateFailedPDPs = new HashSet<PDP>();
+ private Set<PDP> lastUpdateFailedPDPs = new HashSet<>();
- private Set<PDP> unknownPDPs = new HashSet<PDP>();
+ private Set<PDP> unknownPDPs = new HashSet<>();
// Constructor needed for JSON deserialization
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPPIPConfig.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPPIPConfig.java
index 909f64620..3a609fe07 100644
--- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPPIPConfig.java
+++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPPIPConfig.java
@@ -42,7 +42,7 @@ public class StdPDPPIPConfig implements PDPPIPConfig, Serializable {
private String classname;
- private Map<String,String> config = new HashMap<String, String>();
+ private Map<String,String> config = new HashMap<>();
public StdPDPPIPConfig() {
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPStatus.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPStatus.java
index dc297657a..ddb799964 100644
--- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPStatus.java
+++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdPDPStatus.java
@@ -34,19 +34,19 @@ public class StdPDPStatus implements Serializable, PDPStatus {
private Status status = Status.UNKNOWN;
- private Set<String> loadErrors = new HashSet<String>();
+ private Set<String> loadErrors = new HashSet<>();
- private Set<String> loadWarnings = new HashSet<String>();
+ private Set<String> loadWarnings = new HashSet<>();
- private Set<PDPPolicy> loadedPolicies = new HashSet<PDPPolicy>();
+ private Set<PDPPolicy> loadedPolicies = new HashSet<>();
- private Set<PDPPolicy> loadedRootPolicies = new HashSet<PDPPolicy>();
+ private Set<PDPPolicy> loadedRootPolicies = new HashSet<>();
- private Set<PDPPolicy> failedPolicies = new HashSet<PDPPolicy>();
+ private Set<PDPPolicy> failedPolicies = new HashSet<>();
- private Set<PDPPIPConfig> loadedPIPConfigs = new HashSet<PDPPIPConfig>();
+ private Set<PDPPIPConfig> loadedPIPConfigs = new HashSet<>();
- private Set<PDPPIPConfig> failedPIPConfigs = new HashSet<PDPPIPConfig>();
+ private Set<PDPPIPConfig> failedPIPConfigs = new HashSet<>();
public StdPDPStatus() {
}
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pip/engines/aaf/AAFEngine.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pip/engines/aaf/AAFEngine.java
index 581009d18..e8f9bfcb7 100644
--- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pip/engines/aaf/AAFEngine.java
+++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pip/engines/aaf/AAFEngine.java
@@ -76,7 +76,7 @@ public class AAFEngine extends StdConfigurableEngine {
private static final PIPRequest PIP_REQUEST_INSTANCE = new StdPIPRequest(XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE, new IdentifierImpl("AAF_INSTANCE"), XACML3.ID_DATATYPE_STRING);
private static final PIPRequest PIP_REQUEST_ACTION = new StdPIPRequest(XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE, new IdentifierImpl("AAF_ACTION"), XACML3.ID_DATATYPE_STRING);
- private static final List<PIPRequest> mapRequiredAttributes = new ArrayList<PIPRequest>();
+ private static final List<PIPRequest> mapRequiredAttributes = new ArrayList<>();
static{
mapRequiredAttributes.add(new StdPIPRequest(PIP_REQUEST_UID));
mapRequiredAttributes.add(new StdPIPRequest(PIP_REQUEST_PASS));
@@ -85,7 +85,7 @@ public class AAFEngine extends StdConfigurableEngine {
mapRequiredAttributes.add(new StdPIPRequest(PIP_REQUEST_ACTION));
}
- private static final Map<PIPRequest, String> mapSupportedAttributes = new HashMap<PIPRequest, String>();
+ private static final Map<PIPRequest, String> mapSupportedAttributes = new HashMap<>();
static{
mapSupportedAttributes.put(new StdPIPRequest(XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE, AAF_RESPONSE_ID, XACML3.ID_DATATYPE_STRING), "response");
mapSupportedAttributes.put(new StdPIPRequest(XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE, AAF_RESULT_ID, XACML3.ID_DATATYPE_BOOLEAN), "result");
@@ -251,7 +251,7 @@ public class AAFEngine extends StdConfigurableEngine {
@Override
public Collection<PIPRequest> attributesRequired() {
- List<PIPRequest> attributes = new ArrayList<PIPRequest>();
+ List<PIPRequest> attributes = new ArrayList<>();
for (PIPRequest attribute: mapRequiredAttributes) {
attributes.add(new StdPIPRequest(attribute));
}
@@ -260,7 +260,7 @@ public class AAFEngine extends StdConfigurableEngine {
@Override
public Collection<PIPRequest> attributesProvided() {
- List<PIPRequest> attributes = new ArrayList<PIPRequest>();
+ List<PIPRequest> attributes = new ArrayList<>();
for (PIPRequest attribute : mapSupportedAttributes.keySet()) {
attributes.add(new StdPIPRequest(attribute));
}