@Override public void initialize(CustomerStructure structure) { log.info("Initializing customer " + customerStructure.name); NodeList capacityBundleNodes = customerStructure.getConfigXml().getElementsByTagName("capacityBundle"); for (int i = 0; i < capacityBundleNodes.getLength(); ++i) { Element capacityBundleElement = (Element) capacityBundleNodes.item(i); CapacityBundle capacityBundle = createCapacityBundle(structure, capacityBundleElement); capacityBundle.initialize(structure, capacityBundleElement); capacityBundles.add(capacityBundle); customerRepo.add(capacityBundle.getCustomerInfo()); } utilityOptimizer = createUtilityOptimizer(structure, capacityBundles); utilityOptimizer.initialize(); log.info("Successfully initialized customer " + customerStructure.name); }