private static List<TModelInfo> MapTModelInfo(List<org.uddi.api_v3.TModelInfo> tModelInfo) { List<TModelInfo> r = new ArrayList<TModelInfo>(); if (tModelInfo == null) { return r; } for (int i = 0; i < tModelInfo.size(); i++) { TModelInfo x = new TModelInfo(); x.setTModelKey(tModelInfo.get(i).getTModelKey()); x.setName(new Name(tModelInfo.get(i).getName().getValue(), tModelInfo.get(i).getName().getLang())); r.add(x); } return r; }
while (iter.hasNext()) { TModelInfo tModelInfo = iter.next(); Tmodel tmodel = (Tmodel) em.find(org.apache.juddi.model.Tmodel.class, tModelInfo.getTModelKey()); tmodel.setDeleted(true); em.persist(tmodel);
public static String DumpAllTModels(String authinfo, UDDIInquiryPortType inquriy) { StringBuilder sb = new StringBuilder(); FindTModel fs = new FindTModel(); fs.setAuthInfo(authinfo); fs.setFindQualifiers(new FindQualifiers()); fs.getFindQualifiers().getFindQualifier().add("approximateMatch"); fs.setName(new Name("%", null)); try { TModelList findService = inquriy.findTModel(fs); if (findService.getTModelInfos()== null) { return ("NO TMODELS RETURNED!"); } else { for (int i = 0; i < findService.getTModelInfos().getTModelInfo().size(); i++) { sb.append(findService.getTModelInfos().getTModelInfo().get(i).getName().getValue()). append(" lang=").append(findService.getTModelInfos().getTModelInfo().get(i).getName().getLang()). append(" ").append(findService.getTModelInfos().getTModelInfo().get(i).getTModelKey()) .append(System.getProperty("line.separator")); } } } catch (Exception ex) { return ex.getMessage(); } return sb.toString(); } public static String DumpAllBusinesses(String authinfo, UDDIInquiryPortType inquriy) {
while (iter.hasNext()) { TModelInfo tModelInfo = iter.next(); Tmodel tmodel = (Tmodel) em.find(org.apache.juddi.model.Tmodel.class, tModelInfo.getTModelKey()); tmodel.setDeleted(true); em.persist(tmodel);
public static void DumpAllTModelsOpInfo(String authInfoJoe, UDDIInquiryPortType uddiInquiryImpl) throws Exception { FindTModel ftm = new FindTModel(); ftm.setAuthInfo(authInfoJoe); //org.apache.juddi.v3.client.UDDIConstants.WILDCARD ftm.setName(new Name("%", null)); ftm.setFindQualifiers(new FindQualifiers()); ftm.getFindQualifiers().getFindQualifier().add("approximateMatch"); TModelList findTModel = uddiInquiryImpl.findTModel(ftm); GetOperationalInfo req = new GetOperationalInfo(); req.setAuthInfo(authInfoJoe); for (int i = 0; i < findTModel.getTModelInfos().getTModelInfo().size(); i++) { req.getEntityKey().add( findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey()); } OperationalInfos operationalInfo = uddiInquiryImpl.getOperationalInfo(req); for (int i = 0; i < operationalInfo.getOperationalInfo().size(); i++) { System.out.println(operationalInfo.getOperationalInfo().get(i).getEntityKey() + " on node " + operationalInfo.getOperationalInfo().get(i).getNodeID() + " is owned by " + operationalInfo.getOperationalInfo().get(i).getAuthorizedName()); } }
public void findTModel(String findQualifier) { try { FindTModel body = (FindTModel)EntityCreator.buildFromDoc(FIND_TMODEL_XML, "org.uddi.api_v3"); if (findQualifier!=null) body.getFindQualifiers().getFindQualifier().add(findQualifier); TModelList result = inquiry.findTModel(body); if (result == null) Assert.fail("Null result from find tModel operation"); TModelInfos tInfos = result.getTModelInfos(); if (tInfos == null) Assert.fail("No result from find tModel operation"); List<TModelInfo> tiList = tInfos.getTModelInfo(); if (tiList == null || tiList.size() == 0) Assert.fail("No result from find tModel operation"); TModelInfo tiOut = tiList.get(0); TModel tmIn = (TModel)EntityCreator.buildFromDoc(TckTModel.JOE_PUBLISHER_TMODEL_XML, "org.uddi.api_v3"); assertEquals(tmIn.getTModelKey(), tiOut.getTModelKey()); assertEquals(tmIn.getName().getLang(), tiOut.getName().getLang()); assertEquals(tmIn.getName().getValue(), tiOut.getName().getValue()); TckValidator.checkDescriptions(tmIn.getDescription(), tiOut.getDescription()); } catch(Exception e) { logger.error(e.getMessage(), e); Assert.fail("No exception should be thrown."); } } }
public static Concept getConcept(TModelInfo tModelInfo, LifeCycleManager lifeCycleManager) throws JAXRException { Concept concept = new ConceptImpl(lifeCycleManager); concept.setKey(lifeCycleManager.createKey(tModelInfo.getTModelKey())); concept.setName(lifeCycleManager.createInternationalString(getLocale(tModelInfo.getName().getLang()), tModelInfo.getName().getValue())); return concept; }
if (tModelList!=null && tModelList.getTModelInfos()!=null && tModelList.getTModelInfos().getTModelInfo()!=null) { TModelInfo tModelInfo = tModelList.getTModelInfos().getTModelInfo().get(0); String bpel4WSTModelKey = tModelInfo.getTModelKey(); clerk.unRegisterTModel(bpel4WSTModelKey); for (TModelInfo bindingTModelInfo : bindingTmodels.getTModelInfos().getTModelInfo()) { clerk.unRegisterTModel(bindingTModelInfo.getTModelKey());
scheme = new ClassificationSchemeImpl(registryService.getLifeCycleManagerImpl()); scheme.setName(new InternationalStringImpl(info.getName().getValue())); scheme.setKey(new KeyImpl(info.getTModelKey()));