use of org.cerberus.crud.factory.IFactoryCountryEnvLink in project cerberus-source by cerberustesting.
the class UpdateCountryEnvParam method getCountryEnvironmentLinkFromParameter.
private List<CountryEnvLink> getCountryEnvironmentLinkFromParameter(HttpServletRequest request, ApplicationContext appContext, String system, String country, String environment, JSONArray json) throws JSONException {
List<CountryEnvLink> ceiList = new ArrayList();
IFactoryCountryEnvLink ceiFactory = appContext.getBean(IFactoryCountryEnvLink.class);
for (int i = 0; i < json.length(); i++) {
JSONObject tcsaJson = json.getJSONObject(i);
boolean delete = tcsaJson.getBoolean("toDelete");
String systemLink = tcsaJson.getString("systemLink");
String countryLink = tcsaJson.getString("countryLink");
String environmentLink = tcsaJson.getString("environmentLink");
if (!delete) {
CountryEnvLink cei = ceiFactory.create(system, country, environment, systemLink, countryLink, environmentLink);
ceiList.add(cei);
}
}
return ceiList;
}
Aggregations