Package net.fortuna.ical4j.model.property

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


  public static List<Date> getRecurrenceExcludeDates(String recurrenceExc) {
    List<Date> recurExcDates = new ArrayList<Date>();
    if(recurrenceExc != null && !recurrenceExc.equals("")) {
      try {
        net.fortuna.ical4j.model.ParameterList pl = new net.fortuna.ical4j.model.ParameterList();
        ExDate exdate = new ExDate(pl, recurrenceExc);
        DateList dl = exdate.getDates();
        for( Object date : dl ) {
          Date excDate = (Date)date;
          recurExcDates.add(excDate);
        }
      } catch (ParseException e) {
View Full Code Here


      DateList dl = new DateList();
      for( Date date : dates ) {
        net.fortuna.ical4j.model.Date dd = new net.fortuna.ical4j.model.Date(date);
        dl.add(dd);
      }
      ExDate exdate = new ExDate(dl);
      return exdate.getValue();
    }
   
    return null;
  }
View Full Code Here

      }
    }
    // recurrence exclusions
    String recurrenceExc = kEvent.getRecurrenceExc();
    if(recurrenceExc != null && !recurrenceExc.equals("")) {
      ExDate exdate = new ExDate();
      try {
        exdate.setValue(recurrenceExc);
        vEventProperties.add(exdate);
      } catch (ParseException e) {
        e.printStackTrace();
      }
    }
View Full Code Here

        }
       
        String recurrenceExc = kEvent.getRecurrenceExc();
        if(recurrenceExc != null && !recurrenceExc.equals("")) {
          try {
            ExDate exdate = new ExDate();
            // expected date+time format:
            // 20100730T100000
            // unexpected all-day format:
            // 20100730
            // see OLAT-5645
            if (recurrenceExc.length()>8) {
              exdate.setValue(recurrenceExc);
            } else {
              exdate.getParameters().replace(Value.DATE);
              exdate.setValue(recurrenceExc);
            }
            for( Object date : exdate.getDates() ) {
              if(recurDates.contains(date)) recurDates.remove(date);
            }
          } catch (ParseException e) {
            Tracing.createLoggerFor(getClass()).error("cannot restore excluded dates for this recurrence: " + recurrenceExc, e);
          }
View Full Code Here

                    dateList = new DateList(Value.DATE);
                  } else {
                    dateList = new DateList();
                  }
                  dateList.add(date);
                  ExDate exDate;
                  exDate = new ExDate(dateList);
                  vEvent.getProperties().add(exDate);
                }
              }
            }
          }
View Full Code Here

    }
    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());
    }
    return teamEvent;
  }
View Full Code Here

TOP

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

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.