private Resource[] parseContextResources(List beanImports) {
if (beanImports != null && !beanImports.isEmpty()) {
Resource flowResource = flowModelHolder.getFlowModelResource();
List resources = new ArrayList(beanImports.size());
for (Iterator it = getFlowModel().getBeanImports().iterator(); it.hasNext();) {
BeanImportModel beanImport = (BeanImportModel) it.next();
try {
resources.add(flowResource.createRelative(beanImport.getResource()));
} catch (IOException e) {
throw new FlowBuilderException("Could not access flow-relative artifact resource '"
+ beanImport.getResource() + "'", e);
}
}
return (Resource[]) resources.toArray(new Resource[resources.size()]);
} else {
return new Resource[0];