getSubscriptionResults = new GetSubscriptionResults(); CoveragePeriod period = new CoveragePeriod(); GregorianCalendar calendar = new GregorianCalendar(); log.debug("Period " + period.getStartPoint() + " " + period.getEndPoint()); getSubscriptionResults.setCoveragePeriod(period); } else { log.info("Client does not yet want a notification. The next desidered notification Date " + nextDesiredNotificationDate + ". The current interval ["
publisher = this.getEntityPublisher(em, body.getAuthInfo()); new ValidateSubscription(publisher).validateGetSubscriptionResults(em, body); org.apache.juddi.model.Subscription modelSubscription = em.find(org.apache.juddi.model.Subscription.class, body.getSubscriptionKey()); SubscriptionFilter subscriptionFilter = null; try { result.setCoveragePeriod(body.getCoveragePeriod()); Date startPointDate = new Date(body.getCoveragePeriod().getStartPoint().toGregorianCalendar().getTimeInMillis()); Date endPointDate = new Date(body.getCoveragePeriod().getEndPoint().toGregorianCalendar().getTimeInMillis()); if (body.getChunkToken() != null && body.getChunkToken().length() > 0) { SubscriptionChunkToken chunkToken = em.find(SubscriptionChunkToken.class, body.getChunkToken()); throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.InvalidChunkToken", body.getChunkToken())); if (!chunkToken.getSubscriptionKey().equals(body.getSubscriptionKey())) throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken())); if (chunkToken.getStartPoint() != null && chunkToken.getStartPoint().getTime() != startPointDate.getTime()) throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken())); if (chunkToken.getEndPoint() != null && chunkToken.getEndPoint().getTime() != endPointDate.getTime()) throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken())); if (chunkToken.getExpiresAfter().before(new Date())) throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.ExpiredChunkToken", body.getChunkToken())); String chunkToken = CHUNK_TOKEN_PREFIX + UUID.randomUUID(); SubscriptionChunkToken newChunkToken = new SubscriptionChunkToken(chunkToken); newChunkToken.setSubscriptionKey(body.getSubscriptionKey()); newChunkToken.setStartPoint(startPointDate);
String subscriptionKey = body.getSubscriptionKey(); if (subscriptionKey == null || subscriptionKey.length() == 0) { throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NullKey", subscriptionKey)); body.setSubscriptionKey(subscriptionKey); CoveragePeriod coveragePeriod = body.getCoveragePeriod(); if (coveragePeriod == null) { throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
public void getSamSyndicatorSubscriptionResultsWithChunkingOnGet(String authInfoSam) { try { GetSubscriptionResults getSubResultsIn = (GetSubscriptionResults)EntityCreator.buildFromDoc(SAM_SUBSCRIPTIONRESULTS3_XML, "org.uddi.sub_v3"); getSubResultsIn.setAuthInfo(authInfoSam); iterations++; getSubResultsIn.setChunkToken(chunkToken); SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn); if (result == null)
publisher.setAuthorizedName(modelSubscription.getAuthorizedName()); log.debug("Sending out next chunk: " + chunkToken + " to " + bindingTemplate.getAccessPointUrl()); getSubscriptionResults.setChunkToken(chunkToken); resultList = subscriptionImpl.getSubscriptionResults(getSubscriptionResults, publisher); body.setSubscriptionResultsList(resultList);
/** * Create an instance of {@link GetSubscriptionResults } * */ public GetSubscriptionResults createGetSubscriptionResults() { return new GetSubscriptionResults(); }
= buildGetSubscriptionResults(subscription, notificationDate); if (getSubscriptionResults != null) { getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey()); UddiEntityPublisher publisher = new UddiEntityPublisher(); publisher.setAuthorizedName(subscription.getAuthorizedName());
String subscriptionKey = getSubscriptionResult.getSubscriptionKey(); org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo = null; String subscriptionKey = getSubscriptionResult.getSubscriptionKey(); Clerk fromClerk = clientSubscriptionInfoMap.get(subscriptionKey).getFromClerk(); Clerk toClerk = clientSubscriptionInfoMap.get(subscriptionKey).getToClerk();
public void getJoePublisherSubscriptionResults(String authInfoJoe) { try { GetSubscriptionResults getSubResultsIn = (GetSubscriptionResults)EntityCreator.buildFromDoc(JOE_SUBSCRIPTIONRESULTS_XML, "org.uddi.sub_v3"); getSubResultsIn.setAuthInfo(authInfoJoe); SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn); if (result == null) Assert.fail("Null result from getSubscriptionResults operation"); ServiceInfos sInfos=null; if (result.getServiceList()!=null) sInfos = result.getServiceList().getServiceInfos(); if (sInfos == null) Assert.fail("No result from getSubscriptionResults operation"); List<ServiceInfo> siList = sInfos.getServiceInfo(); if (siList == null || siList.size() == 0) Assert.fail("No result from getSubscriptionResults operation"); ServiceInfo siOut = siList.get(0); BusinessService bsIn = (BusinessService)EntityCreator.buildFromDoc(TckBusinessService.JOE_SERVICE_XML, "org.uddi.api_v3"); assertEquals(bsIn.getServiceKey(), siOut.getServiceKey()); TckValidator.checkNames(bsIn.getName(), siOut.getName()); } catch(Exception e) { logger.error(e.getMessage(), e); Assert.fail("No exception should be thrown"); } }
publisher = this.getEntityPublisher(em, body.getAuthInfo()); new ValidateSubscription(publisher).validateGetSubscriptionResults(em, body); org.apache.juddi.model.Subscription modelSubscription = em.find(org.apache.juddi.model.Subscription.class, body.getSubscriptionKey()); SubscriptionFilter subscriptionFilter = null; try { result.setCoveragePeriod(body.getCoveragePeriod()); Date startPointDate = new Date(body.getCoveragePeriod().getStartPoint().toGregorianCalendar().getTimeInMillis()); Date endPointDate = new Date(body.getCoveragePeriod().getEndPoint().toGregorianCalendar().getTimeInMillis()); if (body.getChunkToken() != null && body.getChunkToken().length() > 0) { SubscriptionChunkToken chunkToken = em.find(SubscriptionChunkToken.class, body.getChunkToken()); throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.InvalidChunkToken", body.getChunkToken())); if (!chunkToken.getSubscriptionKey().equals(body.getSubscriptionKey())) throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken())); if (chunkToken.getStartPoint() != null && chunkToken.getStartPoint().getTime() != startPointDate.getTime()) throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken())); if (chunkToken.getEndPoint() != null && chunkToken.getEndPoint().getTime() != endPointDate.getTime()) throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.NonMatchingChunkToken", body.getChunkToken())); if (chunkToken.getExpiresAfter().before(new Date())) throw new InvalidValueException(new ErrorMessage("errors.getsubscriptionresult.ExpiredChunkToken", body.getChunkToken())); String chunkToken = CHUNK_TOKEN_PREFIX + UUID.randomUUID(); SubscriptionChunkToken newChunkToken = new SubscriptionChunkToken(chunkToken); newChunkToken.setSubscriptionKey(body.getSubscriptionKey()); newChunkToken.setStartPoint(startPointDate);
String subscriptionKey = body.getSubscriptionKey(); if (subscriptionKey == null || subscriptionKey.length() == 0) { throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NullKey", subscriptionKey)); body.setSubscriptionKey(subscriptionKey); CoveragePeriod coveragePeriod = body.getCoveragePeriod(); if (coveragePeriod == null) { throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
getSubResultsIn.setAuthInfo(authInfoSam); FindTModel ftm = new FindTModel(); ftm.setAuthInfo(authInfoSam); iterations++; getSubResultsIn.setChunkToken(chunkToken); SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn); if (result == null)
publisher.setAuthorizedName(modelSubscription.getAuthorizedName()); log.debug("Sending out next chunk: " + chunkToken + " to " + bindingTemplate.getAccessPointUrl()); getSubscriptionResults.setChunkToken(chunkToken); resultList = subscriptionImpl.getSubscriptionResults(getSubscriptionResults, publisher); body.setSubscriptionResultsList(resultList);
= buildGetSubscriptionResults(subscription, notificationDate); if (getSubscriptionResults != null) { getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey()); UddiEntityPublisher publisher = new UddiEntityPublisher(); publisher.setAuthorizedName(subscription.getAuthorizedName());
String subscriptionKey = getSubscriptionResult.getSubscriptionKey(); org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo = null; String subscriptionKey = getSubscriptionResult.getSubscriptionKey(); Clerk fromClerk = clientSubscriptionInfoMap.get(subscriptionKey).getFromClerk(); Clerk toClerk = clientSubscriptionInfoMap.get(subscriptionKey).getToClerk();
public void getSamSyndicatorSubscriptionResults(String authInfoSam) { try { GetSubscriptionResults getSubResultsIn = (GetSubscriptionResults)EntityCreator.buildFromDoc(SAM_SUBSCRIPTIONRESULTS_XML, "org.uddi.sub_v3"); getSubResultsIn.setAuthInfo(authInfoSam);
getSubscriptionResults = new GetSubscriptionResults(); CoveragePeriod period = new CoveragePeriod(); GregorianCalendar calendar = new GregorianCalendar(); log.debug("Period " + period.getStartPoint() + " " + period.getEndPoint()); getSubscriptionResults.setCoveragePeriod(period); } else { log.info("Client does not yet want a notification. The next desidered notification Date " + nextDesiredNotificationDate + ". The current interval ["