import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import javax.xml.bind.JAXBElement;
PolicyType policy = (PolicyType) policyData;
policyAdapter.setOldPolicyFileName(policyAdapter.getPolicyName());
String policyNameValue = policyAdapter.getPolicyName()
- .substring(policyAdapter.getPolicyName().indexOf("_") + 1);
+ .substring(policyAdapter.getPolicyName().indexOf('_') + 1);
policyAdapter.setPolicyName(policyNameValue);
String description = "";
try {
AttributeValueType attributeValue = (AttributeValueType) attributeAssignmentExpression
.getExpression().getValue();
if (attributeID.equals(PERFORMER_ATTRIBUTEID)) {
- for (String key : performer.keySet()) {
- String keyValue = performer.get(key);
+ for ( Entry<String, String> entry: performer.entrySet()) {
+ String key = entry.getKey();
+ String keyValue = entry.getValue();
if (keyValue.equals(attributeValue.getContent().get(0))) {
policyAdapter.setActionPerformer(key);
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Prepopulating Compound rule algorithm: " + index);
}
- Map<String, String> rule = new HashMap<String, String>();
+ Map<String, String> rule = new HashMap<>();
for (String key : PolicyController.getDropDownMap().keySet()) {
String keyValue = PolicyController.getDropDownMap().get(key);
if (keyValue.equals(actionApply.getFunctionId())) {
}
private void prePopulateRuleAlgorithms(int index, ApplyType actionApply, List<JAXBElement<?>> jaxbActionTypes) {
- Map<String, String> ruleMap = new HashMap<String, String>();
+ Map<String, String> ruleMap = new HashMap<>();
ruleMap.put("id", "A" + (index + 1));
// Populate combo box
Map<String, String> dropDownMap = PolicyController.getDropDownMap();
- for (String key : dropDownMap.keySet()) {
- String keyValue = dropDownMap.get(key);
- if (keyValue.equals(actionApply.getFunctionId())) {
- ruleMap.put("dynamicRuleAlgorithmCombo", key);
+ for ( Entry<String, String> entry : dropDownMap.entrySet()) {
+ if (entry.getValue().equals(actionApply.getFunctionId())) {
+ ruleMap.put("dynamicRuleAlgorithmCombo", entry.getKey());
}
}
// Populate the key and value fields