protected static Location toLocation(String javaObj) { if (javaObj == null) { return null; } return new Location(javaObj); }
public Property createProperty(final String name, final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Location(parameters, value); }
public Property createProperty() { return new Location(); } }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Location(parameters, value); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Location(parameters, value); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Location(parameters, value); }
public Property createProperty() { return new Location(); } }
public Property createProperty() { return new Location(); } }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new Location(parameters, value); }
public Property createProperty(final String name) { return new Location(); } };
public Property createProperty() { return new Location(); } }
@Override public Property toVEvent(final TeamEventDO event) { if (StringUtils.isNotBlank(event.getLocation())) { return new Location(event.getLocation()); } return null; }
@Override void mapToCard(net.fortuna.ical4j.model.Calendar cal, Object bean, PropertyDescriptor pd) { String s = propertyAccessor.get(bean, pd.getReadMethod(), String.class); VEvent vevent = event(cal); net.fortuna.ical4j.model.property.Location d = new net.fortuna.ical4j.model.property.Location(s); vevent.getProperties().add(d); } }
private static VEvent convertEventBean(EventBean event) { Date begin; Date end; if (event.isAllDay()) { begin = new Date(event.getBegin().toCalendar(new Locale("pt")).getTime()); end = new Date(event.getEnd().toCalendar(new Locale("pt")).getTime()); } else { begin = new DateTime(event.getBegin().toCalendar(new Locale("pt")).getTime()); end = new DateTime(event.getEnd().toCalendar(new Locale("pt")).getTime()); } VEvent vEvent = new VEvent(begin, end, event.getTitle()); vEvent.getStartDate().setTimeZone(TIMEZONE); vEvent.getEndDate().setTimeZone(TIMEZONE); if (event.getLocation() != null) { vEvent.getProperties().add(new Location(event.getLocation())); } if (event.getUrl() != null) { try { vEvent.getProperties().add(new Url(new URI(event.getUrl()))); } catch (URISyntaxException e) { } } if (event.getNote() != null) { vEvent.getProperties().add(new Description(event.getNote())); } Uid uid = new Uid(digest(event.getTitle() + "-" + begin.toGMTString() + "-" + end.toGMTString())); vEvent.getProperties().add(uid); return vEvent; }
/** * Update the LOCATION property on a component. * @param text LOCATION value to update. If null, the LOCATION property * will be removed * @param comp component to update */ public static void setLocation(String text, Component comp) { Location location = (Location) comp.getProperties().getProperty(Property.LOCATION); if (text == null) { if (location != null) { comp.getProperties().remove(location); } return; } if (location == null) { location = new Location(); comp.getProperties().add(location); } location.setValue(text); }
/** * Update the LOCATION property on a component. * @param text LOCATION value to update. If null, the LOCATION property * will be removed * @param comp component to update */ public static void setLocation(String text, Component comp) { Location location = (Location) comp.getProperties().getProperty(Property.LOCATION); if (text == null) { if (location != null) { comp.getProperties().remove(location); } return; } if (location == null) { location = new Location(); comp.getProperties().add(location); } location.setValue(text); }
private void readTimesheets(final ICalGenerator generator, final PFUserDO timesheetUser) { if (timesheetUser == null) { return; } final java.util.Calendar cal = java.util.Calendar.getInstance(ThreadLocalUserContext.getTimeZone()); // initializes timesheet filter final TimesheetFilter filter = new TimesheetFilter(); filter.setUserId(timesheetUser.getId()); filter.setDeleted(false); cal.add(java.util.Calendar.MONTH, CalendarFeedConst.PERIOD_IN_MONTHS); filter.setStopTime(cal.getTime()); cal.add(java.util.Calendar.MONTH, -2 * CalendarFeedConst.PERIOD_IN_MONTHS); filter.setStartTime(cal.getTime()); final List<TimesheetDO> timesheetList = timesheetDao.getList(filter); // iterate over all timesheets and adds each event to the calendar for (final TimesheetDO timesheet : timesheetList) { final String uid = TeamCalConfig.get().createTimesheetUid(timesheet.getId()); final String summary = CalendarHelper.getTitle(timesheet) + " (ts)"; final VEvent vEvent = generator.convertVEvent(timesheet.getStartTime(), timesheet.getStopTime(), false, uid, summary); if (StringUtils.isNotBlank(timesheet.getDescription()) == true) { vEvent.getProperties().add(new Description(timesheet.getDescription())); } if (StringUtils.isNotBlank(timesheet.getLocation()) == true) { vEvent.getProperties().add(new Location(timesheet.getLocation())); } generator.addEvent(vEvent); } }
public void setLocation(String text) { Location location = (Location) getEvent().getProperties().getProperty(Property.LOCATION); if (text == null) { if (location != null) { getEvent().getProperties().remove(location); } return; } if (location == null) { location = new Location(); getEvent().getProperties().add(location); } location.setValue(text); }
public void setLocation(String text) { Location location = (Location) getEvent().getProperties().getProperty(Property.LOCATION); if (text == null) { if (location != null) { getEvent().getProperties().remove(location); } return; } if (location == null) { location = new Location(); getEvent().getProperties().add(location); } location.setValue(text); }
meeting.getProperties().add(new Location(location));