protected void setDateListPropertyValue(DateListProperty prop) { if (prop == null) { return; } Value value = (Value) prop.getParameters().getParameter(Parameter.VALUE); if (value != null) { prop.getParameters().remove(value); } value = prop.getDates().getType(); // set VALUE=DATE but not VALUE=DATE-TIME as its redundant if(value.equals(Value.DATE)) { prop.getParameters().add(value); } // update timezone for now because ical4j DateList doesn't Parameter param = (Parameter) prop.getParameters().getParameter( Parameter.TZID); if (param != null) { prop.getParameters().remove(param); } if(prop.getDates().getTimeZone()!=null) { prop.getParameters().add(new TzId(prop.getDates().getTimeZone().getID())); } }
protected void setDateListPropertyValue(DateListProperty prop) { if (prop == null) { return; } Value value = (Value) prop.getParameters().getParameter(Parameter.VALUE); if (value != null) { prop.getParameters().remove(value); } value = prop.getDates().getType(); // set VALUE=DATE but not VALUE=DATE-TIME as its redundant if(value.equals(Value.DATE)) { prop.getParameters().add(value); } // update timezone for now because ical4j DateList doesn't Parameter param = (Parameter) prop.getParameters().getParameter( Parameter.TZID); if (param != null) { prop.getParameters().remove(param); } if(prop.getDates().getTimeZone()!=null) { prop.getParameters().add(new TzId(prop.getDates().getTimeZone().getID())); } }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * @param name the property name * @param parameters property parameters * @param dates a list of initial dates for the property */ public DateListProperty(final String name, final ParameterList parameters, final DateList dates, PropertyFactory factory) { super(name, parameters, factory); this.dates = dates; if (dates != null && !Value.DATE_TIME.equals(dates.getType())) { getParameters().replace(dates.getType()); } }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * @param name the property name * @param parameters property parameters * @param dates a list of initial dates for the property */ public DateListProperty(final String name, final ParameterList parameters, final DateList dates, PropertyFactory factory) { super(name, parameters, factory); this.dates = dates; if (dates != null && !Value.DATE_TIME.equals(dates.getType())) { getParameters().replace(dates.getType()); } }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); }
/** * Resets the timezone associated with the property. If utc is true, any TZID parameters are removed and the Java * timezone is updated to UTC time. If utc is false, TZID parameters are removed and the Java timezone is set to the * default timezone (i.e. represents a "floating" local time) * @param utc the UTC value */ public final void setUtc(final boolean utc) { if (dates == null || !Value.DATE_TIME.equals(dates.getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setUtc(utc); getParameters().remove(getParameter(Parameter.TZID)); } }
/** * @param name the property name * @param parameters property parameters * @param dates a list of initial dates for the property */ public DateListProperty(final String name, final ParameterList parameters, final DateList dates, PropertyFactoryImpl factory) { super(name, parameters, factory); this.dates = dates; if (dates != null && !Value.DATE_TIME.equals(dates.getType())) { getParameters().replace(dates.getType()); } }
/** * @param name the property name * @param parameters property parameters * @param dates a list of initial dates for the property */ public DateListProperty(final String name, final ParameterList parameters, final DateList dates, PropertyFactory factory) { super(name, parameters, factory); this.dates = dates; if (dates != null && !Value.DATE_TIME.equals(dates.getType())) { getParameters().add(dates.getType()); } }
/** * @param name the property name * @param parameters property parameters * @param dates a list of initial dates for the property */ public DateListProperty(final String name, final ParameterList parameters, final DateList dates, PropertyFactoryImpl factory) { super(name, parameters, factory); this.dates = dates; if (dates != null && !Value.DATE_TIME.equals(dates.getType())) { getParameters().replace(dates.getType()); } }
/** * Sets the timezone associated with this property. * * @param timezone a timezone to associate with this property */ public void setTimeZone(final TimeZone timezone) { if (dates == null) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } this.timeZone = timezone; if (timezone != null) { if (!Value.DATE_TIME.equals(getDates().getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setTimeZone(timezone); getParameters().remove(getParameter(Parameter.TZID)); final TzId tzId = new TzId(timezone.getID()); getParameters().replace(tzId); } else { // use setUtc() to reset timezone.. setUtc(false); } }
/** * Sets the timezone associated with this property. * * @param timezone a timezone to associate with this property */ public void setTimeZone(final TimeZone timezone) { if (dates == null) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } this.timeZone = timezone; if (timezone != null) { if (!Value.DATE_TIME.equals(getDates().getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setTimeZone(timezone); getParameters().remove(getParameter(Parameter.TZID)); final TzId tzId = new TzId(timezone.getID()); getParameters().replace(tzId); } else { // use setUtc() to reset timezone.. setUtc(false); } }
/** * Sets the timezone associated with this property. * * @param timezone a timezone to associate with this property */ public void setTimeZone(final TimeZone timezone) { if (dates == null) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } this.timeZone = timezone; if (timezone != null) { if (!Value.DATE_TIME.equals(getDates().getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setTimeZone(timezone); getParameters().remove(getParameter(Parameter.TZID)); final TzId tzId = new TzId(timezone.getID()); getParameters().replace(tzId); } else { // use setUtc() to reset timezone.. setUtc(false); } }
/** * Sets the timezone associated with this property. * * @param timezone a timezone to associate with this property */ public void setTimeZone(final TimeZone timezone) { if (dates == null) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } this.timeZone = timezone; if (timezone != null) { if (!Value.DATE_TIME.equals(getDates().getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setTimeZone(timezone); getParameters().remove(getParameter(Parameter.TZID)); final TzId tzId = new TzId(timezone.getID()); getParameters().replace(tzId); } else { // use setUtc() to reset timezone.. setUtc(false); } }
/** * Sets the timezone associated with this property. * @param timezone a timezone to associate with this property */ public void setTimeZone(final TimeZone timezone) { if (dates == null) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } this.timeZone = timezone; if (timezone != null) { if (!Value.DATE_TIME.equals(getDates().getType())) { throw new UnsupportedOperationException( "TimeZone is not applicable to current value"); } dates.setTimeZone(timezone); getParameters().remove(getParameter(Parameter.TZID)); final TzId tzId = new TzId(timezone.getID()); getParameters().replace(tzId); } else { // use setUtc() to reset timezone.. setUtc(false); } }
dlp.getParameters().add(Value.DATE); } else if (tz != null) { dlp.setTimeZone(tz);