FileDocCategorySizeDatePackage
EventEntry.javaAPI DocAndroid 1.5 API8054Wed May 06 22:41:16 BST 2009com.google.wireless.gdata.calendar.data

EventEntry

public class EventEntry extends com.google.wireless.gdata.data.Entry
Entry containing information about an event in a calendar.

Fields Summary
public static final byte
STATUS_TENTATIVE
Status constant indicating that a user's attendance at an event is tentative.
public static final byte
STATUS_CONFIRMED
Status constant indicating that a user's attendance at an event is confirmed.
public static final byte
STATUS_CANCELED
Status constant indicating that an event has been cancelled.
public static final byte
VISIBILITY_DEFAULT
Visibility constant indicating that an event uses the user's default visibility.
public static final byte
VISIBILITY_CONFIDENTIAL
Visibility constant indicating that an event has been marked confidential.
public static final byte
VISIBILITY_PRIVATE
Visibility constant indicating that an event has been marked private.
public static final byte
VISIBILITY_PUBLIC
Visibility constant indicating that an event has been marked public.
public static final byte
TRANSPARENCY_OPAQUE
Transparency constant indicating that an event has been marked opaque.
public static final byte
TRANSPARENCY_TRANSPARENT
Transparency constant indicating that an event has been marked transparent.
private byte
status
private String
recurrence
private byte
visibility
private byte
transparency
private Vector
attendees
private Vector
whens
private Vector
reminders
private String
originalEventId
private String
originalEventStartTime
private String
where
private String
commentsUri
private Hashtable
extendedProperties
Constructors Summary
public EventEntry()
Creates a new empty event entry.


               
      
    
Methods Summary
public voidaddAttendee(Who attendee)

        attendees.add(attendee);
    
public voidaddExtendedProperty(java.lang.String name, java.lang.String value)

        if (extendedProperties == null) {
            extendedProperties = new Hashtable();
        }
        extendedProperties.put(name, value);
    
public voidaddReminder(Reminder reminder)

        if (reminders == null) {
            reminders = new Vector();
        }
        reminders.add(reminder);
    
public voidaddWhen(When when)

        whens.add(when);
    
public voidclear()

        super.clear();
        status = STATUS_TENTATIVE;
        recurrence = null;
        visibility = VISIBILITY_DEFAULT;
        transparency = TRANSPARENCY_OPAQUE;
        attendees.removeAllElements();
        whens.removeAllElements();
        reminders = null;
        originalEventId = null;
        originalEventStartTime = null;
        where = null;
        commentsUri = null;
        extendedProperties = null;
    
public voidclearAttendees()

        attendees.clear();
    
public voidclearExtendedProperties()

        extendedProperties = null;
    
public voidclearReminders()

        reminders = null;
    
public voidclearWhens()

        whens.clear();
    
public java.util.VectorgetAttendees()

        return attendees;
    
public java.lang.StringgetCommentsUri()

        return commentsUri;
    
public java.util.HashtablegetExtendedProperties()

        return extendedProperties;
    
public java.lang.StringgetExtendedProperty(java.lang.String name)

        if (extendedProperties == null) {
            return null;
        }
        String value = null;
        if (extendedProperties.containsKey(name)) {
            value = (String) extendedProperties.get(name);
        }
        return value;
    
public WhengetFirstWhen()

        if (whens.isEmpty()) {
            return null;
        }
        return (When) whens.elementAt(0);
    
public java.lang.StringgetOriginalEventId()

        return originalEventId;
    
public java.lang.StringgetOriginalEventStartTime()

        return originalEventStartTime;
    
public java.lang.StringgetRecurrence()

return
the recurrence

        return recurrence;
    
public java.util.VectorgetReminders()

        return reminders;
    
public bytegetStatus()

return
the status

        return status;
    
public bytegetTransparency()

return
the transparency

        return transparency;
    
public bytegetVisibility()

return
the visibility

        return visibility;
    
public java.util.VectorgetWhens()

        return whens;
    
public java.lang.StringgetWhere()

return
the where

        return where;
    
public voidsetCommentsUri(java.lang.String commentsUri)

        this.commentsUri = commentsUri;
    
public voidsetOriginalEventId(java.lang.String originalEventId)

        this.originalEventId = originalEventId;
    
public voidsetOriginalEventStartTime(java.lang.String originalEventStartTime)

        this.originalEventStartTime = originalEventStartTime;
    
public voidsetRecurrence(java.lang.String recurrence)

param
recurrence the recurrence to set

        this.recurrence = recurrence;
    
public voidsetStatus(byte status)

param
status the status to set

        this.status = status;
    
public voidsetTransparency(byte transparency)

param
transparency the transparency to set

        this.transparency = transparency;
    
public voidsetVisibility(byte visibility)

param
visibility the visibility to set

        this.visibility = visibility;
    
public voidsetWhere(java.lang.String where)

param
where the where to set

        this.where = where;
    
public voidtoString(java.lang.StringBuffer sb)

        super.toString(sb);
        sb.append("STATUS: " + status + "\n");
        appendIfNotNull(sb, "RECURRENCE", recurrence);
        sb.append("VISIBILITY: " + visibility + "\n");
        sb.append("TRANSPARENCY: " + transparency + "\n");
        
        appendIfNotNull(sb, "ORIGINAL_EVENT_ID", originalEventId);
        appendIfNotNull(sb, "ORIGINAL_START_TIME", originalEventStartTime);

        Enumeration whos = this.attendees.elements();
        while (whos.hasMoreElements()) {
            Who who = (Who) whos.nextElement();
            who.toString(sb);
        }

        Enumeration times = this.whens.elements();
        while (times.hasMoreElements()) {
            When when = (When) times.nextElement();
            when.toString(sb);
        }
        if (reminders != null) {
            Enumeration alarms = reminders.elements();
            while (alarms.hasMoreElements()) {
                Reminder reminder = (Reminder) alarms.nextElement();
                reminder.toString(sb);
            }
        }
        appendIfNotNull(sb, "WHERE", where);
        appendIfNotNull(sb, "COMMENTS", commentsUri);
        if (extendedProperties != null) {
            Enumeration entryNames = extendedProperties.keys();
            while (entryNames.hasMoreElements()) {
                String name = (String) entryNames.nextElement();
                String value = (String) extendedProperties.get(name);
                sb.append(name);
                sb.append(':");
                sb.append(value);
                sb.append('\n");
            }
        }