Package org.apache.juddi.api_v3.rest

Examples of org.apache.juddi.api_v3.rest.UriContainer


            SavePublisher savePublisher = new SavePublisher();
            savePublisher.setAuthInfo(token);
            org.apache.juddi.api_v3.Publisher apiPublisher = new org.apache.juddi.api_v3.Publisher();
            BeanUtils.copyProperties(apiPublisher, publisher);
            savePublisher.getPublisher().add(apiPublisher);
            PublisherDetail publisherDetail = apiService.savePublisher(savePublisher);
            List<Publisher> publishers = new ArrayList<Publisher>();
           for (org.apache.juddi.api_v3.Publisher apiPublisherOut : publisherDetail.getPublisher()) {
        Publisher publisherOut = new Publisher();
        BeanUtils.copyProperties(publisherOut, apiPublisherOut);
        publishers.add(publisher);
       }
           response.setSuccess(true);
View Full Code Here


    getPublisherDetail.getPublisherId().add(username);
   
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
           JUDDIApiPortType apiService = transport.getJUDDIApiService();
           PublisherDetail publisherDetail = apiService.getPublisherDetail(getPublisherDetail);
              org.apache.juddi.api_v3.Publisher publisher = publisherDetail.getPublisher().get(0);
              if ("true".equalsIgnoreCase(publisher.getIsAdmin())) {
               UDDIClerkManager manager =  WebHelper.getUDDIClerkManager(session.getServletContext());
               logger.info("managerName=" + manager.getName());
               manager.restart();
               response.setMessage("Successfull manager restart.");
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSavePublisher(em, body);
     
      PublisherDetail result = new PublisherDetail();
 
      List<org.apache.juddi.api_v3.Publisher> apiPublisherList = body.getPublisher();
      for (org.apache.juddi.api_v3.Publisher apiPublisher : apiPublisherList) {
       
        org.apache.juddi.model.Publisher modelPublisher = new org.apache.juddi.model.Publisher();
       
        MappingApiToModel.mapPublisher(apiPublisher, modelPublisher);
       
        Object existingUddiEntity = em.find(modelPublisher.getClass(), modelPublisher.getAuthorizedName());
        if (existingUddiEntity != null)
          em.remove(existingUddiEntity);
       
        em.persist(modelPublisher);
       
        result.getPublisher().add(apiPublisher);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      PublisherDetail result = new PublisherDetail();
     
      List<String> publisherIdList = body.getPublisherId();
      for (String publisherId : publisherIdList) {
       
        org.apache.juddi.model.Publisher modelPublisher = em.find(org.apache.juddi.model.Publisher.class, publisherId);
        if (modelPublisher == null) {
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.PublisherNotFound", publisherId));
        }
       
        org.apache.juddi.api_v3.Publisher apiPublisher = new org.apache.juddi.api_v3.Publisher();
       
        MappingModelToApi.mapPublisher(modelPublisher, apiPublisher);
       
        result.getPublisher().add(apiPublisher);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      PublisherDetail result = new PublisherDetail();
     
      Query query = em.createQuery("SELECT p from Publisher as p");
      List<Publisher> modelPublisherList = query.getResultList();
     
      for (Publisher modelPublisher : modelPublisherList) {
       
        org.apache.juddi.api_v3.Publisher apiPublisher = new org.apache.juddi.api_v3.Publisher();
       
        MappingModelToApi.mapPublisher(modelPublisher, apiPublisher);
       
        result.getPublisher().add(apiPublisher);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSavePublisher(em, body);
     
      PublisherDetail result = new PublisherDetail();
 
      List<org.apache.juddi.api_v3.Publisher> apiPublisherList = body.getPublisher();
      for (org.apache.juddi.api_v3.Publisher apiPublisher : apiPublisherList) {
       
        org.apache.juddi.model.Publisher modelPublisher = new org.apache.juddi.model.Publisher();
       
        MappingApiToModel.mapPublisher(apiPublisher, modelPublisher);
       
        Object existingUddiEntity = em.find(modelPublisher.getClass(), modelPublisher.getAuthorizedName());
        if (existingUddiEntity != null)
          em.remove(existingUddiEntity);
       
        em.persist(modelPublisher);
       
        result.getPublisher().add(apiPublisher);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      PublisherDetail result = new PublisherDetail();
     
      List<String> publisherIdList = body.getPublisherId();
      for (String publisherId : publisherIdList) {
       
        org.apache.juddi.model.Publisher modelPublisher = em.find(org.apache.juddi.model.Publisher.class, publisherId);
        if (modelPublisher == null) {
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.PublisherNotFound", publisherId));
        }
       
        org.apache.juddi.api_v3.Publisher apiPublisher = new org.apache.juddi.api_v3.Publisher();
       
        MappingModelToApi.mapPublisher(modelPublisher, apiPublisher);
       
        result.getPublisher().add(apiPublisher);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      PublisherDetail result = new PublisherDetail();
     
      Query query = em.createQuery("SELECT p from Publisher as p");
      List<Publisher> modelPublisherList = query.getResultList();
     
      for (Publisher modelPublisher : modelPublisherList) {
       
        org.apache.juddi.api_v3.Publisher apiPublisher = new org.apache.juddi.api_v3.Publisher();
       
        MappingModelToApi.mapPublisher(modelPublisher, apiPublisher);
       
        result.getPublisher().add(apiPublisher);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

      SaveNode saveNode = new SaveNode();
      saveNode.setAuthInfo(userAuthToken);
      saveNode.getNode().add(clerk.getApiClerk().getNode());
      juddiApiService.saveNode(saveNode);
      //making sure our clerk info is there and up to date
      SaveClerk saveClerk = new SaveClerk();
      saveClerk.setAuthInfo(userAuthToken);
      saveClerk.getClerk().add(clerk.getApiClerk());
      juddiApiService.saveClerk(saveClerk);
      //making sure our node info is there and up to date.
      SaveNode saveToNode = new SaveNode();
      saveToNode.setAuthInfo(userAuthToken);
      saveToNode.getNode().add(toClerk.getApiClerk().getNode());
      juddiApiService.saveNode(saveToNode);
      //making sure our clerk info is there and up to date
      SaveClerk saveToClerk = new SaveClerk();
      saveToClerk.setAuthInfo(userAuthToken);
      saveToClerk.getClerk().add(toClerk.getApiClerk());
      juddiApiService.saveClerk(saveToClerk);
      logger.debug("Updating default UDDI server completed.");
     
      SaveClientSubscriptionInfo saveClientSubscriptionInfo = new SaveClientSubscriptionInfo();
      saveClientSubscriptionInfo.setAuthInfo(userAuthToken);
View Full Code Here

   
    Clerk clerk = new Clerk();
    clerk.setName("clerkName");
    clerk.setPublisher("root");
    clerk.setNode(node);
    SaveClerk saveClerk = new SaveClerk();
    saveClerk.setAuthInfo(authInfoJoe);
    saveClerk.getClerk().add(clerk);
   
    clientSubscriptionInfo.setFromClerk(clerk);
   
    Node node2 = new Node();
    node2.setSecurityUrl("http://localhost:8080/services/securityUrl2");
    node2.setCustodyTransferUrl("https://localhost:8080/services/securityUrl2");
    node2.setDescription("description2");
    node2.setInquiryUrl("http://localhost:8080/services/securityUrl2");
    node2.setPublishUrl("http://localhost:8080/services/securityUrl2");
    node2.setProxyTransport("class2");
    node2.setSubscriptionUrl("http://localhost:8080/services/securityUrl2");
    node2.setName("default2");
    node2.setManagerName("default2Manager");
    saveNode.getNode().add(node2);
   
    Clerk clerk2 = new Clerk();
    clerk2.setName("clerkName2");
    clerk2.setPublisher("root");
    clerk2.setNode(node2);
    saveClerk.getClerk().add(clerk2);
   
    clientSubscriptionInfo.setFromClerk(clerk);
   
    clientSubscriptionInfo.setSubscriptionKey("mykey");
   
View Full Code Here

TOP

Related Classes of org.apache.juddi.api_v3.rest.UriContainer

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.