ResourceInstanceFactoryImpl.addResourceDefinition(externalResourceType,
new ViewExternalSubResourceDefinition(externalResourceType));
Collection<ViewResourceEntity> resources = new HashSet<ViewResourceEntity>();
for (ResourceConfig resourceConfiguration : resourceConfigurations) {
ViewResourceEntity viewResourceEntity = new ViewResourceEntity();
viewResourceEntity.setViewName(viewDefinition.getName());
viewResourceEntity.setName(resourceConfiguration.getName());
viewResourceEntity.setPluralName(resourceConfiguration.getPluralName());
viewResourceEntity.setIdProperty(resourceConfiguration.getIdProperty());
viewResourceEntity.setResource(resourceConfiguration.getResource());
viewResourceEntity.setService(resourceConfiguration.getService());
viewResourceEntity.setProvider(resourceConfiguration.getProvider());
viewResourceEntity.setSubResourceNames(resourceConfiguration.getSubResourceNames());
viewResourceEntity.setViewEntity(viewDefinition);
ViewSubResourceDefinition resourceDefinition = new ViewSubResourceDefinition(viewDefinition, resourceConfiguration);
viewDefinition.addResourceDefinition(resourceDefinition);
Resource.Type type = resourceDefinition.getType();