public Property createProperty(final String name, final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
/** * {@inheritDoc} */ public final String getValue() { return getRecur().toString(); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component * @throws ParseException thrown when the specified string is not a valid representaton of a recurrence * @see Recur#Recur(String) */ public RRule(final ParameterList aList, final String aValue) throws ParseException { super(RRULE, aList, new Factory()); setValue(aValue); }
public static DateTimeIterator createDateTimeIterator( final String repeatRules, final DateTime scheduleStart, final DateTimeZone timeZone) throws ParseException { DateTime start = scheduleStart; String exdate = ""; final RRule rrule = new RRule(repeatRules); if (rrule.getFreq().ordinal() > Frequency.DAILY.ordinal()) { start = start.minusDays(1); exdate = "\nEXDATE:" + ISODateTimeFormat.basicDateTimeNoMillis().print(start.withZone(timeZone).toLocalDateTime()); } final DateTimeIterable dateIterable = DateTimeIteratorFactory.createDateTimeIterable( repeatRules + exdate, start, timeZone, true); return dateIterable.iterator(); }
/** * @param rRule * @return this for chaining. */ @Transient public TeamEventDO setRecurrence(final RRule rRule) { if (rRule == null || rRule.getRecur() == null) { this.recurrenceRuleObject = null; this.recurrenceRule = null; this.recurrenceUntil = null; return this; } final Recur recur = rRule.getRecur(); if (recur.getUntil() != null) { this.recurrenceUntil = recur.getUntil(); } else { this.recurrenceUntil = null; } this.recurrenceRuleObject = null; // do not use rRule param here! this.recurrenceRule = rRule.getValue(); return this; }
private boolean preCheckSendMail(final TeamEventDO event) { // check event ownership if (event.isOwnership() != null && event.isOwnership() == false) { return false; } // check date, send mails for future events only final Date now = new Date(); if (event.getStartDate().after(now)) { return true; } // No recurrence so event is in the past if (event.getRecurrenceRule() == null) { return false; } // Check rrule to see if an until date exists try { final RRule rRule = new RRule(event.getRecurrenceRule()); final net.fortuna.ical4j.model.Date until = rRule.getRecur().getUntil(); if (until == null) { return true; } final Date untilDate = new Date(until.getTime()); return untilDate.before(now) == false; } catch (ParseException e) { return false; } }
untilICal4J.setUtc(true); RRule rRule = ICal4JUtils.calculateRRule(rruleStr); rRule.getRecur().setUntil(untilICal4J); rRule.getValue(), DateHelper.formatIsoTimestamp(calStart.getTime()), id)); } catch (Exception e) { log.error(String.format("Error while updating event with id '%s' and new recurrence_rule '%s', recurrence_until '%s'. Ignoring it.", id, rRule.getValue(), DateHelper.formatIsoTimestamp(calStart.getTime())));
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
/** * {@inheritDoc} */ public final String getValue() { return getRecur().toString(); }
/** * @param value a rule string * @throws ParseException where the specified string is not a valid rule */ public RRule(String value) throws ParseException { super(RRULE, new Factory()); setValue(value); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
/** * {@inheritDoc} */ public final String getValue() { return getRecur().toString(); }
/** * @param value a rule string * @throws ParseException where the specified string is not a valid rule */ public RRule(String value) throws ParseException { super(RRULE, PropertyFactoryImpl.getInstance()); setValue(value); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
/** * {@inheritDoc} */ public final String getValue() { return getRecur().toString(); }
/** * @param value a rule string * @throws ParseException where the specified string is not a valid rule */ public RRule(String value) throws ParseException { super(RRULE, PropertyFactoryImpl.getInstance()); setValue(value); }
rule = new RRule({ freq: RRule.YEARLY, byweekday: RRule.FR, bymonth: [9], bysetpos: [1] })