Search in sources :

Example 1 with Encoding

use of net.fortuna.ical4j.model.parameter.Encoding in project bw-calendar-engine by Bedework.

the class IcalUtil method setAttachment.

/**
 * make an attachment
 *
 * @param val
 * @return Attendee
 * @throws Throwable
 */
public static Attach setAttachment(final BwAttachment val) throws Throwable {
    ParameterList pars = new ParameterList();
    String temp = val.getFmtType();
    if (temp != null) {
        pars.add(new FmtType(temp));
    }
    temp = val.getEncoding();
    if (temp == null) {
        return new Attach(pars, val.getUri());
    } else {
        pars.add(new Encoding(temp));
        temp = val.getValueType();
        if (temp != null) {
            pars.add(new Value(temp));
        }
        return new Attach(pars, val.getValue());
    }
}
Also used : Attach(net.fortuna.ical4j.model.property.Attach) FmtType(net.fortuna.ical4j.model.parameter.FmtType) AbbreviatedValue(org.bedework.calfacade.base.AbbreviatedValue) Value(net.fortuna.ical4j.model.parameter.Value) ParameterList(net.fortuna.ical4j.model.ParameterList) Encoding(net.fortuna.ical4j.model.parameter.Encoding)

Aggregations

ParameterList (net.fortuna.ical4j.model.ParameterList)1 Encoding (net.fortuna.ical4j.model.parameter.Encoding)1 FmtType (net.fortuna.ical4j.model.parameter.FmtType)1 Value (net.fortuna.ical4j.model.parameter.Value)1 Attach (net.fortuna.ical4j.model.property.Attach)1 AbbreviatedValue (org.bedework.calfacade.base.AbbreviatedValue)1