Package org.uddi.api_v2

Examples of org.uddi.api_v2.KeyedReference


                return r;
        }
       
        private static TModelInstanceDetails MapTModelInstanceDetails(org.uddi.api_v3.TModelInstanceDetails tModelInstanceDetails) {
                if (tModelInstanceDetails == null) {
                        return new TModelInstanceDetails();
                }
                TModelInstanceDetails r = new TModelInstanceDetails();
                r.getTModelInstanceInfo().addAll(MapTModelInstanceInfo(tModelInstanceDetails.getTModelInstanceInfo()));
                return r;
        }
View Full Code Here


                List<TModelInstanceInfo> r = new ArrayList<TModelInstanceInfo>();
                if (tModelInstanceInfo == null) {
                        return r;
                }
                for (int i = 0; i < tModelInstanceInfo.size(); i++) {
                        TModelInstanceInfo t = new TModelInstanceInfo();
                        t.setTModelKey(tModelInstanceInfo.get(i).getTModelKey());
                        t.getDescription().addAll(MapDescription(tModelInstanceInfo.get(i).getDescription()));
                        if (tModelInstanceInfo.get(i).getInstanceDetails() != null) {
                                t.setInstanceDetails(new InstanceDetails());
                                t.getInstanceDetails().getDescription().addAll(MapDescription(tModelInstanceInfo.get(i).getInstanceDetails().getDescription()));
                                t.getInstanceDetails().setInstanceParms(StringEscapeUtils.escapeXml(tModelInstanceInfo.get(i).getInstanceDetails().getInstanceParms()));
                                t.getInstanceDetails().setOverviewDoc(MapOverviewDoc(tModelInstanceInfo.get(i).getInstanceDetails().getOverviewDoc()));
                        }
                        r.add(t);
                }
                return r;
        }
View Full Code Here

                return r;
               
        }
       
        public static TModelList MapTModelListElement(org.uddi.api_v3.TModelList findTModel, String operator) {
                TModelList r = new TModelList();
                r.setGeneric(VERSION);
                r.setOperator(operator);
                r.setTModelInfos(new TModelInfos());
                if (findTModel == null) {
                        r.setTruncated(Truncated.FALSE);
                        return r;
                }
               
                if (findTModel.isTruncated() != null && findTModel.isTruncated()) {
                        r.setTruncated(Truncated.TRUE);
                } else {
                        r.setTruncated(Truncated.FALSE);
                }
                if (findTModel.getTModelInfos() != null) {
                       
                        r.getTModelInfos().getTModelInfo().addAll(MapTModelInfo(findTModel.getTModelInfos().getTModelInfo()));
                }
               
                return r;
        }
View Full Code Here

        PublisherAssertion paOut = paOutList.get(0);
 
        assertEquals(paIn.getFromKey(), paOut.getFromKey());
        assertEquals(paIn.getToKey(), paOut.getToKey());
       
        KeyedReference keyRefIn = paIn.getKeyedReference();
        KeyedReference keyRefOut = paOut.getKeyedReference();
       
        assertEquals(keyRefIn.getTModelKey(), keyRefOut.getTModelKey());
        assertEquals(keyRefIn.getKeyName(), keyRefOut.getKeyName());
        assertEquals(keyRefIn.getKeyValue(), keyRefOut.getKeyValue());
      }
     
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
View Full Code Here

    // In object could have KeyedReferenceGroups which are ignored.  For now, only solo KeyedReferences are checked.
    //assertEquals(elemList1.size(), elemList2.size());
    Iterator<KeyedReference> elemList1Itr = elemList1.iterator();
    Iterator<KeyedReference> elemList2Itr = elemList2.iterator();
    while (elemList1Itr.hasNext()) {
      KeyedReference elem1 = elemList1Itr.next();
      if (elem1 instanceof org.uddi.api_v3.KeyedReference) {
        KeyedReference elem2 = elemList2Itr.next();
        assertEquals(elem1.getTModelKey(), elem2.getTModelKey());
        assertEquals(elem1.getKeyName(), elem2.getKeyName());
        assertEquals(elem1.getKeyValue(), elem2.getKeyValue());
      }
      // add comparing keyedReferenceGroup
    }
  }
View Full Code Here

     AnnotationProcessor ap = new AnnotationProcessor();
     String categoryBagStr="keyedReference=keyName=uddi-org:types:wsdl;keyValue=wsdlDeployment;tModelKey=uddi:uddi.org:categorization:types," +
        "keyedReference=keyName=uddi-org:types:wsdl2;keyValue=wsdlDeployment2;tModelKey=uddi:uddi.org:categorization:types2";
     CategoryBag categoryBag = ap.parseCategoryBag(categoryBagStr);
     assertEquals(2,categoryBag.getKeyedReference().size());
     KeyedReference keyedReference = categoryBag.getKeyedReference().get(0);
     assertEquals("uddi-org:types:wsdl",keyedReference.getKeyName());
     assertEquals("wsdlDeployment",keyedReference.getKeyValue());
     assertEquals("uddi:uddi.org:categorization:types",keyedReference.getTModelKey());
     KeyedReference keyedReference2 = categoryBag.getKeyedReference().get(1);
     assertEquals("uddi-org:types:wsdl2",keyedReference2.getKeyName());
     assertEquals("wsdlDeployment2",keyedReference2.getKeyValue());
     assertEquals("uddi:uddi.org:categorization:types2",keyedReference2.getTModelKey());
   }
View Full Code Here

        //expecting references to two keys
        assertEquals(2, bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().size());
        assertEquals("tModelKey1",bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().get(0).getTModelKey());
        //expecting two KeyedReferences in the CategoryBag
        assertEquals(2, bindingTemplate.getCategoryBag().getKeyedReference().size());
        KeyedReference keyedReference2 = bindingTemplate.getCategoryBag().getKeyedReference().get(1);
       assertEquals("uddi-org:types:wsdl2",keyedReference2.getKeyName());
       assertEquals("wsdlDeployment2",keyedReference2.getKeyValue());
       assertEquals("uddi:uddi.org:categorization:types2",keyedReference2.getTModelKey());
       } catch (Exception e) {
         //we should not have any issues reading the annotations
           e.printStackTrace();
           Assert.fail();
       }
View Full Code Here

          for (String section : sections) {
            if (section.startsWith(KEYED_REFERENCE)) {
                String keyedReferenceStr = section.substring(KEYED_REFERENCE.length(),section.length());
                log.debug("Found KeyedReference=" + keyedReferenceStr);
                String[] keyedReferences = keyedReferenceStr.split(";");
                KeyedReference keyedReference = new KeyedReference();
                for (String key : keyedReferences) {
            if (key.startsWith(KEY_NAME)) keyedReference.setKeyName(key.substring(KEY_NAME.length(),key.length()));
            if (key.startsWith(KEY_VALUE)) keyedReference.setKeyValue(key.substring(KEY_VALUE.length(),key.length()));
            if (key.startsWith(TMODEL_KEY)) keyedReference.setTModelKey(key.substring(TMODEL_KEY.length(),key.length()));
          }
                log.debug("KeyedReference = " + KEY_NAME + keyedReference.getKeyName() + " "
                                          + KEY_VALUE + keyedReference.getKeyValue() + " "
                                          + TMODEL_KEY + keyedReference.getTModelKey());
                categoryBag.getKeyedReference().add(keyedReference);
            } else {
              log.warn("Ignoring " + section);
                   //TODO add support for KeyedReferenceGroups?
            }
View Full Code Here

    if (body.getToKey() != null && body.getToKey().length() > 0) {
      if (businessKeyExists || fromKeyExists)
        throw new FatalErrorException(new ErrorMessage("errors.findrelatedbusiness.MultipleInput"));
    }
   
    KeyedReference keyedRef = body.getKeyedReference();
    if (keyedRef != null) {
      if (keyedRef.getTModelKey() == null || keyedRef.getTModelKey().length() == 0 ||
        keyedRef.getKeyName() == null || keyedRef.getKeyName().length() == 0 ||
        keyedRef.getKeyValue() == null || keyedRef.getKeyValue().length() == 0)
        throw new ValueNotAllowedException(new ErrorMessage("errors.findrelatedbusiness.BlankKeyedRef"));
    }
     
  }
View Full Code Here

     
      // The node Id is defined as the business key of the business entity categorized as a node.  This entity is saved as part of the install.
      // Only one business entity should be categorized as a node.
      String nodeId = "";
      CategoryBag categoryBag = new CategoryBag();
      KeyedReference keyedRef = new KeyedReference();
      keyedRef.setTModelKey(Constants.NODE_CATEGORY_TMODEL);
      keyedRef.setKeyValue(Constants.NODE_KEYVALUE);
      categoryBag.getKeyedReference().add(keyedRef);
      List<?> keyList = FindBusinessByCategoryQuery.select(em, new FindQualifiers(), categoryBag, null);
      if (keyList != null && keyList.size() > 1)
        throw new ConfigurationException("Only one business entity can be categorized as the node.");
     
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.KeyedReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.