// Adds to each Service template the general criteria for the CSA // (each service template can have is own set of criteria, but if a global criteria is defined // each component must use it.) private void generalizeCSACriteria() { ArrayList<ServiceTemplate> comps = new ArrayList<ServiceTemplate>(); ArrayList<Criterion> crit = new ArrayList<Criterion>(); comps = this.data.getServiceTemplates(); crit = this.data.getCriteria(); for (ServiceTemplate c : comps) { for (Criterion cr : crit) { try { Criterion temp = (Criterion) BeanUtils.cloneBean(cr); c.addCrit(temp); } catch (IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException e) { e.printStackTrace(); } } } }