Package org.apache.juddi.api_v3

Examples of org.apache.juddi.api_v3.ClientSubscriptionInfoDetail


    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();
     
      Query query = em.createQuery("SELECT cs from ClientSubscriptionInfo as cs");
      List<org.apache.juddi.model.ClientSubscriptionInfo> modelClientSubscriptionInfoList = query.getResultList();
     
      for (ClientSubscriptionInfo modelClientSubscriptionInfo : modelClientSubscriptionInfoList) {
       
        org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
       
        MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
       
        result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here


    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();
     
      List<String> subscriptionKeyList = body.getClientSubscriptionKey();
      for (String subscriptionKey : subscriptionKeyList) {
       
        org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo =
          em.find(org.apache.juddi.model.ClientSubscriptionInfo.class, subscriptionKey);
        if (modelClientSubscriptionInfo == null) {
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscripKeyNotFound", subscriptionKey));
        }
       
        org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
       
        MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
       
        result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateClientSubscriptionInfo(publisher).validateSaveClientSubscriptionInfo(em, body);
     
      ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();
 
      List<org.apache.juddi.api_v3.ClientSubscriptionInfo> apiClientSubscriptionInfoList = body.getClientSubscriptionInfo();
      for (org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo : apiClientSubscriptionInfoList) {
       
        org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo = new org.apache.juddi.model.ClientSubscriptionInfo();
       
        MappingApiToModel.mapClientSubscriptionInfo(apiClientSubscriptionInfo, modelClientSubscriptionInfo);
       
        Object existingUddiEntity = em.find(modelClientSubscriptionInfo.getClass(), modelClientSubscriptionInfo.getSubscriptionKey());
        if (existingUddiEntity != null)
          em.remove(existingUddiEntity);
       
        em.persist(modelClientSubscriptionInfo);
       
        result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();
     
      Query query = em.createQuery("SELECT cs from ClientSubscriptionInfo as cs");
      List<org.apache.juddi.model.ClientSubscriptionInfo> modelClientSubscriptionInfoList = query.getResultList();
     
      for (ClientSubscriptionInfo modelClientSubscriptionInfo : modelClientSubscriptionInfoList) {
       
        org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
       
        MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
       
        result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();
     
      List<String> subscriptionKeyList = body.getClientSubscriptionKey();
      for (String subscriptionKey : subscriptionKeyList) {
       
        org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo =
          em.find(org.apache.juddi.model.ClientSubscriptionInfo.class, subscriptionKey);
        if (modelClientSubscriptionInfo == null) {
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscripKeyNotFound", subscriptionKey));
        }
       
        org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
       
        MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
       
        result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

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

                        new ValidateClientSubscriptionInfo(publisher).validateSaveClientSubscriptionInfo(em, body);

                        ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();

                        List<org.apache.juddi.api_v3.ClientSubscriptionInfo> apiClientSubscriptionInfoList = body.getClientSubscriptionInfo();
                        for (org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo : apiClientSubscriptionInfoList) {

                                org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo = new org.apache.juddi.model.ClientSubscriptionInfo();

                                MappingApiToModel.mapClientSubscriptionInfo(apiClientSubscriptionInfo, modelClientSubscriptionInfo);

                                Object existingUddiEntity = em.find(modelClientSubscriptionInfo.getClass(), modelClientSubscriptionInfo.getSubscriptionKey());
                                if (existingUddiEntity != null) {
                                        em.remove(existingUddiEntity);
                                }

                                em.persist(modelClientSubscriptionInfo);

                                result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
                        }

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

                try {
                        tx.begin();

                        this.getEntityPublisher(em, body.getAuthInfo());

                        ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();

                        Query query = em.createQuery("SELECT cs from ClientSubscriptionInfo as cs");
                        List<org.apache.juddi.model.ClientSubscriptionInfo> modelClientSubscriptionInfoList = query.getResultList();

                        for (ClientSubscriptionInfo modelClientSubscriptionInfo : modelClientSubscriptionInfoList) {

                                org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();

                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);

                                result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
                        }

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

                try {
                        tx.begin();

                        this.getEntityPublisher(em, body.getAuthInfo());

                        ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();

                        List<String> subscriptionKeyList = body.getClientSubscriptionKey();
                        for (String subscriptionKey : subscriptionKeyList) {

                                org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo = null;
                                try {
                                        modelClientSubscriptionInfo = em.find(org.apache.juddi.model.ClientSubscriptionInfo.class, subscriptionKey);
                                } catch (ClassCastException e) {
                                }
                                if (modelClientSubscriptionInfo == null) {
                                        throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscripKeyNotFound", subscriptionKey));
                                }

                                org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();

                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);

                                result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
                        }

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

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateClientSubscriptionInfo(publisher).validateSaveClientSubscriptionInfo(em, body);
     
      ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();
 
      List<org.apache.juddi.api_v3.ClientSubscriptionInfo> apiClientSubscriptionInfoList = body.getClientSubscriptionInfo();
      for (org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo : apiClientSubscriptionInfoList) {
       
        org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo = new org.apache.juddi.model.ClientSubscriptionInfo();
       
        MappingApiToModel.mapClientSubscriptionInfo(apiClientSubscriptionInfo, modelClientSubscriptionInfo);
       
        Object existingUddiEntity = em.find(modelClientSubscriptionInfo.getClass(), modelClientSubscriptionInfo.getSubscriptionKey());
        if (existingUddiEntity != null)
          em.remove(existingUddiEntity);
       
        em.persist(modelClientSubscriptionInfo);
       
        result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

    try {
      tx.begin();
 
      this.getEntityPublisher(em, body.getAuthInfo());
     
      ClientSubscriptionInfoDetail result = new ClientSubscriptionInfoDetail();
     
      Query query = em.createQuery("SELECT cs from ClientSubscriptionInfo as cs");
      List<org.apache.juddi.model.ClientSubscriptionInfo> modelClientSubscriptionInfoList = query.getResultList();
     
      for (ClientSubscriptionInfo modelClientSubscriptionInfo : modelClientSubscriptionInfoList) {
       
        org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
       
        MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
       
        result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

TOP

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

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.