public Property createProperty(final String name, final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Description(parameters, value); }
@Override void mapToCard(net.fortuna.ical4j.model.Calendar cal, Object bean, PropertyDescriptor pd) { String s = propertyAccessor.get(bean, pd.getReadMethod(), String.class); if (s == null || s.trim().length() == 0) { return; } VEvent vevent = event(cal); if (vevent != null) { net.fortuna.ical4j.model.property.Description d = new net.fortuna.ical4j.model.property.Description(); d.setValue(s); vevent.getProperties().add(d); } } }
protected static String fromDescription(PropertyList propertyList) { Description iCalObj = (Description) propertyList.getProperty(Description.DESCRIPTION); if (iCalObj == null) { return null; } return iCalObj.getValue(); }
@Override public void applyTo(VAlarm element) { Action action = element.getAction(); if (action == null || !"DISPLAY".equals(action.getValue()) || element.getDescription() != null && element.getDescription().getValue() != null) { return; } Description description = new Description("display"); element.getProperties().add(description); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component */ public Description(final ParameterList aList, final String aValue) { super(DESCRIPTION, aList, new Factory()); setValue(aValue); }
/** * {@inheritDoc} */ public final void validate() throws ValidationException { /* * ; the following are optional, ; but MUST NOT occur more than once (";" altrepparam) / (";" languageparam) / */ ParameterValidator.getInstance().assertOneOrLess(Parameter.ALTREP, getParameters()); ParameterValidator.getInstance().assertOneOrLess(Parameter.LANGUAGE, getParameters()); /* * ; the following is optional, ; and MAY occur more than once (";" xparam) */ }
@Override public void applyTo(VAlarm element) { Action action = element.getAction(); if (action == null || !"DISPLAY".equals(action.getValue()) || element.getDescription() != null && element.getDescription().getValue() != null) { return; } Description description = new Description("display"); element.getProperties().add(description); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component */ public Description(final ParameterList aList, final String aValue) { super(DESCRIPTION, aList, PropertyFactoryImpl.getInstance()); setValue(aValue); }
public Property createProperty() { return new Description(); } }
public void setDisplayAlarmDescription(String newDescription) { VAlarm alarm = getDisplayAlarm(); if(alarm==null) { return; } Description description = (Description) alarm.getProperties() .getProperty(Property.DESCRIPTION); if (description == null) { description = new Description(); alarm.getProperties().add(description); } description.setValue(newDescription); }
@Override public void applyTo(VAlarm element) { Action action = element.getAction(); if (action == null || !"DISPLAY".equals(action.getValue()) || element.getDescription() != null && element.getDescription().getValue() != null) { return; } Description description = new Description("display"); element.getProperties().add(description); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component */ public Description(final ParameterList aList, final String aValue) { super(DESCRIPTION, aList, new Factory()); setValue(aValue); }
public String getDisplayAlarmDescription() { VAlarm alarm = getDisplayAlarm(); if(alarm==null) { return null; } Description description = (Description) alarm.getProperties() .getProperty(Property.DESCRIPTION); if(description==null) { return null; } return description.getValue(); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Description(parameters, value); }
public void setDisplayAlarmDescription(String newDescription) { VAlarm alarm = getDisplayAlarm(); if(alarm==null) { return; } Description description = (Description) alarm.getProperties() .getProperty(Property.DESCRIPTION); if (description == null) { description = new Description(); alarm.getProperties().add(description); } description.setValue(newDescription); }
/** * @param aValue a value string for this component */ public Description(final String aValue) { super(DESCRIPTION, PropertyFactoryImpl.getInstance()); setValue(aValue); }
@Override public boolean fromVEvent(final TeamEventDO event, final VEvent vEvent) { if (vEvent.getDescription() != null) { event.setNote(vEvent.getDescription().getValue()); return true; } return false; } }
public Property createProperty() { return new Description(); } }
/** * Update the DESCRIPTION property on a component. * @param text DESCRIPTION value to update. If null, the DESCRIPTION property * will be removed * @param comp component to update */ public static void setDescription(String text, Component comp) { Description description = (Description) comp.getProperties().getProperty(Property.DESCRIPTION); if (text == null) { if (description != null) { comp.getProperties().remove(description); } return; } if (description == null) { description = new Description(); comp.getProperties().add(description); } description.setValue(text); }
/** * @param aValue a value string for this component */ public Description(final String aValue) { super(DESCRIPTION, new ParameterList(), new Factory()); setValue(aValue); }