aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-REST/src
diff options
context:
space:
mode:
Diffstat (limited to 'ECOMP-REST/src')
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java14
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/IdMap.java42
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceGroupJson.java20
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java14
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/TermCollector.java196
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/VendorSpecificData.java38
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java4
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java2
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java12
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java6
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSAttributeObject.java10
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSModelUtils.java34
12 files changed, 244 insertions, 148 deletions
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java
index 115ed1410..9d9ce64e1 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java
@@ -40,12 +40,16 @@ public class AddressGroupJson {
}
public boolean equals(Object obj){
- if(obj != null){
- AddressGroupJson servGroupobj=(AddressGroupJson) obj;
- if(this.getName().equals(servGroupobj.getName())){
- return true;
- }
+ if(obj == null){
+ return false;
}
+ if(this.getClass() != obj.getClass()){
+ return false;
+ }
+ AddressGroupJson servGroupobj=(AddressGroupJson) obj;
+ if(this.getName().equals(servGroupobj.getName())){
+ return true;
+ }
return false;
}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/IdMap.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/IdMap.java
new file mode 100644
index 000000000..6efb53a0b
--- /dev/null
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/IdMap.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * 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.adapter;
+
+
+public class IdMap {
+
+ protected String astraId;
+ protected String vendorId;
+
+ public String getAstraId() {
+ return astraId;
+ }
+ public void setAstraId(String astraId) {
+ this.astraId = astraId;
+ }
+ public String getVendorId() {
+ return vendorId;
+ }
+ public void setVendorId(String vendorId) {
+ this.vendorId = vendorId;
+ }
+
+} \ No newline at end of file
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceGroupJson.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceGroupJson.java
index 6b368d331..1dca60cbc 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceGroupJson.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceGroupJson.java
@@ -39,15 +39,19 @@ public class ServiceGroupJson {
this.name = value;
}
- public boolean equals(Object obj)
- {
+ public boolean equals(Object obj){
+ if(obj == null){
+ return false;
+ }
+ if(this.getClass() != obj.getClass()){
+ return false;
+ }
ServiceGroupJson servGroupobj=(ServiceGroupJson) obj;
- if(this.getName().equals(servGroupobj.getName()))
- {
- return true;
- }
- return false;
- }
+ if(this.getName().equals(servGroupobj.getName())){
+ return true;
+ }
+ return false;
+ }
public int hashCode() {
return Integer.valueOf(name.charAt(0)+(name.charAt(1)));
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java
index 532de1f9d..46aa2b55c 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java
@@ -40,11 +40,15 @@ public class ServiceListJson {
}
public boolean equals(Object obj){
- if(obj != null){
- ServiceListJson servobj=(ServiceListJson) obj;
- if(this.getName().equals(servobj.getName())){
- return true;
- }
+ if(obj == null){
+ return false;
+ }
+ if(this.getClass() != obj.getClass()){
+ return false;
+ }
+ ServiceListJson servobj=(ServiceListJson) obj;
+ if(this.getName().equals(servobj.getName())){
+ return true;
}
return false;
}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/TermCollector.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/TermCollector.java
index 26853d360..ca7c0dcae 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/TermCollector.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/TermCollector.java
@@ -29,19 +29,19 @@ import java.util.Set;
public class TermCollector {
- String serviceTypeId;
- String configName;
- DeployNowJson deploymentOption;
- String securityZoneId;
-
- protected Set<Object> serviceGroups;
- protected Set<Object> addressGroups;
- protected List<Term> firewallRuleList;
-
- private String primaryParentZoneId;
-
- protected List<Tags> ruleToTag;
-
+ private String serviceTypeId;
+ private String configName;
+ private DeployNowJson deploymentOption;
+ private String securityZoneId;
+ private String vendorServiceId;
+ private VendorSpecificData vendorSpecificData= new VendorSpecificData();
+
+ protected Set<Object> serviceGroups;
+ protected Set<Object> addressGroups;
+ protected List<Term> firewallRuleList;
+
+ protected List<Tags> ruleToTag;
+
public List<Tags> getRuleToTag() {
return ruleToTag;
}
@@ -51,91 +51,95 @@ public class TermCollector {
}
//SecurityTypeId
- public String getServiceTypeId() {
- return serviceTypeId;
- }
-
- public void setServiceTypeId(String serviceTypeId) {
- this.serviceTypeId = serviceTypeId;
- }
-
- //ConfigName
- public String getConfigName() {
- return configName;
- }
-
- public void setConfigName(String configName) {
- this.configName = configName;
- }
-
- //DeploymentControl
- public DeployNowJson getDeploymentOption() {
- return deploymentOption;
- }
-
- public void setDeploymentOption(DeployNowJson deploymentOption) {
- this.deploymentOption = deploymentOption;
- }
-
- //SecurityZoneId
- public String getSecurityZoneId() {
- return securityZoneId;
- }
- public void setSecurityZoneId(String securityZoneId) {
- this.securityZoneId = securityZoneId;
- }
-
-
- //ServiceGroup
- public Set<Object> getServiceGroups() {
- if(serviceGroups==null)
- {
- serviceGroups= new HashSet<Object>();
- }
- return this.serviceGroups;
- }
-
- public void setServiceGroups(Set<Object> servListArray) {
+ public String getServiceTypeId() {
+ return serviceTypeId;
+ }
+
+ public void setServiceTypeId(String serviceTypeId) {
+ this.serviceTypeId = serviceTypeId;
+ }
+
+ //ConfigName
+ public String getConfigName() {
+ return configName;
+ }
+
+ public void setConfigName(String configName) {
+ this.configName = configName;
+ }
+
+ //DeploymentControl
+ public DeployNowJson getDeploymentOption() {
+ return deploymentOption;
+ }
+
+ public void setDeploymentOption(DeployNowJson deploymentOption) {
+ this.deploymentOption = deploymentOption;
+ }
+
+ //SecurityZoneId
+ public String getSecurityZoneId() {
+ return securityZoneId;
+ }
+ public void setSecurityZoneId(String securityZoneId) {
+ this.securityZoneId = securityZoneId;
+ }
+
+
+ //ServiceGroup
+ public Set<Object> getServiceGroups() {
+ if(serviceGroups==null)
+ {
+ serviceGroups= new HashSet<Object>();
+ }
+ return this.serviceGroups;
+ }
+
+ public void setServiceGroups(Set<Object> servListArray) {
this.serviceGroups = servListArray;
}
- //AddressGroup
- public Set<Object> getAddressGroups() {
- if(addressGroups==null)
- {
- addressGroups= new HashSet<Object>();
- }
- return this.addressGroups;
- }
-
- public void setAddressGroups(Set<Object> addressGroups) {
- this.addressGroups = addressGroups;
- }
-
- //FirewallRuleList
- public List<Term> getFirewallRuleList() {
-
- if(firewallRuleList==null)
- {
- firewallRuleList= new ArrayList<Term>();
- }
- return this.firewallRuleList;
- }
-
- public void setFirewallRuleList(List<Term> firewallRuleList) {
- this.firewallRuleList = firewallRuleList;
- }
-
-
- //primaryParentZoneId
- public String getPrimaryParentZoneId() {
- return primaryParentZoneId;
- }
-
- public void setPrimaryParentZoneId(String primaryParentZoneId) {
- this.primaryParentZoneId = primaryParentZoneId;
- }
-
-
+ //AddressGroup
+ public Set<Object> getAddressGroups() {
+ if(addressGroups==null)
+ {
+ addressGroups= new HashSet<Object>();
+ }
+ return this.addressGroups;
+ }
+
+ public void setAddressGroups(Set<Object> addressGroups) {
+ this.addressGroups = addressGroups;
+ }
+
+ //FirewallRuleList
+ public List<Term> getFirewallRuleList() {
+
+ if(firewallRuleList==null)
+ {
+ firewallRuleList= new ArrayList<Term>();
+ }
+ return this.firewallRuleList;
+ }
+
+ public void setFirewallRuleList(List<Term> firewallRuleList) {
+ this.firewallRuleList = firewallRuleList;
+ }
+ //vendorServiceId
+ public String getVendorServiceId() {
+ return vendorServiceId;
+ }
+
+ public void setVendorServiceId(String vendorServiceId) {
+ this.vendorServiceId = vendorServiceId;
+ }
+
+ public VendorSpecificData getVendorSpecificData() {
+ return vendorSpecificData;
+ }
+
+ public void setVendorSpecificData(VendorSpecificData vendorSpecificData) {
+ this.vendorSpecificData = vendorSpecificData;
+ }
}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/VendorSpecificData.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/VendorSpecificData.java
new file mode 100644
index 000000000..c8ca8e95d
--- /dev/null
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/VendorSpecificData.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * 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.adapter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class VendorSpecificData {
+
+ private List<IdMap> idMap= new ArrayList<IdMap>();
+
+ public List<IdMap> getIdMap() {
+ return idMap;
+ }
+
+ public void setIdMap(List<IdMap> idMap) {
+ this.idMap = idMap;
+ }
+
+}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java
index 184b4f80b..6badfa9a9 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java
@@ -99,7 +99,7 @@ public class Attribute implements Serializable {
//bi-directional many-to-one association to ConstraintValue
@OneToMany(mappedBy="attribute", orphanRemoval=true, cascade=CascadeType.REMOVE)
@JsonIgnore
- private Set<ConstraintValue> constraintValues = new HashSet<ConstraintValue>();
+ private Set<ConstraintValue> constraintValues = new HashSet<>();
//bi-directional many-to-one association to Category
@ManyToOne
@@ -259,7 +259,7 @@ public class Attribute implements Serializable {
public ConstraintValue addConstraintValue(ConstraintValue constraintValue) {
if (this.constraintValues == null) {
- this.constraintValues = new HashSet<ConstraintValue>();
+ this.constraintValues = new HashSet<>();
}
this.constraintValues.add(constraintValue);
constraintValue.setAttribute(this);
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java
index f26fc9d95..494092029 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java
@@ -75,7 +75,7 @@ public class Obadvice implements Serializable {
//bi-directional one-to-many association to Attribute Assignment
@OneToMany(mappedBy="obadvice", orphanRemoval=true, cascade=CascadeType.REMOVE)
- private Set<ObadviceExpression> obadviceExpressions = new HashSet<ObadviceExpression>(2);
+ private Set<ObadviceExpression> obadviceExpressions = new HashSet<>(2);
@Column(name="created_by", nullable=false, length=255)
private String createdBy;
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java
index 07f1b3bbc..70a0e845f 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java
@@ -112,7 +112,7 @@ public class PIPConfiguration implements Serializable {
//bi-directional many-to-one association to PIPConfigParam
@OneToMany(mappedBy="pipconfiguration", orphanRemoval=true, cascade=CascadeType.REMOVE)
- private Set<PIPConfigParam> pipconfigParams = new HashSet<PIPConfigParam>();
+ private Set<PIPConfigParam> pipconfigParams = new HashSet<>();
//bi-directional many-to-one association to PIPType
@ManyToOne
@@ -121,7 +121,7 @@ public class PIPConfiguration implements Serializable {
//bi-directional many-to-one association to PIPResolver
@OneToMany(mappedBy="pipconfiguration", orphanRemoval=true, cascade=CascadeType.REMOVE)
- private Set<PIPResolver> pipresolvers = new HashSet<PIPResolver>();
+ private Set<PIPResolver> pipresolvers = new HashSet<>();
public PIPConfiguration() {
}
@@ -344,7 +344,7 @@ public class PIPConfiguration implements Serializable {
@Transient
public static Collection<PIPConfiguration> importPIPConfigurations(Properties properties) {
- Collection<PIPConfiguration> configurations = new ArrayList<PIPConfiguration>();
+ Collection<PIPConfiguration> configurations = new ArrayList<>();
String engines = properties.getProperty(XACMLProperties.PROP_PIP_ENGINES);
if (engines == null || engines.isEmpty()) {
return configurations;
@@ -452,7 +452,7 @@ public class PIPConfiguration implements Serializable {
if (prefix.endsWith(".") == false) {
prefix = prefix + ".";
}
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
map.put(prefix + "classname", this.classname);
map.put(prefix + "name", this.name);
if (this.description != null) {
@@ -466,7 +466,7 @@ public class PIPConfiguration implements Serializable {
map.put(prefix + param.getParamName(), param.getParamValue());
}
- List<String> ids = new ArrayList<String>();
+ List<String> ids = new ArrayList<>();
Iterator<PIPResolver> iter = this.pipresolvers.iterator();
while (iter.hasNext()) {
PIPResolver resolver = iter.next();
@@ -508,7 +508,7 @@ public class PIPConfiguration implements Serializable {
props.setProperty(prefix + param.getParamName(), param.getParamValue());
}
- List<String> ids = new ArrayList<String>();
+ List<String> ids = new ArrayList<>();
Iterator<PIPResolver> iter = this.pipresolvers.iterator();
while (iter.hasNext()) {
PIPResolver resolver = iter.next();
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java
index 634ff3e63..618c1a4ea 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java
@@ -103,7 +103,7 @@ public class PIPResolver implements Serializable {
//bi-directional many-to-one association to PIPResolverParam
@OneToMany(mappedBy="pipresolver", orphanRemoval=true, cascade=CascadeType.REMOVE)
- private Set<PIPResolverParam> pipresolverParams = new HashSet<PIPResolverParam>();
+ private Set<PIPResolverParam> pipresolverParams = new HashSet<>();
public PIPResolver() {
}
@@ -274,7 +274,7 @@ public class PIPResolver implements Serializable {
@Transient
public static Collection<PIPResolver> importResolvers(String prefix, String list, Properties properties, String user) throws PIPException {
- Collection<PIPResolver> resolvers = new ArrayList<PIPResolver>();
+ Collection<PIPResolver> resolvers = new ArrayList<>();
for (String id : Splitter.on(',').trimResults().omitEmptyStrings().split(list)) {
resolvers.add(new PIPResolver(prefix + "." + id, properties, user));
}
@@ -316,7 +316,7 @@ public class PIPResolver implements Serializable {
@Transient
public Map<String, String> getConfiguration(String prefix) {
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
if (prefix.endsWith(".") == false) {
prefix = prefix + ".";
}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSAttributeObject.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSAttributeObject.java
index a04f77e7e..adf1fae8c 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSAttributeObject.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSAttributeObject.java
@@ -26,12 +26,12 @@ import java.util.Map;
public class MSAttributeObject {
private String className;
- private HashMap<String, String> attribute = new HashMap<String, String>();
- private HashMap<String, String> refAttribute = new HashMap<String, String>();
- private HashMap<String, Object> subClass = new HashMap<String, Object>();
+ private HashMap<String, String> attribute = new HashMap<>();
+ private HashMap<String, String> refAttribute = new HashMap<>();
+ private HashMap<String, Object> subClass = new HashMap<>();
private String dependency;
- private HashMap<String, String> enumType = new HashMap<String, String>();
- private HashMap<String, String> matchingSet = new HashMap<String, String>();
+ private HashMap<String, String> enumType = new HashMap<>();
+ private HashMap<String, String> matchingSet = new HashMap<>();
private boolean policyTempalate;
public Map<String, String> getRefAttribute() {
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSModelUtils.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSModelUtils.java
index 057d8544e..670657ae3 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSModelUtils.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/util/MSModelUtils.java
@@ -63,9 +63,9 @@ public class MSModelUtils {
private static final Log logger = LogFactory.getLog(MSModelUtils.class);
- private HashMap<String,MSAttributeObject > classMap = new HashMap<String,MSAttributeObject>();
- private HashMap<String, String> enumMap = new HashMap<String, String>();
- private HashMap<String, String> matchingClass = new HashMap<String, String>();
+ private HashMap<String,MSAttributeObject > classMap = new HashMap<>();
+ private HashMap<String, String> enumMap = new HashMap<>();
+ private HashMap<String, String> matchingClass = new HashMap<>();
private String configuration = "configuration";
private String dictionary = "dictionary";
private String ecomp = "";
@@ -126,7 +126,7 @@ public class MSModelUtils {
}
private void CheckForMatchingClass() {
- HashMap<String, String> tempAttribute = new HashMap<String, String>();
+ HashMap<String, String> tempAttribute = new HashMap<>();
for (Entry<String, String> set : matchingClass.entrySet()){
String key = set.getKey();
@@ -193,7 +193,7 @@ public class MSModelUtils {
private HashMap<String, String> getEEnum(EObject obj) {
List<String> valueList = new ArrayList<>();
- HashMap<String, String> returnMap = new HashMap<String, String>();
+ HashMap<String, String> returnMap = new HashMap<>();
EEnum eenum = (EEnum)obj;
String name = eenum.getName();
@@ -208,7 +208,7 @@ public class MSModelUtils {
}
public void getAttributes(String className, String dependency, EPackage root) {
- List<String> dpendList = null;
+ List<String> dpendList = new ArrayList<>();
if (dependency!=null){
dpendList = new ArrayList<String>(Arrays.asList(dependency.split(",")));
}
@@ -233,7 +233,7 @@ public class MSModelUtils {
TreeIterator<EObject> treeItr = root.eAllContents();
boolean requiredAttribute = false;
boolean requiredMatchAttribute = false;
- HashMap<String, String> annotationSet = new HashMap<String, String>();
+ HashMap<String, String> annotationSet = new HashMap<>();
String matching = null;
String range = null;
String dictionary = null;
@@ -360,7 +360,7 @@ public class MSModelUtils {
TreeIterator<EObject> treeItr = root.eAllContents();
boolean requiredAttribute = false;
- HashMap<String, String> refAttribute = new HashMap<String, String>();
+ HashMap<String, String> refAttribute = new HashMap<>();
int rollingCount = 0;
int processClass = 0;
boolean annotation = false;
@@ -505,7 +505,7 @@ public class MSModelUtils {
TreeIterator<EObject> treeItr = root.eAllContents();
boolean requiredAttribute = false;
- HashMap<String, String> refAttribute = new HashMap<String, String>();
+ HashMap<String, String> refAttribute = new HashMap<>();
boolean annotation = false;
boolean dictionaryTest = false;
String defaultValue = null;
@@ -579,8 +579,8 @@ public class MSModelUtils {
}
public Map<String, String> buildSubList(HashMap<String, String> subClassAttributes, HashMap<String, MSAttributeObject> classMap, String className){
- Map<String, String> missingValues = new HashMap<String, String>();
- Map<String, String> workingMap = new HashMap<String, String>();
+ Map<String, String> missingValues = new HashMap<>();
+ Map<String, String> workingMap = new HashMap<>();
boolean enumType;
for ( Entry<String, String> map : classMap.get(className).getRefAttribute().entrySet()){
@@ -606,7 +606,7 @@ public class MSModelUtils {
public Map<String, HashMap<String, String>> recursiveReference(HashMap<String, MSAttributeObject> classMap, String className){
- Map<String, HashMap<String, String>> returnObject = new HashMap<String, HashMap<String, String>>();
+ Map<String, HashMap<String, String>> returnObject = new HashMap<>();
HashMap<String, String> returnClass = getRefclass(classMap, className);
returnObject.put(className, returnClass);
for (Entry<String, String> reAttribute :returnClass.entrySet()){
@@ -624,7 +624,7 @@ public class MSModelUtils {
public String createJson(HashMap<String, Object> subClassAttributes, HashMap<String, MSAttributeObject> classMap, String className) {
boolean enumType;
- Map<String, HashMap<String, String>> myObject = new HashMap<String, HashMap<String, String>>();
+ Map<String, HashMap<String, String>> myObject = new HashMap<>();
for ( Entry<String, String> map : classMap.get(className).getRefAttribute().entrySet()){
String value = map.getValue().split(":")[0];
if (value!=null){
@@ -645,7 +645,7 @@ public class MSModelUtils {
}
public HashMap<String, String> getRefclass(HashMap<String, MSAttributeObject> classMap, String className){
- HashMap<String, String> missingValues = new HashMap<String, String>();
+ HashMap<String, String> missingValues = new HashMap<>();
if (classMap.get(className).getAttribute()!=null || !classMap.get(className).getAttribute().isEmpty()){
missingValues.putAll(classMap.get(className).getAttribute());
@@ -660,7 +660,7 @@ public class MSModelUtils {
public String createSubAttributes(ArrayList<String> dependency, HashMap<String, MSAttributeObject> classMap, String modelName) {
- HashMap <String, Object> workingMap = new HashMap<String,Object>();
+ HashMap <String, Object> workingMap = new HashMap<>();
MSAttributeObject tempObject = new MSAttributeObject();
if (dependency!=null){
if (dependency.size()==0){
@@ -680,8 +680,8 @@ public class MSModelUtils {
}
public ArrayList<String> getFullDependencyList(ArrayList<String> dependency, HashMap<String,MSAttributeObject > classMap) {
- ArrayList<String> returnList = new ArrayList<String>();
- ArrayList<String> workingList = new ArrayList<String>();
+ ArrayList<String> returnList = new ArrayList<>();
+ ArrayList<String> workingList = new ArrayList<>();
returnList.addAll(dependency);
for (String element : dependency ){
if (classMap.containsKey(element)){