ServiceUtils.serviceFile(dirs, identifier));
identifier++;
}
LOG.info("Processing services...");
Services list = new Services();
for (Service service : services) {
org.apache.commons.collections.Predicate predicate =
new ControllerTypePredicate(service.getController().getType());
if (CollectionUtils.exists(list.getControllers(), predicate)) {
ControllerSummary controller =
(ControllerSummary) CollectionUtils.find(list.getControllers(),
predicate);
controller.addService(service);
} else {
ControllerSummary controller =
new ControllerSummary(service.getController().getType(),
service.getController().getJavadoc());
controller.addService(service);
list.addController(controller);
}
}
LOG.info("Marshalling services...");
list.assertValid();
JiBXUtils.marshallServices(list, ServiceUtils.servicesFile(dirs));
}