use of org.cerberus.crud.factory.IFactoryCountryEnvDeployType in project cerberus-source by cerberustesting.
the class UpdateCountryEnvParam method getCountryEnvironmentDeployTypeFromParameter.
private List<CountryEnvDeployType> getCountryEnvironmentDeployTypeFromParameter(HttpServletRequest request, ApplicationContext appContext, String system, String country, String environment, JSONArray json) throws JSONException {
List<CountryEnvDeployType> cedList = new ArrayList();
IFactoryCountryEnvDeployType cedFactory = appContext.getBean(IFactoryCountryEnvDeployType.class);
for (int i = 0; i < json.length(); i++) {
JSONObject tcsaJson = json.getJSONObject(i);
boolean delete = tcsaJson.getBoolean("toDelete");
String deployType = tcsaJson.getString("deployType");
String jenkinsAgent = tcsaJson.getString("jenkinsAgent");
if (!delete) {
CountryEnvDeployType ced = cedFactory.create(system, country, environment, deployType, jenkinsAgent);
cedList.add(ced);
}
}
return cedList;
}
Aggregations