Google Data APIs Client Library (1.41.1)



com.google.gdata.data.extensions
Class Reminder

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ExtensionPoint
          extended by com.google.gdata.data.extensions.Reminder
All Implemented Interfaces:
Extension

public class Reminder
extends ExtensionPoint
implements Extension

GData schema extension describing a reminder on an event. You can represent a set of reminders where each has a (1) reminder period and (2) notification method. The method can be either "sms", "email", "alert", "none", "all".

The meaning of this set of reminders differs based on whether you are reading or writing feeds. When reading, the set of reminders returned on an event takes into account both defaults on a parent recurring event (when applicable) as well as the user's defaults on calendar. If there are no gd:reminders returned that means the event has absolutely no reminders. "none" or "all" will not apply in this case.

Writing is different because we have to be backwards-compatible (see *) with the old way of setting reminders. For easier analysis we describe all the behaviors defined in the table below. (Notice we only include cases for minutes, as the other cases specified in terms of days/hours/absoluteTime can be converted to this case.)

Notice method is case-sensitive: must be in lowercase!

                   no method      method         method=
                   or method=all  =none          email|sms|alert
  ____________________________________________________________________________
  no gd:rem        *no reminder    N/A            N/A

  1 gd:rem         *use user's    no reminder    InvalidEntryException
                   def. settings

  1 gd:rem min=0   *use user's    no reminder    InvalidEntryException
                   def. settings

  1 gd:rem min=-1  *no reminder   no reminder    InvalidEntryException

  1 gd:rem min=+n  *override with no reminder    set exactly one reminder
                   +n for user's                 on event at +n with given
                   selected                      method
                   methods

  multiple gd:rem  InvalidEntry-  InvalidEntry-  copy this set exactly
                   Exception      Exception
 
Hence, to override an event with a set of reminder pairs, just specify them exactly. To clear an event of all overrides (and go back to inheriting the user's defaults), one can simply specify a single gd:reminder with no extra attributes. To have NO event reminders on an event, either set a single gd:reminder with negative reminder time, or simply update the event with a single .


Nested Class Summary
static class Reminder.Method
           
 
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
 
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
AbstractExtension.AttributesHandler
 
Field Summary
protected  DateTime absoluteTime
          Absolute time of the reminder.
protected  java.lang.Integer days
          Number of days before the start time.
protected  java.lang.Integer hours
          Number of hours before the start time.
protected  Reminder.Method method
          Optional: if not set we use the user's default methods on this calendar
protected  java.lang.Integer minutes
          Number of minute before the start times.
 
Fields inherited from class com.google.gdata.data.ExtensionPoint
xmlBlob
 
Fields inherited from class com.google.gdata.data.AbstractExtension
localName, namespace
 
Constructor Summary
Reminder()
           
 
Method Summary
 void generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)
          Generates an XML representation for the extension.
 DateTime getAbsoluteTime()
           
 java.lang.Integer getDays()
           
static ExtensionDescription getDefaultDescription()
          Returns the suggested extension description.
 XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
          The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.
 java.lang.Integer getHours()
           
 Reminder.Method getMethod()
           
 java.lang.Integer getMinutes()
           
 void setAbsoluteTime(DateTime v)
           
 void setDays(java.lang.Integer v)
           
 void setHours(java.lang.Integer v)
           
 void setMethod(Reminder.Method v)
           
 void setMinutes(java.lang.Integer v)
           
 
Methods inherited from class com.google.gdata.data.ExtensionPoint
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, declareExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild, visitChildren
 
Methods inherited from class com.google.gdata.data.AbstractExtension
consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

days

protected java.lang.Integer days
Number of days before the start time.


hours

protected java.lang.Integer hours
Number of hours before the start time.


minutes

protected java.lang.Integer minutes
Number of minute before the start times.


absoluteTime

protected DateTime absoluteTime
Absolute time of the reminder.


method

protected Reminder.Method method
Optional: if not set we use the user's default methods on this calendar

Constructor Detail

Reminder

public Reminder()
Method Detail

getDays

public java.lang.Integer getDays()

setDays

public void setDays(java.lang.Integer v)

getHours

public java.lang.Integer getHours()

setHours

public void setHours(java.lang.Integer v)

getMinutes

public java.lang.Integer getMinutes()

setMinutes

public void setMinutes(java.lang.Integer v)

getAbsoluteTime

public DateTime getAbsoluteTime()

setAbsoluteTime

public void setAbsoluteTime(DateTime v)

getMethod

public Reminder.Method getMethod()

setMethod

public void setMethod(Reminder.Method v)

getDefaultDescription

public static ExtensionDescription getDefaultDescription()
Returns the suggested extension description.


generate

public void generate(com.google.gdata.util.common.xml.XmlWriter w,
                     ExtensionProfile extProfile)
              throws java.io.IOException
Description copied from interface: Extension
Generates an XML representation for the extension.

Specified by:
generate in interface Extension
Overrides:
generate in class AbstractExtension
Parameters:
w - XML writer
extProfile - extension profile
Throws:
java.io.IOException

getHandler

public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile,
                                           java.lang.String namespace,
                                           java.lang.String localName,
                                           org.xml.sax.Attributes attrs)
Description copied from class: AbstractExtension
The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.

Specified by:
getHandler in interface Extension
Overrides:
getHandler in class ExtensionPoint
Parameters:
extProfile - extension profile
namespace - extension namespace
localName - tag name, without the namespace prefix
attrs - tag attributes
Returns:
an element handler