if (values.size() == 1) {
if (url.equals("ParKpiResources")) {
this.resources = new ArrayList();
String value = (String) values.get(0);
Integer res = new Integer(value);
Resource toAdd = DAOFactory.getResourceDAO().loadResourceById(res);
this.resources.add(toAdd);
}else if (url.equals("ParKpiResourcesCode")) {
this.resources = new ArrayList();
for (int k = 0; k < values.size(); k++) {
String value = (String) values.get(k);
Resource toAdd = DAOFactory.getResourceDAO().loadResourceByCode(value);
this.resources.add(toAdd);
}
}else if(url.equals("register_values")){
String value = (String) values.get(0);
if (value.equalsIgnoreCase("true")){
this.register_values = true;
this.register_par_setted = true;
}else if (value.equalsIgnoreCase("false")){
this.register_values = false;
this.register_par_setted = true;
}
}else if (url.equals("behaviour")){
String value = (String) values.get(0);
behaviour = value;
logger.debug("Behaviour is: "+ behaviour);
}else if(url.equals("dataset_multires")){
String value = (String) values.get(0);
if (value.equalsIgnoreCase("true")){
this.dataset_multires = true;
}else if (value.equalsIgnoreCase("false")){
this.dataset_multires = false;
}
}else{
String value = (String) values.get(0);
if (url.equals("ParKpiDate")) {
value = setCalculationDateOfKpi(value);
}else if (url.equals("TimeRangeFrom")) {
try {
timeRangeFrom = f.parse(value);
} catch (ParseException e) {
logger.error("ParseException.value=" + value, e);
}
logger.debug("Setted TIME RANGE FROM");
}else if (url.equals("TimeRangeTo")) {
try {
timeRangeTo = f.parse(value);
} catch (ParseException e) {
logger.error("ParseException.value=" + value, e);
}
logger.debug("Setted TIME RANGE TO");
}else if(url.equals("dateIntervalFrom")){
try {
dateIntervalFrom = f.parse(value);
value = getDateForDataset(dateIntervalFrom);
} catch (ParseException e) {
logger.error("ParseException.value=" + value, e);
}
logger.debug("Setted TIME RANGE TO");
}else if(url.equals("dateIntervalTo")){
try {
dateIntervalTo = f.parse(value);
value = getDateForDataset(dateIntervalTo);
} catch (ParseException e) {
logger.error("ParseException.value=" + value, e);
}
logger.debug("Setted TIME RANGE TO");
}
parametersMap.put(url, value);
}
//instead if parameter has more than one value
}else if (values != null && values.size() >= 1) {
if (url.equals("ParKpiResources")) {
this.resources = new ArrayList();
for (int k = 0; k < values.size(); k++) {
String value = (String) values.get(k);
Integer res = new Integer(value);
Resource toAdd = DAOFactory.getResourceDAO().loadResourceById(res);
this.resources.add(toAdd);
}
}else if (url.equals("ParKpiResourcesCode")) {
this.resources = new ArrayList();
for (int k = 0; k < values.size(); k++) {
String value = (String) values.get(k);
Resource toAdd = DAOFactory.getResourceDAO().loadResourceByCode(value);
this.resources.add(toAdd);
}
}else {
String value = "'" + (String) values.get(0) + "'";
for (int k = 1; k < values.size(); k++) {