Package org.apache.juddi.validation

Examples of org.apache.juddi.validation.ValidatePublish


    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      ValidatePublish validator = new ValidatePublish(publisher);
      validator.validateSaveService(em, body, null);
     
      ServiceDetail result = new ServiceDetail();
 
      List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = body.getBusinessService();
      for (org.uddi.api_v3.BusinessService apiBusinessService : apiBusinessServiceList) {
       
        org.apache.juddi.model.BusinessService modelBusinessService = new org.apache.juddi.model.BusinessService();
        org.apache.juddi.model.BusinessEntity modelBusinessEntity = new org.apache.juddi.model.BusinessEntity();
        modelBusinessEntity.setEntityKey(apiBusinessService.getBusinessKey());
       
        MappingApiToModel.mapBusinessService(apiBusinessService, modelBusinessService, modelBusinessEntity);
 
        setOperationalInfo(em, modelBusinessService, publisher, false);
 
        em.persist(modelBusinessService);
       
        result.getBusinessService().add(apiBusinessService);
       
        validator.validateSaveServiceMax(em, modelBusinessService.getBusinessEntity().getEntityKey());
      }
     
     
      tx.commit();
                        long procTime = System.nanoTime() - startTime;
View Full Code Here


    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
 
      new ValidatePublish(publisher).validateSaveTModel(em, body, null);
 
      TModelDetail result = new TModelDetail();
 
      List<org.uddi.api_v3.TModel> apiTModelList = body.getTModel();
      for (org.uddi.api_v3.TModel apiTModel : apiTModelList) {
View Full Code Here

    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, authInfo);
     
      new ValidatePublish(publisher).validateSetPublisherAssertions(em, publisherAssertion);
     
      List<?> businessKeysFound = null;
      businessKeysFound = FindBusinessByPublisherQuery.select(em, null, publisher, businessKeysFound);
 
      // First, wipe out all previous assertions associated with this publisher
View Full Code Here

    try {
      tx.begin();
 
      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) {
View Full Code Here

    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateDeletePublisher(em, body);
 
      List<String> entityKeyList = body.getPublisherId();
      for (String entityKey : entityKeyList) {
        Object obj = em.find(org.apache.juddi.model.Publisher.class, entityKey);
        em.remove(obj);
View Full Code Here

    try {
      tx.begin();
   
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateAdminDeleteTModel(em, body);
     
      List<String> entityKeyList = body.getTModelKey();
      for (String entityKey : entityKeyList) {
        Object obj = em.find(org.apache.juddi.model.Tmodel.class, entityKey);
        em.remove(obj);
View Full Code Here

      String keyPartition = entityKey.substring(0, entityKey.lastIndexOf(KeyGenerator.PARTITION_SEPARATOR));
      if (!rootPartition.equalsIgnoreCase(keyPartition))
        throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));
    }

    ValidatePublish validatePublish = new ValidatePublish(rootPublisher);
   
    validatePublish.validateNames(businessEntity.getName());
    validatePublish.validateDiscoveryUrls(businessEntity.getDiscoveryURLs());
    validatePublish.validateContacts(businessEntity.getContacts(),config);
    validatePublish.validateCategoryBag(businessEntity.getCategoryBag(),config);
    validatePublish.validateIdentifierBag(businessEntity.getIdentifierBag(),config);

    org.uddi.api_v3.BusinessServices businessServices = businessEntity.getBusinessServices();
    if (businessServices != null) {
      List<org.uddi.api_v3.BusinessService> businessServiceList = businessServices.getBusinessService();
      if (businessServiceList == null || businessServiceList.size() == 0)
View Full Code Here

      String keyPartition = entityKey.substring(0, entityKey.lastIndexOf(KeyGenerator.PARTITION_SEPARATOR));
      if (!rootPartition.equalsIgnoreCase(keyPartition))
        throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));
    }
   
    ValidatePublish validatePublish = new ValidatePublish(rootPublisher);
   
    validatePublish.validateNames(businessService.getName());
    validatePublish.validateCategoryBag(businessService.getCategoryBag(), config);

    org.uddi.api_v3.BindingTemplates bindingTemplates = businessService.getBindingTemplates();
    if (bindingTemplates != null) {
      List<org.uddi.api_v3.BindingTemplate> bindingTemplateList = bindingTemplates.getBindingTemplate();
      if (bindingTemplateList == null || bindingTemplateList.size() == 0)
View Full Code Here

      String keyPartition = entityKey.substring(0, entityKey.lastIndexOf(KeyGenerator.PARTITION_SEPARATOR));
      if (!rootPartition.equalsIgnoreCase(keyPartition))
        throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));
    }
   
    ValidatePublish validatePublish = new ValidatePublish(rootPublisher);
   
    validatePublish.validateCategoryBag(bindingTemplate.getCategoryBag(), config);
    validatePublish.validateTModelInstanceDetails(bindingTemplate.getTModelInstanceDetails(),config);

  }
View Full Code Here

                try {
                        tx.begin();

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

                        ValidatePublish validator = new ValidatePublish(publisher);
                        validator.validateSaveBusiness(em, body, null);

                        BusinessDetail result = new BusinessDetail();

                        List<org.uddi.api_v3.BusinessEntity> apiBusinessEntityList = body.getBusinessEntity();
                        for (org.uddi.api_v3.BusinessEntity apiBusinessEntity : apiBusinessEntityList) {

                                org.apache.juddi.model.BusinessEntity modelBusinessEntity = new org.apache.juddi.model.BusinessEntity();

                               
                                MappingApiToModel.mapBusinessEntity(apiBusinessEntity, modelBusinessEntity);
                                nodeId = nodeID;

                                setOperationalInfo(em, modelBusinessEntity, publisher);

                                em.persist(modelBusinessEntity);

                                result.getBusinessEntity().add(apiBusinessEntity);
                        }

                        //check how many business this publisher owns.
                        validator.validateSaveBusinessMax(em);

                        tx.commit();

                        return result;
                } catch (DispositionReportFaultMessage drfm) {
View Full Code Here

TOP

Related Classes of org.apache.juddi.validation.ValidatePublish

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.