Examples of UddiEntityPublisher


Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
     
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSaveBinding(em, body, null);
 
      BindingDetail result = new BindingDetail();
     
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
     
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSaveBusiness(em, body, null);
 
      BusinessDetail result = new BusinessDetail();
     
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSaveService(em, body, null);
     
      ServiceDetail result = new ServiceDetail();
 
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
 
      new ValidatePublish(publisher).validateSaveTModel(em, body, null);
 
      TModelDetail result = new TModelDetail();
 
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    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
      DeletePublisherAssertionByBusinessQuery.delete(em, businessKeysFound);
     
      // Slate is clean for all assertions involving this publisher, now we simply need to add the new ones (and they will all be "new").
      List<org.uddi.api_v3.PublisherAssertion> apiPubAssertionList = publisherAssertion.value;
      for (org.uddi.api_v3.PublisherAssertion apiPubAssertion : apiPubAssertionList) {
       
        org.apache.juddi.model.PublisherAssertion modelPubAssertion = new org.apache.juddi.model.PublisherAssertion();
       
        MappingApiToModel.mapPublisherAssertion(apiPubAssertion, modelPubAssertion);
       
        org.apache.juddi.model.BusinessEntity beFrom = em.find(org.apache.juddi.model.BusinessEntity.class, modelPubAssertion.getId().getFromKey());
        org.apache.juddi.model.BusinessEntity beTo = em.find(org.apache.juddi.model.BusinessEntity.class, modelPubAssertion.getId().getToKey());
        modelPubAssertion.setBusinessEntityByFromKey(beFrom);
        modelPubAssertion.setBusinessEntityByToKey(beTo);
       
        modelPubAssertion.setFromCheck("false");
        modelPubAssertion.setToCheck("false");
       
        em.persist(modelPubAssertion);
 
        if (publisher.isOwner(modelPubAssertion.getBusinessEntityByFromKey()))
          modelPubAssertion.setFromCheck("true");
        if (publisher.isOwner(modelPubAssertion.getBusinessEntityByToKey()))
          modelPubAssertion.setToCheck("true");
       
      }
 
      tx.commit();
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
      new ValidateSubscription(publisher).validateDeleteSubscription(em, body);
     
          List<String> subscriptionKeyList = body.getSubscriptionKey();
          for (String subscriptionKey : subscriptionKeyList) {
                  Object obj = em.find(org.apache.juddi.model.Subscription.class, subscriptionKey);
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
        EntityTransaction tx = em.getTransaction();
        try {
          tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, authInfo);
     
      List<Subscription> result = new ArrayList<Subscription>(0);
     
      List<org.apache.juddi.model.Subscription> modelSubscriptionList = (List<org.apache.juddi.model.Subscription>)FindSubscriptionByPublisherQuery.select(em, publisher.getAuthorizedName());
      if (modelSubscriptionList != null && modelSubscriptionList.size() > 0) {
        for (org.apache.juddi.model.Subscription modelSubscription : modelSubscriptionList) {
         
          Subscription apiSubscription = new Subscription();
         
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, authInfo);
      new ValidateSubscription(publisher).validateSubscriptions(em, subscription.value);
     
      List<org.uddi.sub_v3.Subscription> apiSubscriptionList = subscription.value;
      for (org.uddi.sub_v3.Subscription apiSubscription : apiSubscriptionList) {
       
        org.apache.juddi.model.Subscription modelSubscription = new org.apache.juddi.model.Subscription();
       
        Object existing = em.find(org.apache.juddi.model.Subscription.class, apiSubscription.getSubscriptionKey());
        if (existing != null) {
          org.apache.juddi.model.Subscription existingEntity = (org.apache.juddi.model.Subscription) existing;
          doRenewal(existingEntity, apiSubscription);
          //carrying over the created and last notified dates if this is a renewal.
          modelSubscription.setCreateDate(existingEntity.getCreateDate());
          modelSubscription.setLastNotified(existingEntity.getLastNotified());
          em.remove(existing);
        } else {
          modelSubscription.setCreateDate(new Date());
        }
 
        doSubscriptionExpirationDate(apiSubscription);
       
        MappingApiToModel.mapSubscription(apiSubscription, modelSubscription);
       
        modelSubscription.setAuthorizedName(publisher.getAuthorizedName());
       
        // Add the matching keys to the match collection
        List<?> keys = getSubscriptionMatches(apiSubscription.getSubscriptionFilter(), em);
        if (keys != null && keys.size() > 0) {
          for (Object key : keys) {
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

   
    if (modelAuthToken.getTokenState() == AUTHTOKEN_RETIRED)
      throw new AuthTokenRequiredException(new ErrorMessage("errors.auth.AuthInvalid"));
   
    Authenticator authenticator = AuthenticatorFactory.getAuthenticator();
    UddiEntityPublisher entityPublisher = authenticator.identify(authInfo, modelAuthToken.getAuthorizedName());
   
    // Must make sure the returned publisher has all the necessary fields filled
    if (entityPublisher == null)
      throw new AuthTokenRequiredException(new ErrorMessage("errors.auth.AuthInvalid"));

    if (entityPublisher.getAuthorizedName() == null)
      throw new AuthTokenRequiredException(new ErrorMessage("errors.auth.AuthInvalid"));

    // Auth token is being used.  Adjust appropriate values so that it's internal 'expiration clock' is reset.
    modelAuthToken.setLastUsed(new Date());
    modelAuthToken.setNumberOfUses(modelAuthToken.getNumberOfUses() + 1);
View Full Code Here

Examples of org.apache.juddi.model.UddiEntityPublisher

    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSavePublisher(em, body);
     
      PublisherDetail result = new PublisherDetail();
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.