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());
}
}
Aggregations