col.add(ScoutUddiV3JaxrHelper.getConcept(tModel, lcm));
}
} catch (RegistryV3Exception e)
{
throw new JAXRException(e.getLocalizedMessage());
}
}
else if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType))
{
ConnectionImpl con = ((RegistryServiceImpl)getRegistryService()).getConnection();
AuthToken auth = this.getAuthToken(con,registry);
try
{
RegisteredInfo ri = null;
try {
ri = registry.getRegisteredInfo(auth.getAuthInfo());
} catch (RegistryV3Exception rve) {
String username = getUsernameFromCredentials(con.getCredentials());
if (AuthTokenV3Singleton.getToken(username) != null) {
AuthTokenV3Singleton.deleteAuthToken(username);
}
auth = getAuthToken(con, registry);
ri = registry.getRegisteredInfo(auth.getAuthInfo());
}
if (ri != null) {
BusinessInfos infos = ri.getBusinessInfos();
if (infos != null) {
for (String key: keys) {
BusinessDetail detail = registry.getBusinessDetail(key);
col.add(((BusinessLifeCycleManagerV3Impl)registryService.getLifeCycleManagerImpl()).createOrganization(detail));
}
}
}
} catch (RegistryV3Exception e) {
throw new JAXRException(e.getLocalizedMessage());
}
}
else if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType))
{
try {
TModelDetail tmodeldetail = registry.getTModelDetail(keys);
List<TModel> tmodelList = tmodeldetail.getTModel();
for (TModel tmodel: tmodelList)
{
col.add(ScoutUddiV3JaxrHelper.getConcept(tmodel, lcm));
}
}
catch (RegistryV3Exception e)
{
throw new JAXRException(e.getLocalizedMessage());
}
}
else if (LifeCycleManager.SERVICE.equalsIgnoreCase(objectType)) {
try {
ServiceDetail serviceDetail = registry.getServiceDetail(keys);
if (serviceDetail != null) {
List<BusinessService> bizServiceList = serviceDetail.getBusinessService();
for (BusinessService businessService: bizServiceList) {
Service service = getServiceFromBusinessService(businessService, lcm);
col.add(service);
}
}
}
catch (RegistryV3Exception e) {
throw new JAXRException(e);
}
}
else {
throw new JAXRException("Unsupported type " + objectType +
" for getRegistryObjects() in Apache Scout");
}
return new BulkResponseImpl(col);