com.thirtyboxes.api
Class Event

java.lang.Object
  extended by com.thirtyboxes.api.Event

public class Event
extends java.lang.Object

Represents a 30 Boxes event object. At the moment this is read-only, just as with the rest of the API. An array of these objects in xml format is returned from the API events.Get, events.Search, or events.Tag API methods, and the xml constructor parses them into an Event object.

Author:
keith@kludge.co.uk
See Also:
ThirtyBoxes.eventsGet(AuthorizedUserToken,Calendar,Calendar), ThirtyBoxes.eventsSearch(AuthorizedUserToken,String), ThirtyBoxes.eventsTagSearch(AuthorizedUserToken,String)

Field Summary
static int REPEAT_MONTHLY
           
static int REPEAT_ONCE
           
static int REPEAT_WEEKLY
           
static int REPEAT_YEARLY
           
 
Constructor Summary
protected Event(org.w3c.dom.Node eventNode)
          XML Node constructor.
 
Method Summary
 java.util.Calendar getEnd()
          Get the end date of this event.
 int getID()
          Get the unique ID of this event.
 java.lang.String getNotes()
          Get the detailed notes of this event.
 java.util.Calendar getRepeatEndDate()
          Get the date on which this event should stop repeating if it is of a repeat type other than REPEAT_ONCE.
 int getRepeatType()
          Returns the type of repeat.
 java.util.Calendar getStart()
          Get the start date of this event.
 java.lang.String getSummary()
          Get the summary of this event (the summary is the event name that appears in the calendar view)
 java.lang.String[] getTags()
          Returns an array of tags specified for this event.
 boolean isAllDayEvent()
          Get the end date of this event.
 boolean isPrivate()
          Returns whether the event has been marked private or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPEAT_ONCE

public static final int REPEAT_ONCE
See Also:
Constant Field Values

REPEAT_WEEKLY

public static final int REPEAT_WEEKLY
See Also:
Constant Field Values

REPEAT_MONTHLY

public static final int REPEAT_MONTHLY
See Also:
Constant Field Values

REPEAT_YEARLY

public static final int REPEAT_YEARLY
See Also:
Constant Field Values
Constructor Detail

Event

protected Event(org.w3c.dom.Node eventNode)
XML Node constructor. Creates the object from an object in the REST XML.

Parameters:
eventNode - XML node from an eventList object
Method Detail

getID

public int getID()
Get the unique ID of this event.

Returns:
The ID of this event

getSummary

public java.lang.String getSummary()
Get the summary of this event (the summary is the event name that appears in the calendar view)

Returns:
The summary of this event

getNotes

public java.lang.String getNotes()
Get the detailed notes of this event. This may include instructions for GoogleMaps.

Returns:
The detailed notes of this event

getStart

public java.util.Calendar getStart()
Get the start date of this event. If isAllDayEvent() returns false, the returned Calendar will also include the start time.

Returns:
The start date (and possibly time) of this event
See Also:
isAllDayEvent()

getEnd

public java.util.Calendar getEnd()
Get the end date of this event. If isAllDayEvent() returns false, the returned Calendar will also include the end time.

Returns:
The end date (and possibly time) of this event
See Also:
isAllDayEvent()

isAllDayEvent

public boolean isAllDayEvent()
Get the end date of this event. If isAllDayEvent() returns false, the returned Calendar will also include the end time.

Returns:
true if this is an all day event, false otherwise.

getRepeatType

public int getRepeatType()
Returns the type of repeat. The value can be one of:

Returns:
An Event.REPEAT_something value.

getRepeatEndDate

public java.util.Calendar getRepeatEndDate()
Get the date on which this event should stop repeating if it is of a repeat type other than REPEAT_ONCE.

Returns:
The date on which this event should stop repeating

getTags

public java.lang.String[] getTags()
Returns an array of tags specified for this event. This function will not return a null - if there are no events, if will return an empty array, so it is safe to use in for ( X x : xs ) -style loops without checking for null.

Returns:
An array of tags (or an empty array)

isPrivate

public boolean isPrivate()
Returns whether the event has been marked private or not.

Returns:
true if this event was private, false if it was shared.