public class GoogleCalendarHook
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private com.google.gdata.client.calendar.CalendarService |
service
The google calendar object.
|
| Constructor and Description |
|---|
GoogleCalendarHook(java.lang.String user,
java.lang.String password)
Initializes a new
GoogleCalendarHook with a supplied user and password. |
| Modifier and Type | Method and Description |
|---|---|
private com.google.gdata.client.calendar.CalendarService |
connect(java.lang.String app,
java.lang.String user,
java.lang.String password)
Connects to the google calendar web-service using the supplied application name, user and password.
|
java.util.List<java.lang.String> |
getCalendars()
Fetches the accessible calendars within the established connection.
|
java.util.List<com.google.gdata.data.calendar.CalendarEventEntry> |
getEvents(java.lang.String calendar,
int amount,
com.google.gdata.data.DateTime min,
com.google.gdata.data.DateTime max,
java.lang.String sortOrder)
Fetches entries from a certain calendar within the established connection using supplied request conditions.
|
private <T extends com.google.gdata.data.IFeed> |
getFeed(com.google.gdata.client.Query query,
java.lang.Class<T> feedClass)
Fetches a feed by query.
|
private <T extends com.google.gdata.data.IFeed> |
getFeed(java.net.URL url,
java.lang.Class<T> feedClass)
Fetches a feed by URL.
|
boolean |
isConnected()
Determines if this object is connected to the google calendar web-service.
|
private com.google.gdata.client.calendar.CalendarService service
public GoogleCalendarHook(java.lang.String user,
java.lang.String password)
GoogleCalendarHook with a supplied user and password. The connection to the google
calendar will be established using these informations. The communication to the google calendar web-service will
be done using an SSL connection.user - The users id as String.password - The users password as String.private com.google.gdata.client.calendar.CalendarService connect(java.lang.String app,
java.lang.String user,
java.lang.String password)
app - The name of this application as String.user - The users id as String.password - The users password as String.CalendarService.public final boolean isConnected()
true if this object is connected, otherwise false.public final java.util.List<java.lang.String> getCalendars()
List of calendars as String, which are accessible within the
established connection.public final java.util.List<com.google.gdata.data.calendar.CalendarEventEntry> getEvents(java.lang.String calendar,
int amount,
com.google.gdata.data.DateTime min,
com.google.gdata.data.DateTime max,
java.lang.String sortOrder)
calendar - The calendars name as String for which the requests was launched.amount - The maximum amount of results, -1 is used as wildcard for all.min - The start time of the search as DateTime, null if indifferent.max - The end time of the search as DateTime, null if indifferent.sortOrder - The sorting order as String (ascending or
descending).List of CalendarEventEntry as search result.private <T extends com.google.gdata.data.IFeed> T getFeed(java.net.URL url,
java.lang.Class<T> feedClass)
T - The result feeds object type implementing IFeed.url - The URL to the feed.feedClass - The result feeds object class.private <T extends com.google.gdata.data.IFeed> T getFeed(com.google.gdata.client.Query query,
java.lang.Class<T> feedClass)
T - The result feeds object type implementing IFeed.query - The query to the feed.feedClass - The result feeds object class.