Examples of CoveragePeriod


Examples of org.uddi.sub_v3.CoveragePeriod

      getSubscriptionResults.setAuthInfo(userAuthToken);
      getSubscriptionResults.setSubscriptionKey(modelSubscription.getSubscriptionKey());
     
      XMLGregorianCalendar calendarStart = DatatypeFactory.newInstance().newXMLGregorianCalendar(modelSubscription.getCoverageStart());
      XMLGregorianCalendar calendarEnd = DatatypeFactory.newInstance().newXMLGregorianCalendar(modelSubscription.getCoverageEnd());
      CoveragePeriod coverage = new CoveragePeriod();
      coverage.setStartPoint(calendarStart);
      coverage.setEndPoint(calendarEnd);
      getSubscriptionResults.setCoveragePeriod(coverage);
     
      String authToken = (String) session.getAttribute("token-" + modelSubscription.getFromClerkName());
      getSubscriptionResults.setAuthInfo(authToken);
            SyncSubscription syncSubscription = new SyncSubscription();
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

    duration.addTo(nextDesiredNotificationDate);

    if (subscription.getLastNotified()==null || nextDesiredNotificationDate.after(startPoint) && nextDesiredNotificationDate.before(endPoint)) {
      getSubscriptionResults = new GetSubscriptionResults();
     
      CoveragePeriod period = new CoveragePeriod();
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.setTimeInMillis(startPoint.getTime());
      period.setStartPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      calendar.setTimeInMillis(endPoint.getTime());
      period.setEndPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      getSubscriptionResults.setCoveragePeriod(period);
    }
    return getSubscriptionResults;
   
  }
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

    Date expiresAfter = ((org.apache.juddi.model.Subscription)obj).getExpiresAfter();
    Date now = new Date();
    if (expiresAfter.getTime() < now.getTime())
      throw new InvalidKeyPassedException(new ErrorMessage("errors.getsubscriptionresult.SubscriptionExpired", subscriptionKey));
   
    CoveragePeriod coveragePeriod = body.getCoveragePeriod();
    if (coveragePeriod == null)
      throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
   
    if (coveragePeriod.getStartPoint() == null || coveragePeriod.getEndPoint() == null)
      throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.InvalidDateInCoveragePeriod"));
   
    GregorianCalendar startPoint = coveragePeriod.getStartPoint().toGregorianCalendar();
    GregorianCalendar endPoint = coveragePeriod.getEndPoint().toGregorianCalendar();
    if (startPoint.getTimeInMillis() > endPoint.getTimeInMillis())
      throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.StartPointAfterEndPoint", startPoint.toString()));   
  }
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

    //nextDesiredNotificationDate = lastTime + the Interval Duration, which should be:
    //AFTER the lastNotified time and BEFORE the endTime (current time). If it is
    //after the endTime, then the user does not want a notification yet, so we accumulate.
    if (subscription.getLastNotified()==null || nextDesiredNotificationDate.after(startPoint) && nextDesiredNotificationDate.before(endPoint)) {
      getSubscriptionResults = new GetSubscriptionResults();
      CoveragePeriod period = new CoveragePeriod();
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.setTimeInMillis(startPoint.getTime());
      period.setStartPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      calendar.setTimeInMillis(endPoint.getTime());
      period.setEndPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      if (log.isDebugEnabled()) log.debug("Period " + period.getStartPoint() + " " + period.getEndPoint());
      getSubscriptionResults.setCoveragePeriod(period);
    } else {
      log.debug("Client does not yet want a notification. The next desidered notification Date " + nextDesiredNotificationDate + ". The current interval ["
        + startPoint + " , " + endPoint + "] therefore skipping this notification cycle.");
      if (desiredDate==null || nextDesiredNotificationDate.getTime() < desiredDate.getTime()) {
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

    duration.addTo(nextDesiredNotificationDate);

    if (subscription.getLastNotified()==null || nextDesiredNotificationDate.after(startPoint) && nextDesiredNotificationDate.before(endPoint)) {
      getSubscriptionResults = new GetSubscriptionResults();
     
      CoveragePeriod period = new CoveragePeriod();
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.setTimeInMillis(startPoint.getTime());
      period.setStartPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      calendar.setTimeInMillis(endPoint.getTime());
      period.setEndPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      getSubscriptionResults.setCoveragePeriod(period);
    }
    return getSubscriptionResults;
   
  }
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

    //nextDesiredNotificationDate = lastTime + the Interval Duration, which should be:
    //AFTER the lastNotified time and BEFORE the endTime (current time). If it is
    //after the endTime, then the user does not want a notification yet, so we accumulate.
    if (subscription.getLastNotified()==null || nextDesiredNotificationDate.after(startPoint) && nextDesiredNotificationDate.before(endPoint)) {
      getSubscriptionResults = new GetSubscriptionResults();
      CoveragePeriod period = new CoveragePeriod();
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.setTimeInMillis(startPoint.getTime());
      period.setStartPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      calendar.setTimeInMillis(endPoint.getTime());
      period.setEndPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      if (log.isDebugEnabled()) log.debug("Period " + period.getStartPoint() + " " + period.getEndPoint());
      getSubscriptionResults.setCoveragePeriod(period);
    } else {
      log.debug("Client does not yet want a notification. The next desidered notification Date " + nextDesiredNotificationDate + ". The current interval ["
        + startPoint + " , " + endPoint + "] therefore skipping this notification cycle.");
      if (desiredDate==null || nextDesiredNotificationDate.getTime() < desiredDate.getTime()) {
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

    Date expiresAfter = ((org.apache.juddi.model.Subscription)obj).getExpiresAfter();
    Date now = new Date();
    if (expiresAfter.getTime() < now.getTime())
      throw new InvalidKeyPassedException(new ErrorMessage("errors.getsubscriptionresult.SubscriptionExpired", subscriptionKey));
   
    CoveragePeriod coveragePeriod = body.getCoveragePeriod();
    if (coveragePeriod == null)
      throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
   
    if (coveragePeriod.getStartPoint() == null || coveragePeriod.getEndPoint() == null)
      throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.InvalidDateInCoveragePeriod"));
   
    GregorianCalendar startPoint = coveragePeriod.getStartPoint().toGregorianCalendar();
    GregorianCalendar endPoint = coveragePeriod.getEndPoint().toGregorianCalendar();
    if (startPoint.getTimeInMillis() > endPoint.getTimeInMillis())
      throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.StartPointAfterEndPoint", startPoint.toString()));   
  }
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

    //nextDesiredNotificationDate = lastTime + the Interval Duration, which should be:
    //AFTER the lastNotified time and BEFORE the endTime (current time). If it is
    //after the endTime, then the user does not want a notification yet, so we accumulate.
    if (subscription.getLastNotified()==null || nextDesiredNotificationDate.after(startPoint) && nextDesiredNotificationDate.before(endPoint)) {
      getSubscriptionResults = new GetSubscriptionResults();
      CoveragePeriod period = new CoveragePeriod();
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.setTimeInMillis(startPoint.getTime());
      period.setStartPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      calendar.setTimeInMillis(endPoint.getTime());
      period.setEndPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
      if (log.isDebugEnabled()) log.debug("Period " + period.getStartPoint() + " " + period.getEndPoint());
      getSubscriptionResults.setCoveragePeriod(period);
    } else {
      log.debug("Client does not yet want a notification. The next desidered notification Date " + nextDesiredNotificationDate + ". The current interval ["
        + startPoint + " , " + endPoint + "] therefore skipping this notification cycle.");
      if (desiredDate==null || nextDesiredNotificationDate.getTime() < desiredDate.getTime()) {
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

        Date now = new Date();
        if (expiresAfter.getTime() < now.getTime()) {
            throw new InvalidKeyPassedException(new ErrorMessage("errors.getsubscriptionresult.SubscriptionExpired", subscriptionKey));
        }

        CoveragePeriod coveragePeriod = body.getCoveragePeriod();
        if (coveragePeriod == null) {
            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
        }

        if (coveragePeriod.getStartPoint() == null || coveragePeriod.getEndPoint() == null) {
            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.InvalidDateInCoveragePeriod"));
        }

        GregorianCalendar startPoint = coveragePeriod.getStartPoint().toGregorianCalendar();
        GregorianCalendar endPoint = coveragePeriod.getEndPoint().toGregorianCalendar();
        if (startPoint.getTimeInMillis() > endPoint.getTimeInMillis()) {
            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.StartPointAfterEndPoint", startPoint.toString()));
        }
    }
View Full Code Here

Examples of org.uddi.sub_v3.CoveragePeriod

                        key = saveBusiness.getBusinessEntity().get(0).getBusinessKey();

                        GetSubscriptionResults gsr = new GetSubscriptionResults();
                        gsr.setAuthInfo(authInfoJoe);
                        gsr.setSubscriptionKey(null);
                        gsr.setCoveragePeriod(new CoveragePeriod());
                        GregorianCalendar gcal = new GregorianCalendar();
                        gcal.setTimeInMillis(System.currentTimeMillis());
                        gcal.add(Calendar.HOUR, -1);
                        gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
                        gcal = new GregorianCalendar();
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.