use of net.fortuna.ical4j.model.ParameterList in project bw-calendar-engine by Bedework.
the class IcalUtil method setAttendee.
/**
* make an attendee
*
* @param val BwAttendee to build from
* @return Attendee
* @throws Throwable
*/
public static Attendee setAttendee(final BwAttendee val) throws Throwable {
final Attendee prop = new Attendee(val.getAttendeeUri());
final ParameterList pars = prop.getParameters();
setAttendeeVoter(val, pars);
final String temp = val.getPartstat();
if ((temp != null) && !temp.equals(IcalDefs.partstatValNeedsAction)) {
// Not default value.
pars.add(new PartStat(temp));
}
return prop;
}
use of net.fortuna.ical4j.model.ParameterList in project bw-calendar-engine by Bedework.
the class IcalUtil method getAttendee.
/**
* @param cb IcalCallback object
* @param attProp
* @return BwAttendee
* @throws Throwable
*/
public static BwAttendee getAttendee(final IcalCallback cb, final Attendee attProp) throws Throwable {
ParameterList pars = attProp.getParameters();
BwAttendee att = initAttendeeVoter(cb, attProp.getValue(), pars);
att.setPartstat(getOptStr(pars, "PARTSTAT"));
if (att.getPartstat() == null) {
att.setPartstat(IcalDefs.partstatValNeedsAction);
}
att.setRole(getOptStr(pars, "ROLE"));
return att;
}
use of net.fortuna.ical4j.model.ParameterList in project bw-calendar-engine by Bedework.
the class IcalUtil method getVenue.
/**
* @param p
* @return String
*/
public static String getVenue(final Property p) {
ParameterList pars = p.getParameters();
Parameter par = pars.getParameter(Parameter.VVENUE);
if (par == null) {
return null;
}
return par.getValue();
}
use of net.fortuna.ical4j.model.ParameterList in project bw-calendar-engine by Bedework.
the class IcalUtil method getAttachment.
/**
* @param attProp
* @return BwAttachment
* @throws Throwable
*/
public static BwAttachment getAttachment(final Attach attProp) throws Throwable {
BwAttachment att = new BwAttachment();
ParameterList pars = attProp.getParameters();
att.setFmtType(getOptStr(pars, "FMTTYPE"));
att.setValueType(getOptStr(pars, "VALUE"));
att.setEncoding(getOptStr(pars, "ENCODING"));
if (att.getEncoding() == null) {
att.setUri(attProp.getValue());
} else {
att.setValue(attProp.getValue());
}
return att;
}
use of net.fortuna.ical4j.model.ParameterList in project bw-calendar-engine by Bedework.
the class IcalUtil method setOrganizer.
/**
* @param val
* @return Organizer
* @throws Throwable
*/
public static Organizer setOrganizer(final BwOrganizer val) throws Throwable {
ParameterList pars = new ParameterList();
String temp = val.getScheduleStatus();
if (temp != null) {
pars.add(new ScheduleStatus(temp));
}
temp = val.getCn();
if (temp != null) {
pars.add(new Cn(temp));
}
temp = val.getDir();
if (temp != null) {
pars.add(new Dir(temp));
}
temp = val.getLanguage();
if (temp != null) {
pars.add(new Language(temp));
}
temp = val.getSentBy();
if (temp != null) {
pars.add(new SentBy(temp));
}
Organizer prop = new Organizer(pars, val.getOrganizerUri());
return prop;
}
Aggregations