Package net.fortuna.ical4j.model.property

Examples of net.fortuna.ical4j.model.property.RRule


        sb.append("=");
        sb.append(recurEndDT.toString());
      }
      try {
        Recur recur = new Recur(sb.toString());
        RRule rrule = new RRule(recur);
        return rrule.getValue();
      } catch (ParseException e) {
        Tracing.createLoggerFor(CalendarUtils.class).error("cannot create recurrence rule: " + recurrence.toString(), e);
      }
    }
   
View Full Code Here


    // recurrence
    String recurrence = kEvent.getRecurrenceRule();
    if(recurrence != null && !recurrence.equals("")) {
      try {
        Recur recur = new Recur(recurrence);
        RRule rrule = new RRule(recur);
        vEventProperties.add(rrule);
      } catch (ParseException e) {
        Tracing.createLoggerFor(getClass()).error("cannot create recurrence rule: " + recurrence.toString(), e);
      }
    }
View Full Code Here

    public VEvent getRecessEvent() {
        if (startRecess == null)
            return null;
        VEvent v = new VEvent(getStartRecessDate(), "Recess Week");
        PropertyList pl = v.getProperties();
        pl.add(new RRule(new Recur(Recur.DAILY, 5)));
        try {
            UidGenerator ug = new UidGenerator("1");
            pl.add(ug.generateUid());
        } catch (SocketException ex) {
        }
View Full Code Here

        pl.add(new Summary(course.getCourseName() + " " + ct.getClassType()
                + " " + ct.getRemark()));
        String[] split = ct.getSemesterTimetable().getStartExam().split("-");
        String str = split[0] + split[1] + split[2];
        try {
            pl.add(new RRule(new Recur(Recur.WEEKLY, new Date(str))));
        } catch (ParseException ex) {
            Logger.getLogger(ClassVEvent.class).error("Error when parsing "
                    + "recurrence rule for " + course.getCourseName()
                    + " class timetable", ex);
        }
View Full Code Here

            if (day == java.util.Calendar.SUNDAY)
                recur.getDayList().add(new WeekDay(week + "SU"));
        }
       
        recur.setWeekStartDay("MO");
        return new RRule(recur);
    }
View Full Code Here

          if (teamEvent.hasRecurrence() == true) {
            final Recur recur = teamEvent.getRecurrenceObject();
            if (recur.getUntil() != null) {
              recur.setUntil(ICal4JUtils.getICal4jDateTime(CalendarUtils.getEndOfDay(recur.getUntil(), timeZone), timeZone));
            }
            final RRule rrule = new RRule(recur);
            vEvent.getProperties().add(rrule);
            if (teamEvent.getRecurrenceExDate() != null) {
              final List<net.fortuna.ical4j.model.Date> exDates = ICal4JUtils.parseISODateStringsAsICal4jDates(
                  teamEvent.getRecurrenceExDate(), timeZone);
              if (CollectionUtils.isEmpty(exDates) == false) {
View Full Code Here

   * @return the recurrenceRuleObject
   */
  @Transient
  public Recur getRecurrenceObject()
  {
    final RRule rrule = getRecurrenceRuleObject();
    return rrule != null ? rrule.getRecur() : null;
  }
View Full Code Here

  public static VEvent createVEvent(final TeamEventDO eventDO, final TimeZone timezone)
  {
    final VEvent vEvent = ICal4JUtils.createVEvent(eventDO.getStartDate(), eventDO.getEndDate(), eventDO.getUid(), eventDO.getSubject(),
        eventDO.isAllDay(), timezone);
    if (eventDO.hasRecurrence() == true) {
      final RRule rrule = eventDO.getRecurrenceRuleObject();
      vEvent.getProperties().add(rrule);
    }
    return vEvent;
  }
View Full Code Here

    if (untilDate != null) {
      recur.setUntil(untilDate);
    }
    recur.setInterval(recurData.getInterval());
    recur.setFrequency(ICal4JUtils.getCal4JFrequencyString(recurData.getFrequency()));
    final RRule rrule = new RRule(recur);
    return rrule.getValue();
  }
View Full Code Here

          teamEvent.setReminderDuration(dur.getMinutes());
          teamEvent.setReminderDurationUnit(ReminderDurationUnit.MINUTES);
        }
      }
    }
    final RRule rule = (RRule) event.getProperty(Property.RRULE);
    if (rule != null) {
      teamEvent.setRecurrenceRule(rule.getValue());
    }
    final ExDate exDate = (ExDate) event.getProperty(Property.EXDATE);
    if (exDate != null) {
      teamEvent.setRecurrenceExDate(exDate.getValue());
    }
View Full Code Here

TOP

Related Classes of net.fortuna.ical4j.model.property.RRule

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.