List<Artifact.Dependency> dependencies = currentApplication.getAppConfig().
getApplicationArtifact().getDependencies();
for (Artifact.Dependency dependency : dependencies) {
Artifact artifact = dependency.getArtifact();
String type = artifact.getType();
String instanceName = artifact.getRuntimeObjectName();
if (DefaultAppDeployer.AAR_TYPE.equals(type) ||
DefaultAppDeployer.JAXWS_TYPE.equals(type) ||
DefaultAppDeployer.DS_TYPE.equals(type)) {
AxisServiceGroup sg;
if (instanceName == null) {
sg = findServiceGroupForArtifact(artifact);
if (sg != null) {
// set the instance name in Artifact so that we don't have to find it
// next time
artifact.setRuntimeObjectName(sg.getServiceGroupName());
}
} else {
sg = getAxisConfig().getServiceGroup(instanceName);
}
if (sg == null) {
continue;
}
// set the service group name
ServiceGroupMetadata sgMetadata = new ServiceGroupMetadata();
sgMetadata.setSgName(sg.getServiceGroupName());
sgMetadata.setSgType(type);
// find services in the service group
List<String> services = new ArrayList<String>();
for (Iterator serviceIter = sg.getServices(); serviceIter.hasNext();) {
AxisService axisService = (AxisService) serviceIter.next();
// ignore if this is a client side serivce
if (axisService.isClientSide()) {
break;
}
services.add(axisService.getName());
}
sgMetadata.setServices(services.toArray(new String[services.size()]));
serviceGroups.add(sgMetadata);
} else if (RegistryResourceDeployer.REGISTRY_RESOURCE_TYPE.equals(type)) {
// Create a Registry config metadata instance
RegistryConfig regConf = artifact.getRegConfig();
if (regConf == null) {
regConf = readRegConfig(currentApplication.getAppName(), artifact.getName());
}
if (regConf == null) {
continue;
}
artifact.setRegConfig(regConf);
RegistryMetadata regMeta = new RegistryMetadata();
regMeta.setArtifactName(artifact.getName());
List<String> resources = new ArrayList<String>();
List<String> collections = new ArrayList<String>();
List<Association> associations = new ArrayList<Association>();