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

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

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

Event.getId介绍

暂无

代码示例

代码示例来源:origin: org.apache.camel/camel-google-calendar

public Exchange createExchange(ExchangePattern pattern, Event event) {
    Exchange exchange = super.createExchange(pattern);
    Message message = exchange.getIn();
    message.setBody(event);
    message.setHeader(GoogleCalendarStreamConstants.EVENT_ID, event.getId());
    return exchange;
  }
}

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

@Override
public Optional<String> add(Absence absence, CalendarSettings calendarSettings) {
  googleCalendarClient = getOrCreateGoogleCalendarClient();
  if (googleCalendarClient != null) {
    GoogleCalendarSettings googleCalendarSettings =
        settingsService.getSettings().getCalendarSettings().getGoogleCalendarSettings();
    String calendarId = googleCalendarSettings.getCalendarId();
    try {
      Event eventToCommit = new Event();
      fillEvent(absence, eventToCommit);
      Event eventInCalendar = googleCalendarClient.events().insert(calendarId, eventToCommit).execute();
      LOG.info(String.format("Event %s for '%s' added to calendar '%s'.", eventInCalendar.getId(),
          absence.getPerson().getNiceName(), eventInCalendar.getSummary()));
      return Optional.of(eventInCalendar.getId());
    } catch (IOException ex) {
      LOG.warn(String.format("An error occurred while trying to add appointment to calendar %s", calendarId), ex);
      mailService.sendCalendarSyncErrorNotification(calendarId, absence, ex.toString());
    }
  }
  return Optional.empty();
}

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

@Override
public void updateAppointment(final AppointmentDto appointment) throws IOException {
  final GoogleAppointmentDto googleAppointmentDto = (GoogleAppointmentDto) appointment;
  final Event event = client.events().get(calendarId, googleAppointmentDto.getGoogleId()).execute();
  populateEventFromAppointmentDto(appointment, event);
  client.events().update(calendarId, event.getId(), event).execute();
  LOG.info("Updated Google appointment " + appointment.getSummary());
}

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

model.setLocation(event.getLocation());
if (ObjectHelper.isNotEmpty(event.getId())) {
  model.setEventId(event.getId());

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

model.setLocation(event.getLocation());
if (ObjectHelper.isNotEmpty(event.getId())) {
  model.setEventId(event.getId());

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

model.setLocation(event.getLocation());
if (ObjectHelper.isNotEmpty(event.getId())) {
  model.setEventId(event.getId());

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

model.setLocation(event.getLocation());
if (ObjectHelper.isNotEmpty(event.getId())) {
  model.setEventId(event.getId());

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

for (Event e : items) {
  JSONObject jo = new JSONObject();
  jo.put("id", e.getId());
  jo.put("epochStart", e.getStart().getDateTime().getValue());
  jo.put("epochEnd", e.getEnd().getDateTime().getValue());
  jo.put("isParent", !(e.getId().contains("_")));
  EventData ed = DatabaseManager.getManager().getEventData(settings.getGuildID(), e.getId());

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

ed.setEventId(event.getId());
respondBody.put("id", confirmed.getId());

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

for (Event e: items) {
  JSONObject jo = new JSONObject();
  jo.put("id", e.getId());
  jo.put("epochStart", e.getStart().getDateTime().getValue());
  jo.put("epochEnd", e.getEnd().getDateTime().getValue());

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

for (Event e : items) {
  JSONObject jo = new JSONObject();
  jo.put("id", e.getId());
  jo.put("epochStart", e.getStart().getDateTime().getValue());
  jo.put("epochEnd", e.getEnd().getDateTime().getValue());
  jo.put("isParent", !(e.getId().contains("_")));
  EventData ed = DatabaseManager.getManager().getEventData(settings.getGuildID(), e.getId());

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

ed.setEventId(event.getId());
respondBody.put("id", confirmed.getId());

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

ed.setEventId(event.getId());
respondBody.put("id", confirmed.getId());

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

for (Event e : items) {
  JSONObject jo = new JSONObject();
  jo.put("id", e.getId());
  jo.put("epochStart", e.getStart().getDateTime().getValue());
  jo.put("epochEnd", e.getEnd().getDateTime().getValue());
  jo.put("isParent", !(e.getId().contains("_")));
  EventData ed = DatabaseManager.getManager().getEventData(settings.getGuildID(), e.getId());

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

for (Event e: items) {
  JSONObject jo = new JSONObject();
  jo.put("id", e.getId());
  jo.put("epochStart", e.getStart().getDateTime().getValue());
  jo.put("epochEnd", e.getEnd().getDateTime().getValue());

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

for (Event e: items) {
  JSONObject jo = new JSONObject();
  jo.put("id", e.getId());
  jo.put("epochStart", e.getStart().getDateTime().getValue());
  jo.put("epochEnd", e.getEnd().getDateTime().getValue());

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

public static PreEvent copyEvent(long guildId, Event event) {
    PreEvent pe = new PreEvent(guildId);
    pe.setSummary(event.getSummary());
    pe.setDescription(event.getDescription());
    pe.setLocation(event.getLocation());
    if (event.getColorId() != null)
      pe.setColor(EventColor.fromNameOrHexOrID(event.getColorId()));
    else
      pe.setColor(EventColor.RED);

    pe.setEventData(DatabaseManager.getManager().getEventData(guildId, event.getId()));

    return pe;
  }
}

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

private AppointmentDto convertToAppointmentDto(final Event event) {
  final GoogleAppointmentDto result = new GoogleAppointmentDto();
  result.setGoogleId(event.getId());
  if (event.getExtendedProperties() != null && event.getExtendedProperties().getPrivate() != null) {
    result.setExchangeId(event.getExtendedProperties().getPrivate().get(EXT_PROPERTY_EXCHANGE_ID));

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

public PreEvent(long _guildId, Event e) {
  guildId = _guildId;
  eventId = e.getId();
  eventData = DatabaseManager.getManager().getEventData(guildId, e.getId());

相关文章