Package org.apache.juddi.api_v3

Examples of org.apache.juddi.api_v3.ClerkDetail


 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateClerk(publisher).validateSaveClerk(em, body);
     
      ClerkDetail result = new ClerkDetail();
 
      List<org.apache.juddi.api_v3.Clerk> apiClerkList = body.getClerk();;
      for (org.apache.juddi.api_v3.Clerk apiClerk : apiClerkList) {
       
        org.apache.juddi.model.Clerk modelClerk = new org.apache.juddi.model.Clerk();
       
        MappingApiToModel.mapClerk(apiClerk, modelClerk);
       
        Object existingUddiEntity = em.find(modelClerk.getClass(), modelClerk.getClerkName());
        if (existingUddiEntity != null) {
          em.merge(modelClerk);
        } else {
          em.persist(modelClerk);
        }
       
        result.getClerk().add(apiClerk);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here


 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateClerk(publisher).validateSaveClerk(em, body);
     
      ClerkDetail result = new ClerkDetail();
 
      List<org.apache.juddi.api_v3.Clerk> apiClerkList = body.getClerk();;
      for (org.apache.juddi.api_v3.Clerk apiClerk : apiClerkList) {
       
        org.apache.juddi.model.Clerk modelClerk = new org.apache.juddi.model.Clerk();
       
        MappingApiToModel.mapClerk(apiClerk, modelClerk);
       
        Object existingUddiEntity = em.find(modelClerk.getClass(), modelClerk.getClerkName());
        if (existingUddiEntity != null) {
          em.merge(modelClerk);
        } else {
          em.persist(modelClerk);
        }
       
        result.getClerk().add(apiClerk);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

                        UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());

                        new ValidateClerk(publisher).validateSaveClerk(em, body);

                        ClerkDetail result = new ClerkDetail();

                        List<org.apache.juddi.api_v3.Clerk> apiClerkList = body.getClerk();;
                        for (org.apache.juddi.api_v3.Clerk apiClerk : apiClerkList) {

                                org.apache.juddi.model.Clerk modelClerk = new org.apache.juddi.model.Clerk();

                                MappingApiToModel.mapClerk(apiClerk, modelClerk);

                                Object existingUddiEntity = em.find(modelClerk.getClass(), modelClerk.getClerkName());
                                if (existingUddiEntity != null) {
                                        em.merge(modelClerk);
                                } else {
                                        em.persist(modelClerk);
                                }

                                result.getClerk().add(apiClerk);
                        }

                        tx.commit();
                        return result;
                } finally {
View Full Code Here

    }
    return nodeDetail;
  }
 
  public ClerkDetail saveClerk(UDDIClerk senderClerk)  {
    ClerkDetail clerkDetail = null;
    try {
      log.debug("Sending Clerk " + senderClerk.getName() + " info to jUDDI " + getUDDINode().getName());
      SaveClerk saveClerk = new SaveClerk();
      saveClerk.setAuthInfo(getAuthToken(senderClerk.getUDDINode().getSecurityUrl()));
      saveClerk.getClerk().add(getApiClerk());
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateClerk(publisher).validateSaveClerk(em, body);
     
      ClerkDetail result = new ClerkDetail();
 
      List<org.apache.juddi.api_v3.Clerk> apiClerkList = body.getClerk();;
      for (org.apache.juddi.api_v3.Clerk apiClerk : apiClerkList) {
       
        org.apache.juddi.model.Clerk modelClerk = new org.apache.juddi.model.Clerk();
       
        MappingApiToModel.mapClerk(apiClerk, modelClerk);
       
        Object existingUddiEntity = em.find(modelClerk.getClass(), modelClerk.getClerkName());
        if (existingUddiEntity != null) {
          em.merge(modelClerk);
        } else {
          em.persist(modelClerk);
        }
       
        result.getClerk().add(apiClerk);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

         *
         * @param senderClerk
         * @return null if registration fails
         */
        public ClerkDetail saveClerk(UDDIClerk senderClerk) {
                ClerkDetail clerkDetail = null;
                try {
                        log.debug("Sending Clerk " + senderClerk.getName() + " info to jUDDI " + getUDDINode().getName());
                        SaveClerk saveClerk = new SaveClerk();
                        saveClerk.setAuthInfo(getAuthToken(senderClerk.getUDDINode().getSecurityUrl()));
                        saveClerk.getClerk().add(getApiClerk());
View Full Code Here

    saveClientSubscriptionInfo.getClientSubscriptionInfo().add(clientSubscriptionInfo2);
   
    try {

      NodeDetail nodeDetail = publisher.saveNode(saveNode);
      ClerkDetail clerkDetail = publisher.saveClerk(saveClerk);
      Assert.assertEquals(2,nodeDetail.getNode().size());
      Assert.assertEquals(2,clerkDetail.getClerk().size());
     
      ClientSubscriptionInfoDetail detail = publisher.saveClientSubscriptionInfo(saveClientSubscriptionInfo);
      Assert.assertEquals("mykey", detail.getClientSubscriptionInfo().get(0).getSubscriptionKey());
     
      //GetClientSubscriptionInfoDetail getDetail = new GetClientSubscriptionInfoDetail();
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateClerk(publisher).validateSaveClerk(em, body);
     
      ClerkDetail result = new ClerkDetail();
 
      List<org.apache.juddi.api_v3.Clerk> apiClerkList = body.getClerk();;
      for (org.apache.juddi.api_v3.Clerk apiClerk : apiClerkList) {
       
        org.apache.juddi.model.Clerk modelClerk = new org.apache.juddi.model.Clerk();
       
        MappingApiToModel.mapClerk(apiClerk, modelClerk);
       
        Object existingUddiEntity = em.find(modelClerk.getClass(), modelClerk.getClerkName());
        if (existingUddiEntity != null) {
          em.merge(modelClerk);
        } else {
          em.persist(modelClerk);
        }
       
        result.getClerk().add(apiClerk);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

    }
  }
 
  @Test
  public void addClientSubscriptionInfo() {
    ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
   
    Node node = new Node();
    node.setSecurityUrl("http://localhost:8080/services/securityUrl");
    node.setName("default");
   
    Clerk clerk = new Clerk();
    clerk.setName("default");
    clerk.setPublisher("root");
    clerk.setNode(node);
 
                Clerk toClerk = new Clerk();
                toClerk.setName("medroot");
                toClerk.setPublisher("root");
                toClerk.setNode(node);
 
    clientSubscriptionInfo.setFromClerk(clerk);
    clientSubscriptionInfo.setToClerk(toClerk);
   
    clientSubscriptionInfo.setSubscriptionKey("mykey");
   
    SaveClientSubscriptionInfo saveClientSubscriptionInfo = new SaveClientSubscriptionInfo();
    saveClientSubscriptionInfo.setAuthInfo(authInfo);
    saveClientSubscriptionInfo.getClientSubscriptionInfo().add(clientSubscriptionInfo);
   
View Full Code Here

      juddiApiService.saveClerk(saveToClerk);
      logger.debug("Updating default UDDI server completed.");
     
      SaveClientSubscriptionInfo saveClientSubscriptionInfo = new SaveClientSubscriptionInfo();
      saveClientSubscriptionInfo.setAuthInfo(userAuthToken);
      ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
      clientSubscriptionInfo.setSubscriptionKey(modelSubscription.getSubscriptionKey());
      clientSubscriptionInfo.setFromClerk(clerk.getApiClerk());
      clientSubscriptionInfo.setToClerk(toClerk.getApiClerk());
     
      saveClientSubscriptionInfo.getClientSubscriptionInfo().add(clientSubscriptionInfo);
      //save clientSubscription to the listening UDDI default server.
      juddiApiService.saveClientSubscriptionInfo(saveClientSubscriptionInfo);
      logger.debug("Saved ClientSubscriptionInfo to the default UDDI server");
View Full Code Here

TOP

Related Classes of org.apache.juddi.api_v3.ClerkDetail

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.