private static Calendar copy(Calendar original) { if (original != null) { ProdId prodId = original.getProductId(); String productId = prodId.getValue() != null ? prodId.getValue() : ""; return FreeBusyUtil.getFreeBusyCalendar(original, productId); } return null; } }
public static void adaptTimezoneCalendarComponent(Calendar calendar) { //ios 7 doesn't send product id on create calendar method if(calendar.getProductId() == null){ calendar.getProperties().add(new ProdId("UNKNOWN_PRODID")); } }
private static Calendar copy(Calendar original) { if (original != null) { ProdId prodId = original.getProductId(); String productId = prodId.getValue() != null ? prodId.getValue() : ""; return FreeBusyUtil.getFreeBusyCalendar(original, productId); } return null; } }
public static void adaptTimezoneCalendarComponent(Calendar calendar) { //ios 7 doesn't send product id on create calendar method if(calendar.getProductId() == null){ calendar.getProperties().add(new ProdId("UNKNOWN_PRODID")); } }
EventStamp masterStamp = (EventStamp) masterNote.getStamp(EventStamp.class); Calendar masterCal = masterStamp.getEventCalendar(); if(masterCal != null && masterCal.getProductId() != null) { exceptionCal = new Calendar(); exceptionCal.getProperties().add(masterCal.getProductId()); exceptionCal.getProperties().add(masterCal.getVersion() != null? masterCal.getVersion(): Version.VERSION_2_0); exceptionCal.getProperties().add(masterCal.getCalendarScale() != null? masterCal.getCalendarScale(): CalScale.GREGORIAN);
EventStamp masterStamp = (EventStamp) masterNote.getStamp(EventStamp.class); Calendar masterCal = masterStamp.getEventCalendar(); if(masterCal != null && masterCal.getProductId() != null) { exceptionCal = new Calendar(); exceptionCal.getProperties().add(masterCal.getProductId()); exceptionCal.getProperties().add(masterCal.getVersion() != null? masterCal.getVersion(): Version.VERSION_2_0); exceptionCal.getProperties().add(masterCal.getCalendarScale() != null? masterCal.getCalendarScale(): CalScale.GREGORIAN);