Examples of CalendarEntry


Examples of com.google.gdata.data.calendar.CalendarEntry

    DefaultComboBoxModel model = (DefaultComboBoxModel) mCalendarChooser.getModel();
    model.removeAllElements();

    for (int i = 0; i < resultFeed.getEntries().size(); i++) {
      CalendarEntry entry = resultFeed.getEntries().get(i);

      String id = entry.getId();
      id = StringUtils.substringAfterLast(id, "/");

      model.addElement(new GoogleComboboxItem(id, entry.getTitle().getPlainText()));

      if (id.equals(settings.getExporterProperty(GoogleExporter.SELECTED_CALENDAR))) {
        mCalendarChooser.setSelectedIndex(model.getSize() - 1);
      }
    }
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

      DebugFile.writeln("CalendarService.setUserCredentials("+oPrec.getValueOf("user")+", ...)");
      oCalSrv.setUserCredentials(oPrec.getValueOf("user"), oPrec.getValueOf("pwd"));
    URL feedUrl = new URL("https://www.google.com/calendar/feeds/default/allcalendars/full");
    CalendarFeed oFeed = oCalSrv.getFeed(feedUrl, CalendarFeed.class);
    for (int i = 0; i < oFeed.getEntries().size() && !bCalendarFound; i++) {
        CalendarEntry oCalendar = oFeed.getEntries().get(i);
        bCalendarFound = oCalendar.getTitle().getPlainText().equals(oPrec.getValueOf("cal"));
    } // next
    if (bCalendarFound) {
      sEMail = oPrec.getValueOf("user");
    } else {
      if (oCache!=null) {
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

          calEntry = entry;
        }
      }
      if (calEntry == null) {
        // No calendar found - Add a birthday calendar
        calEntry = new CalendarEntry();
        calEntry.setTitle(new PlainTextConstruct( CALENDAR_NAME ));
        calEntry.setSummary(new PlainTextConstruct( CALENDAR_SUMMARY ));
        calEntry.setTimeZone(calFeed.getEntries().get(0).getTimeZone());
        calEntry.setHidden(HiddenProperty.FALSE);
        calEntry.setColor(new ColorProperty( CALENDAR_COLOR ));
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

    CalendarFeed resultFeed = service.getFeed(metafeedUrl, CalendarFeed.class);

    System.out.println("Your calendars:");
    System.out.println();
    for (int i = 0; i < resultFeed.getEntries().size(); i++) {
      CalendarEntry entry = resultFeed.getEntries().get(i);
      System.out.println("\t" + entry.getTitle().getPlainText());
    }
    System.out.println();
  }
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

    // Send the request and receive the response:
    CalendarFeed resultFeed = service.getFeed(feedUrl, CalendarFeed.class);

    // Print the title of each calendar
    for (int i = 0; i < resultFeed.getEntries().size(); i++) {
      CalendarEntry entry = resultFeed.getEntries().get(i);
      System.out.println("\t" + entry.getTitle().getPlainText());
    }
  }
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

  private static CalendarEntry createCalendar(CalendarService service)
      throws IOException, ServiceException {
    System.out.println("Creating a secondary calendar");

    // Create the calendar
    CalendarEntry calendar = new CalendarEntry();
    calendar.setTitle(new PlainTextConstruct("Little League Schedule"));
    calendar.setSummary(new PlainTextConstruct(
        "This calendar contains the practice schedule and game times."));
    calendar.setTimeZone(new TimeZoneProperty("America/Los_Angeles"));
    calendar.setHidden(HiddenProperty.FALSE);
    calendar.setColor(new ColorProperty(BLUE));
    calendar.addLocation(new Where("", "", "Oakland"));

    // Insert the calendar
    return service.insert(owncalendarsFeedUrl, calendar);
  }
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

   */
  private static CalendarEntry createSubscription(CalendarService service)
      throws IOException, ServiceException {
    System.out.println("Subscribing to the Google Doodles calendar");

    CalendarEntry calendar = new CalendarEntry();
    calendar.setId(DOODLES_CALENDAR_ID);
    return service.insert(allcalendarsFeedUrl, calendar);
  }
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

      printUserCalendars(service, allcalendarsFeedUrl);
      System.out.println("Calendars in owncalendars feed");
      printUserCalendars(service, owncalendarsFeedUrl);

      // Create a new secondary calendar, update it, then delete it.
      CalendarEntry newCalendar = createCalendar(service);
      CalendarEntry updatedCalendar = updateCalendar(newCalendar);
      deleteCalendar(newCalendar);

      // Subscribe to the Google Doodles calendar, update the personalization
      // settings, then delete the subscription.
      CalendarEntry newSubscription = createSubscription(service);
      CalendarEntry updatedSubscription = updateSubscription(newSubscription);
      deleteSubscription(newSubscription);
    } catch (IOException e) {
      // Communications error
      System.err.println("There was a problem communicating with the service.");
      e.printStackTrace();
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

        URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/");
        CalendarFeed resultFeed = calendarService.getFeed(feedUrl, CalendarFeed.class);

        ArrayList<String> result = new ArrayList<String>();
        for (int i = 0; i < resultFeed.getEntries().size(); i++) {
            CalendarEntry entry = resultFeed.getEntries().get(i);
            result.add(entry.getTitle().getPlainText());
        }
        return result;
    }
View Full Code Here

Examples of com.google.gdata.data.calendar.CalendarEntry

        URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/");
        CalendarFeed resultFeed = calendarService.getFeed(feedUrl, CalendarFeed.class);

        List<String> result = new ArrayList<String>();
        for (int i = 0; i < resultFeed.getEntries().size(); i++) {
            CalendarEntry entry = resultFeed.getEntries().get(i);
            result.add(entry.getTitle().getPlainText());
        }
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.