Examples of withStatus()


Examples of com.almende.eve.entity.activity.Activity.withStatus()

    */
   
    // check time constraints
    Long duration = activity.withConstraints().withTime().getDuration();
    if (duration != null) {
      String start = activity.withStatus().getStart();
      String end = activity.withStatus().getEnd();
      if (start != null && end != null) {
        DateTime startTime = new DateTime(start);
        DateTime endTime = new DateTime(end);
        Interval interval = new Interval(startTime, endTime);
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

   
    // check time constraints
    Long duration = activity.withConstraints().withTime().getDuration();
    if (duration != null) {
      String start = activity.withStatus().getStart();
      String end = activity.withStatus().getEnd();
      if (start != null && end != null) {
        DateTime startTime = new DateTime(start);
        DateTime endTime = new DateTime(end);
        Interval interval = new Interval(startTime, endTime);
        if (interval.toDurationMillis() != duration) {
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

              + "Changed end time to match the duration of "
              + duration + " ms");

          // duration does not match. adjust the end time
          endTime = startTime.plus(duration);
          activity.withStatus().setEnd(endTime.toString());
          activity.withStatus().setUpdated(DateTime.now().toString());

          changed = true;
        }
      }
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

              + duration + " ms");

          // duration does not match. adjust the end time
          endTime = startTime.plus(duration);
          activity.withStatus().setEnd(endTime.toString());
          activity.withStatus().setUpdated(DateTime.now().toString());

          changed = true;
        }
      }
    }
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

      }
    }
   
    // location constraints
    String newLocation = activity.withConstraints().withLocation().getSummary();
    String oldLocation = activity.withStatus().withLocation().getSummary();
    if (newLocation != null && !newLocation.equals(oldLocation)) {
      activity.withStatus().withLocation().setSummary(newLocation);
      changed = true;
    }
   
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

   
    // location constraints
    String newLocation = activity.withConstraints().withLocation().getSummary();
    String oldLocation = activity.withStatus().withLocation().getSummary();
    if (newLocation != null && !newLocation.equals(oldLocation)) {
      activity.withStatus().withLocation().setSummary(newLocation);
      changed = true;
    }
   
    if (changed) {
      // store the updated activity
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

    logger.info("syncEvents started");
    Activity activity = getActivity();

    boolean changed = false;
    if (activity != null) {
      String updatedBefore = activity.withStatus().getUpdated();

      for (Attendee attendee : activity.withConstraints().withAttendees()) {
        String agent = attendee.getAgent();
        if (agent != null) {
          if (attendee.getResponseStatus() != RESPONSE_STATUS.declined) {
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

          }
        }
      }

      activity = getActivity();
      String updatedAfter = activity.withStatus().getUpdated();

      changed = !updatedBefore.equals(updatedAfter);
    }
   
    return changed;
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

    }

    // Check if the activity is finished
    // If not, schedule a new update task. Else we are done
    Activity activity = getActivity();
    String start =   (activity != null) ? activity.withStatus().getStart() : null;
    String updated = (activity != null) ? activity.withStatus().getUpdated() : null;
    boolean isFinished = false;
    if (start != null && (new DateTime(start)).isBefore(DateTime.now())) {
      // start of the event is in the past
      isFinished = true;
View Full Code Here

Examples of com.almende.eve.entity.activity.Activity.withStatus()

    // Check if the activity is finished
    // If not, schedule a new update task. Else we are done
    Activity activity = getActivity();
    String start =   (activity != null) ? activity.withStatus().getStart() : null;
    String updated = (activity != null) ? activity.withStatus().getUpdated() : null;
    boolean isFinished = false;
    if (start != null && (new DateTime(start)).isBefore(DateTime.now())) {
      // start of the event is in the past
      isFinished = true;
      if (updated != null && (new DateTime(updated)).isAfter(new DateTime(start))) {
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.