com.google.api.services.calendar.model.Event.setSummary()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中com.google.api.services.calendar.model.Event.setSummary()方法的一些代码示例,展示了Event.setSummary()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.setSummary()方法的具体详情如下:
包路径:com.google.api.services.calendar.model.Event
类名称:Event
方法名:setSummary

Event.setSummary介绍

暂无

代码示例

代码示例来源:origin: google/data-transfer-project

static Event convertToGoogleCalendarEvent(CalendarEventModel eventModel) {
 Event event = new Event()
   .setLocation(eventModel.getLocation())
   .setDescription(eventModel.getTitle())
   .setSummary(eventModel.getNotes())
   .setStart(getEventDateTime(eventModel.getStartTime()))
   .setEnd(getEventDateTime(eventModel.getEndTime()));
 if (eventModel.getAttendees() != null) {
  event.setAttendees(eventModel.getAttendees().stream()
    .map(GoogleCalendarImporter::transformToEventAttendee)
    .collect(Collectors.toList()));
 }
 return event;
}

代码示例来源:origin: google/google-api-java-client-samples

private static Event newEvent() {
 Event event = new Event();
 event.setSummary("New Event");
 Date startDate = new Date();
 Date endDate = new Date(startDate.getTime() + 3600000);
 DateTime start = new DateTime(startDate, TimeZone.getTimeZone("UTC"));
 event.setStart(new EventDateTime().setDateTime(start));
 DateTime end = new DateTime(endDate, TimeZone.getTimeZone("UTC"));
 event.setEnd(new EventDateTime().setDateTime(end));
 return event;
}

代码示例来源:origin: NovaFox161/DisCal-Discord-Bot

event.setId(eventId);
event.setVisibility("public");
event.setSummary(body.getString("summary"));
event.setDescription(body.getString("description"));

代码示例来源:origin: NovaFox161/DisCal-Discord-Bot

event.setId(eventId);
event.setVisibility("public");
event.setSummary(body.getString("summary"));
event.setDescription(body.getString("description"));

代码示例来源:origin: NovaFox161/DisCal-Discord-Bot

event.setId(KeyGenerator.generateEventId());
event.setVisibility("public");
event.setSummary(body.getString("summary"));
event.setDescription(body.getString("description"));

代码示例来源:origin: NovaFox161/DisCal-Discord-Bot

event.setId(KeyGenerator.generateEventId());
event.setVisibility("public");
event.setSummary(body.getString("summary"));
event.setDescription(body.getString("description"));

代码示例来源:origin: NovaFox161/DisCal-Discord-Bot

event.setId(KeyGenerator.generateEventId());
event.setVisibility("public");
event.setSummary(body.getString("summary"));
event.setDescription(body.getString("description"));

代码示例来源:origin: NovaFox161/DisCal-Discord-Bot

event.setId(eventId);
event.setVisibility("public");
event.setSummary(body.getString("summary"));
event.setDescription(body.getString("description"));

代码示例来源:origin: io.syndesis.connector/connector-google-calendar

private Event createGoogleEvent(String summary, String description, String attendees, String startDate, String startTime, String endDate, String endTime, String location) throws AddressException, ParseException {
  DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault());
  Event event = new Event();
  event.setSummary(summary);
  event.setDescription(description);
  event.setAttendees(getAttendeesList(attendees));

代码示例来源:origin: io.syndesis.connector/connector-google-calendar

private Event createGoogleEvent(String summary, String description, String attendees, String startDate, String startTime, String endDate, String endTime, String location) throws AddressException, ParseException {
  DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault());
  Event event = new Event();
  event.setSummary(summary);
  event.setDescription(description);
  event.setAttendees(getAttendeesList(attendees));

代码示例来源:origin: synyx/urlaubsverwaltung

private static void fillEvent(Absence absence, Event event) {
  event.setSummary(absence.getEventSubject());
  EventAttendee eventAttendee = new EventAttendee();
  eventAttendee.setEmail(absence.getPerson().getEmail());
  eventAttendee.setDisplayName(absence.getPerson().getNiceName());
  event.setAttendees(Collections.singletonList(eventAttendee));
  EventDateTime startEventDateTime;
  EventDateTime endEventDateTime;
  if (absence.isAllDay()) {
    // To create an all-day event, you must use setDate() having created DateTime objects using a String
    DateFormat dateFormat = new SimpleDateFormat(DATE_PATTERN_YYYY_MM_DD);
    String startDateStr = dateFormat.format(absence.getStartDate());
    String endDateStr = dateFormat.format(absence.getEndDate());
    DateTime startDateTime = new DateTime(startDateStr);
    DateTime endDateTime = new DateTime(endDateStr);
    startEventDateTime = new EventDateTime().setDate(startDateTime);
    endEventDateTime = new EventDateTime().setDate(endDateTime);
  } else {
    DateTime dateTimeStart = new DateTime(absence.getStartDate());
    DateTime dateTimeEnd = new DateTime(absence.getEndDate());
    startEventDateTime = new EventDateTime().setDateTime(dateTimeStart);
    endEventDateTime = new EventDateTime().setDateTime(dateTimeEnd);
  }
  event.setStart(startEventDateTime);
  event.setEnd(endEventDateTime);
}

代码示例来源:origin: gdenning/exchange-sync

private void populateEventFromAppointmentDto(final AppointmentDto appointmentDto, final Event event) {
  event.setSummary(appointmentDto.getSummary());
  event.setDescription(appointmentDto.getDescription());
  event.setStart(convertToEventDateTime(appointmentDto.getStart(), appointmentDto.isAllDay(), calendarTimeZone));

相关文章