IP*Works! V9

ipworks
Class Caldav

java.lang.Object
  extended by ipworks.Caldav

public class Caldav
extends java.lang.Object

The CalDAV Bean implements an easy-to-use interface to the Calendaring Extensions to the Web Distributed Authoring and Versioning protocol (WebDAV). In this manner the CalDAV protocol specifies a standard way of accessing, managing, and sharing calendaring and scheduling information based on the iCalendar format.

The bean allows remote management of calendar events and collections of events (the calendar itself), including creation, deletion, listing, copying, and moving. Resource locking is also supported.

The GetCalendarReport method will list the event resources contained in the calendar, and the ReportFilter can be used to limit the results returned. The EventDetails event will be fired for each matching calendar resource. You may also request a report containing a list of times that the owner is free or busy using the GetFreeBusyReport . The FreeBusy event will fire for each entry received, and the data fired in the event will also be stored in the FreeBusy property.

Single events can be added to a calendar (or updated) using the PutCalendarEvent method, and can be retrieved via the GetCalendarEvent method. Events may be copied or moved with the CopyCalendarEvent and MoveCalendarEvent .

Depth is used to determine which resources or properties are retrieved from the server. A depth of ResourceOnly will return only the resource associated with ResourceURI , or its properties. A depth of Infinity will return all resources contained within hierarchy, or their collective properties.

Note: Some servers (such as IIS 7.5) may not support a depth of Infinity by default and may return a HTTP 403 Forbidden response.

The following properties are used when creating a request with PutCalendarEvent or ExportICS , and will be filled after calling GetCalendarEvent or ImportICS . These will also be available from inside the EventDetails event, which is fired for each event received from the CalDAV server in response to a GetCalendarReport .

Each method that acts on the calendar takes a ResourceURI parameter, which points to either an event resource or to the calendar itself. Event resources have a URI that ends with a filename and the ".ics" extension. Calendar resources end in a directory path. The following methods all act on events, and thus their ResourceURI parameters must terminate in a filename with the ".ics" extension:

These methods all act upon the calendar collection resource (the calendar itself): The LockCalendar and UnLockCalendar methods may operate on individual events or on the whole calendar.

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 


Field Summary
static int authBasic
           
static int authDigest
           
static int authNegotiate
           
static int authNone
           
static int authNtlm
           
static int authOAuth
           
static int authProprietary
           
static int dpImmediateChildren
           
static int dpInfinity
           
static int dpResourceOnly
           
static int dpUnspecified
           
static int frAlways
           
static int frNever
           
static int frSameScheme
           
static int vEvent
           
static int vFreeBusy
           
static int vJournal
           
static int vTodo
           
 
Constructor Summary
Caldav()
          Creates an instance of Caldav Bean.
Caldav(java.lang.String runtimeLicense)
          Creates an instance of Caldav Bean with specified run-time license.
 
Method Summary
 void addCaldavEventListener(CaldavEventListener l)
           
 void addCookie(java.lang.String cookieName, java.lang.String cookieValue)
          Adds a cookie and the corresponding value to the outgoing request headers.
 void addCustomProperty(java.lang.String varName, java.lang.String varValue)
          Adds a form variable and the corresponding value.
 java.lang.String config(java.lang.String configurationString)
          Sets or retrieves a configuration setting.
 void copyCalendarEvent(java.lang.String sourceResourceURI, java.lang.String destinationResourceURI)
          Copy events to a new location.
 void createCalendar(java.lang.String resourceURI)
          Creates a new calendar collection resource.
 void deleteCalendarEvent(java.lang.String resourceURI)
          Delete a resource or collection.
 void doEvents()
          Processes events from the internal message queue.
 java.lang.String exportICS()
          Generates an event from the properties in the iCal (.ICS) format.
 CalAlarmList getAlarms()
          An alarm related to the event.
 java.lang.String getAttendees()
          Defines one or more participants that have been invited to the event.
 java.lang.String getAuthorization()
          The Authorization string to be sent to the server.
 int getAuthScheme()
          The authentication scheme to use when server authorization is required.
 void getCalendarEvent(java.lang.String resourceURI)
          Retrieves a single event from the CalDAV server.
 void getCalendarOptions(java.lang.String resourceURI)
          Retrieves options for the ResourceURI to determines whether it supports calendar access.
 void getCalendarReport(java.lang.String resourceURI)
          Generates a report on the indicated calendar collection resource.
 java.lang.String getCategories()
          Used to specify categories or subtypes of the calendar event.
 java.lang.String getClassification()
          Defines the access classification for a calendar component.
 java.lang.String getCompleted()
          Date and time that a to-do was actually completed.
 HTTPCookieList getCookies()
          Collection of cookies.
 java.lang.String getCreated()
          Date and time calendar information created.
 CalCustomPropList getCustomProperties()
          List of extra properties that may be used to extend the functionality of this bean.
 int getDepth()
          The depth associated with the current operation.
 java.lang.String getDescription()
          Provides a complete description of the calendar event.
 java.lang.String getDisplayName()
          Provides the display name of the calendar being created.
 java.lang.String getDuration()
          Duration of the calendar event.
 java.lang.String getEndDate()
          Specifies the date and time that a calendar event ends.
 java.lang.String getETag()
          Identifier returned by the CalDAV server which is used to synchronize edits.
 int getEventType()
          Indicates the type of calendar object resource.
 Firewall getFirewall()
          A set of properties related to firewall access.
 int getFollowRedirects()
          Determines what happens when the server issues a redirect.
 CalFreeBusyList getFreeBusy()
          Specifies the times when the calendar owner is free or busy.
 void getFreeBusyReport(java.lang.String resourceURI)
          Generates a report as to when the calendar owner is free and/or busy.
 java.lang.String getLastModified()
          The date and time that the information associated with the calendar event was last revised in the calendar store.
 java.lang.String getLocalHost()
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 java.lang.String getLocation()
          Defines the intended venue for the activity defined by a calendar component.
 CalLock getLockProperties()
          Fields used when locking and unlocking a calendar resource.
 java.lang.String getOrganizer()
          Defines the organizer of a calendar event.
 java.lang.String getOtherHeaders()
          Other headers as determined by the user (optional).
 HeaderList getParsedHeaders()
          Collection of headers returned from the last request.
 java.lang.String getPassword()
          A password if authentication is to be used.
 int getPriority()
          Defines the relative priority for a calendar event.
 Proxy getProxy()
          A set of properties related to proxy access.
 CalRecurrence getRecurrence()
          Defines the recurrence set for the event.
 CalReportFilter getReportFilter()
          Criteria used to filter reports.
 int getSequence()
          Defines the revision sequence number of the event within a sequence of revisions.
 java.lang.String getStartDate()
          Specifies the date and time that an event begins.
 java.lang.String getStatus()
          Defines the overall status or confirmation for the calendar event.
 java.lang.String getStatusLine()
          The first line of the last server response.
 java.lang.String getSummary()
          Defines a short summary or subject for the calendar event.
 int getTimeout()
          A timeout for the bean.
 java.lang.String getTimestamp()
          Specifies the date and time that the instance of the event was created.
 CalTimezone getTimezone()
          Specifies a time zone on a calendar collection.
 java.lang.String getTransparency()
          Defines whether or not an event is transparent to busy time searches.
 java.lang.String getUID()
          A persistent, globally unique identifier for the calendar event.
 java.lang.String getURL()
          Location of the event resource on the CalDAV server.
 java.lang.String getUser()
          A user name if authentication is to be used.
 void importICS(java.lang.String calendarData)
          Imports iCal data (contained in an ICS file) into the bean's property list.
 void interrupt()
          Interrupt the current method.
 boolean isConnected()
          Shows whether the bean is connected.
 boolean isIdle()
          The current status of the component.
 void lockCalendar(java.lang.String resourceURI)
          Obtain a lock for a specified calendar resource.
 void moveCalendarEvent(java.lang.String sourceResourceURI, java.lang.String destinationResourceURI)
          Moves one calendar resource to a new location.
 void putCalendarEvent(java.lang.String resourceURI)
          Adds a calendar resource at the specified ResourceURI using the CalDAV PUT method.
 void removeCaldavEventListener(CaldavEventListener l)
           
 void reset()
          Reset the bean.
 void setAttendees(java.lang.String attendees)
          Defines one or more participants that have been invited to the event.
 void setAuthorization(java.lang.String authorization)
          The Authorization string to be sent to the server.
 void setAuthScheme(int authScheme)
          The authentication scheme to use when server authorization is required.
 void setCategories(java.lang.String categories)
          Used to specify categories or subtypes of the calendar event.
 void setClassification(java.lang.String classification)
          Defines the access classification for a calendar component.
 void setCompleted(java.lang.String completed)
          Date and time that a to-do was actually completed.
 void setConnected(boolean connected)
          Shows whether the bean is connected.
 void setCreated(java.lang.String created)
          Date and time calendar information created.
 void setDepth(int depth)
          The depth associated with the current operation.
 void setDescription(java.lang.String description)
          Provides a complete description of the calendar event.
 void setDisplayName(java.lang.String displayName)
          Provides the display name of the calendar being created.
 void setDuration(java.lang.String duration)
          Duration of the calendar event.
 void setEndDate(java.lang.String endDate)
          Specifies the date and time that a calendar event ends.
 void setETag(java.lang.String ETag)
          Identifier returned by the CalDAV server which is used to synchronize edits.
 void setEventType(int eventType)
          Indicates the type of calendar object resource.
 void setFirewall(Firewall firewall)
          A set of properties related to firewall access.
 void setFollowRedirects(int followRedirects)
          Determines what happens when the server issues a redirect.
 void setLastModified(java.lang.String lastModified)
          The date and time that the information associated with the calendar event was last revised in the calendar store.
 void setLocalHost(java.lang.String localHost)
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 void setLocation(java.lang.String location)
          Defines the intended venue for the activity defined by a calendar component.
 void setLockProperties(CalLock lockProperties)
          Fields used when locking and unlocking a calendar resource.
 void setOrganizer(java.lang.String organizer)
          Defines the organizer of a calendar event.
 void setOtherHeaders(java.lang.String otherHeaders)
          Other headers as determined by the user (optional).
 void setPassword(java.lang.String password)
          A password if authentication is to be used.
 void setPriority(int priority)
          Defines the relative priority for a calendar event.
 void setProxy(Proxy proxy)
          A set of properties related to proxy access.
 void setRecurrence(CalRecurrence recurrence)
          Defines the recurrence set for the event.
 void setReportFilter(CalReportFilter reportFilter)
          Criteria used to filter reports.
 void setSequence(int sequence)
          Defines the revision sequence number of the event within a sequence of revisions.
 void setStartDate(java.lang.String startDate)
          Specifies the date and time that an event begins.
 void setStatus(java.lang.String status)
          Defines the overall status or confirmation for the calendar event.
 void setSummary(java.lang.String summary)
          Defines a short summary or subject for the calendar event.
 void setTimeout(int timeout)
          A timeout for the bean.
 void setTimestamp(java.lang.String timestamp)
          Specifies the date and time that the instance of the event was created.
 void setTimezone(CalTimezone timezone)
          Specifies a time zone on a calendar collection.
 void setTransparency(java.lang.String transparency)
          Defines whether or not an event is transparent to busy time searches.
 void setUID(java.lang.String UID)
          A persistent, globally unique identifier for the calendar event.
 void setUser(java.lang.String user)
          A user name if authentication is to be used.
 void unLockCalendar(java.lang.String resourceURI)
          Unlocks a calendar resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authBasic

public static final int authBasic
See Also:
Constant Field Values

authDigest

public static final int authDigest
See Also:
Constant Field Values

authProprietary

public static final int authProprietary
See Also:
Constant Field Values

authNone

public static final int authNone
See Also:
Constant Field Values

authNtlm

public static final int authNtlm
See Also:
Constant Field Values

authNegotiate

public static final int authNegotiate
See Also:
Constant Field Values

authOAuth

public static final int authOAuth
See Also:
Constant Field Values

dpUnspecified

public static final int dpUnspecified
See Also:
Constant Field Values

dpResourceOnly

public static final int dpResourceOnly
See Also:
Constant Field Values

dpImmediateChildren

public static final int dpImmediateChildren
See Also:
Constant Field Values

dpInfinity

public static final int dpInfinity
See Also:
Constant Field Values

vEvent

public static final int vEvent
See Also:
Constant Field Values

vTodo

public static final int vTodo
See Also:
Constant Field Values

vJournal

public static final int vJournal
See Also:
Constant Field Values

vFreeBusy

public static final int vFreeBusy
See Also:
Constant Field Values

frNever

public static final int frNever
See Also:
Constant Field Values

frAlways

public static final int frAlways
See Also:
Constant Field Values

frSameScheme

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

Caldav

public Caldav()
Creates an instance of Caldav Bean.


Caldav

public Caldav(java.lang.String runtimeLicense)
Creates an instance of Caldav Bean with specified run-time license.

Method Detail

getAlarms

public CalAlarmList getAlarms()
An alarm related to the event.

This property contains the information for an Alarm calendar component. An Alarm calendar component is a grouping of fields that set up a reminder or alarm for an event or to-do. For example, it may be used to define a reminder for a pending event or an overdue to-do.

Each CalAlarm calendar component MUST include the Action and Trigger fields. The Action field further constrains the CalAlarm in the following ways:

When the Action is aAudio , the alarm can optionally include an Attachment field, containing a base-64 encoded binary audio file to be played when the alarm is triggered.

When the Action is aDisplay , the alarm MUST also include the Message field, which contains the text to be displayed when the alarm is triggered.

When the Action is aEmail , the alarm MUST include the Message field, which contains the text to be used as the message body, the Subject field, which contains the text to be used as the message subject, and the Recipient field, which contains the email address of the person intended to receive the message.

An event may contain multiple alarms.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


getAttendees

public java.lang.String getAttendees()
Defines one or more participants that have been invited to the event.

This property may contain a comma-separated list of attendees that have been invited to an event. Each email address should be in the mailto URI format (as defined in RFC2368). For instance:

 CalDAV.Attendees = "mailto:johnsmith@example.com,mailto:janedoe@test.com" 

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setAttendees

public void setAttendees(java.lang.String attendees)
                  throws IPWorksException
Defines one or more participants that have been invited to the event.

This property may contain a comma-separated list of attendees that have been invited to an event. Each email address should be in the mailto URI format (as defined in RFC2368). For instance:

 CalDAV.Attendees = "mailto:johnsmith@example.com,mailto:janedoe@test.com" 

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getAuthorization

public java.lang.String getAuthorization()
The Authorization string to be sent to the server.

If the Authorization property contains a non-empty string, an Authorization HTTP request header is added to the request. This header conveys Authorization information to the server.

A common use for this property is to specify OAuth authorization string.

This property is provided so that the HTTP bean can be extended with other security schemes in addition to the authorization schemes already implemented by the bean.

The AuthScheme property defines the authentication scheme used. In the case of HTTP Basic Authentication (default), every time User and Password are set, they are Base64 encoded, and the result is put in the Authorization property in the form "Basic [encoded-user-password]".


setAuthorization

public void setAuthorization(java.lang.String authorization)
                      throws IPWorksException
The Authorization string to be sent to the server.

If the Authorization property contains a non-empty string, an Authorization HTTP request header is added to the request. This header conveys Authorization information to the server.

A common use for this property is to specify OAuth authorization string.

This property is provided so that the HTTP bean can be extended with other security schemes in addition to the authorization schemes already implemented by the bean.

The AuthScheme property defines the authentication scheme used. In the case of HTTP Basic Authentication (default), every time User and Password are set, they are Base64 encoded, and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

Throws:
IPWorksException

getAuthScheme

public int getAuthScheme()
The authentication scheme to use when server authorization is required.

This property will tell the bean which type of authorization to perform when the User and Password properties are set.

This property should be set to authNone (3) when no authentication is to be performed.

By default, this property is authBasic (0), and if the User and Password properties are set, the bean will attempt basic authentication. If AuthScheme is set to authDigest (1), authNtlm (4) or authNegotiate (5), digest, NTLM or Negotiate authentication will be attempted instead.

If AuthScheme is set to authProprietary (2) then the authorization token must be supplied through Authorization property.

If AuthScheme is set to authOAuth (6) then the authorization string must be supplied through Authorization property.

Note that, if you set the Authorization property and AuthScheme is not authProprietary or authOAuth, the AuthScheme will be set automatically to authProprietary (2) by the control.

For security purposes, changing the value of this property will cause the bean to clear the values of User , Password and Authorization .


setAuthScheme

public void setAuthScheme(int authScheme)
                   throws IPWorksException
The authentication scheme to use when server authorization is required.

This property will tell the bean which type of authorization to perform when the User and Password properties are set.

This property should be set to authNone (3) when no authentication is to be performed.

By default, this property is authBasic (0), and if the User and Password properties are set, the bean will attempt basic authentication. If AuthScheme is set to authDigest (1), authNtlm (4) or authNegotiate (5), digest, NTLM or Negotiate authentication will be attempted instead.

If AuthScheme is set to authProprietary (2) then the authorization token must be supplied through Authorization property.

If AuthScheme is set to authOAuth (6) then the authorization string must be supplied through Authorization property.

Note that, if you set the Authorization property and AuthScheme is not authProprietary or authOAuth, the AuthScheme will be set automatically to authProprietary (2) by the control.

For security purposes, changing the value of this property will cause the bean to clear the values of User , Password and Authorization .

Throws:
IPWorksException

getCategories

public java.lang.String getCategories()
Used to specify categories or subtypes of the calendar event.

This property is used to specify the categories or subtypes contained in a calendar event. The categories are useful in searching for an event of a particular type and/or category. Within the "VEVENT", "VTODO", or "VJOURNAL" calendar components, more than one category can be specified as a COMMA-separated list of categories. For example:

 CalDAV.CalendarEvents[0].Category = "APPOINTMENT,EDUCATION,MEETING"; 

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setCategories

public void setCategories(java.lang.String categories)
                   throws IPWorksException
Used to specify categories or subtypes of the calendar event.

This property is used to specify the categories or subtypes contained in a calendar event. The categories are useful in searching for an event of a particular type and/or category. Within the "VEVENT", "VTODO", or "VJOURNAL" calendar components, more than one category can be specified as a COMMA-separated list of categories. For example:

 CalDAV.CalendarEvents[0].Category = "APPOINTMENT,EDUCATION,MEETING"; 

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getClassification

public java.lang.String getClassification()
Defines the access classification for a calendar component.

This property provides a method for capturing the access that the owner wishes to allow for the calendar component. Standard values include "PUBLIC", "PRIVATE", and "CONFIDENTIAL", but calendars may support additional values as well as user-defined values. If not specified, the default value is PUBLIC. Applications MUST treat Classification values that they do not recognize the same way as they would the PRIVATE value.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setClassification

public void setClassification(java.lang.String classification)
                       throws IPWorksException
Defines the access classification for a calendar component.

This property provides a method for capturing the access that the owner wishes to allow for the calendar component. Standard values include "PUBLIC", "PRIVATE", and "CONFIDENTIAL", but calendars may support additional values as well as user-defined values. If not specified, the default value is PUBLIC. Applications MUST treat Classification values that they do not recognize the same way as they would the PRIVATE value.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getCompleted

public java.lang.String getCompleted()
Date and time that a to-do was actually completed.

This property defines the date and time that a to-do was actually completed. This property is only applicable for the vTodo EventType . The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setCompleted

public void setCompleted(java.lang.String completed)
                  throws IPWorksException
Date and time that a to-do was actually completed.

This property defines the date and time that a to-do was actually completed. This property is only applicable for the vTodo EventType . The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

isConnected

public boolean isConnected()
Shows whether the bean is connected.

This property is used to determine whether or not the bean is connected to the remote host.


setConnected

public void setConnected(boolean connected)
                  throws IPWorksException
Shows whether the bean is connected.

This property is used to determine whether or not the bean is connected to the remote host.

Throws:
IPWorksException

getCookies

public HTTPCookieList getCookies()
Collection of cookies.

This property contains a collection of cookies. To add cookies to outgoing HTTP requests, add cookies (of type httpcookie ) to this collection.

To see cookies that are set by the server, use the SetCookie event, which displays the cookies and their properties as set by the server. Those cookies are also added to Cookies .

MaxHTTPCookies can be used to control the maximum number of cookies saved.

This collection is indexed from 0 to size - 1.


getCreated

public java.lang.String getCreated()
Date and time calendar information created.

This property specifies the date and time that the calendar information was created by the calendar user agent in the calendar store. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setCreated

public void setCreated(java.lang.String created)
                throws IPWorksException
Date and time calendar information created.

This property specifies the date and time that the calendar information was created by the calendar user agent in the calendar store. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getCustomProperties

public CalCustomPropList getCustomProperties()
List of extra properties that may be used to extend the functionality of this bean.

This property is used to add additional name/value pairs to the request. It is valid only for the PutCalendarEvent and CreateCalendar methods. You may use this property to submit any CalDAV fields that are not directly supported by this bean. You may also use it to send custom properties that are specific on the calendar that you are using. Such custom properties normally start with "X-". For instance:

 CalDAV.CustomProperties.Add(new CalCustomProp("X-foo", "bar"));
   
   or
   
   CalDAV.CustomProperties.Add(new CalCustomProp());
   CalDAV.CustomProperties[0].Name = "X-hello";
   CalDAV.CustomProperties[0].Value = "world"; 
The contents of the CustomProperties collection will only be added to the PutCalendarEvent or CreateCalendar requests. They will be ignored for all other methods.


getDepth

public int getDepth()
The depth associated with the current operation.

This property defines how deep to operate within a collection. When performing certain operations on resource collections, the bean will use Depth to instruct the server on how deep to operate within the collection. Depth is an enumerated type with the following possible values:

dpUnspecified (0)
The server will use the protocol default depth for the operation (this is normally "infinity").
dpResourceOnly (1)
The server will operate only on the collection resource URI, and not on any of its internal member resources.
dpImmediateChildren (2)
The server will operate on the collection resource URI and all of its immediate member resources (but on none of their member resources).
dpInfinity (3)
The server will recursively operate on the target resource URI and all of its internal member URIs through all levels of the collection hierarchy.

Depth is used when performing the following operations: LockCalendar , MoveCalendarEvent , CopyCalendarEvent , and GetCalendarReport


setDepth

public void setDepth(int depth)
              throws IPWorksException
The depth associated with the current operation.

This property defines how deep to operate within a collection. When performing certain operations on resource collections, the bean will use Depth to instruct the server on how deep to operate within the collection. Depth is an enumerated type with the following possible values:

dpUnspecified (0)
The server will use the protocol default depth for the operation (this is normally "infinity").
dpResourceOnly (1)
The server will operate only on the collection resource URI, and not on any of its internal member resources.
dpImmediateChildren (2)
The server will operate on the collection resource URI and all of its immediate member resources (but on none of their member resources).
dpInfinity (3)
The server will recursively operate on the target resource URI and all of its internal member URIs through all levels of the collection hierarchy.

Depth is used when performing the following operations: LockCalendar , MoveCalendarEvent , CopyCalendarEvent , and GetCalendarReport

Throws:
IPWorksException

getDescription

public java.lang.String getDescription()
Provides a complete description of the calendar event.

This property provides a more complete description of the event than is provided by the Summary property. It is also used by the CreateCalendar method when creating a new calendar collection.


setDescription

public void setDescription(java.lang.String description)
                    throws IPWorksException
Provides a complete description of the calendar event.

This property provides a more complete description of the event than is provided by the Summary property. It is also used by the CreateCalendar method when creating a new calendar collection.

Throws:
IPWorksException

getDisplayName

public java.lang.String getDisplayName()
Provides the display name of the calendar being created.

This property provides the name to be displayed for a calendar. This may or may not be defined on any calendar collection. It should be set before creating a new calendar collection via the CreateCalendar method.


setDisplayName

public void setDisplayName(java.lang.String displayName)
                    throws IPWorksException
Provides the display name of the calendar being created.

This property provides the name to be displayed for a calendar. This may or may not be defined on any calendar collection. It should be set before creating a new calendar collection via the CreateCalendar method.

Throws:
IPWorksException

getDuration

public java.lang.String getDuration()
Duration of the calendar event.

This property contains the duration for a calendar event. Durations are represented by the format P <date> T <time>. The date component may contain a number of days or weeks (but not months or years), and the time component may consist of hours, minutes, and seconds. These are represented by an integer value followed by a letter representing the units, as specified by the table below:

P
is the duration designator (historically called "period") placed at the start of the duration representation.
W
is the week designator that follows the value for the number of weeks.
D
is the day designator that follows the value for the number of days.
T
is the time designator that precedes the time components of the representation.
H
is the hour designator that follows the value for the number of hours.
M
is the minute designator that follows the value for the number of minutes.
S
is the second designator that follows the value for the number of seconds.
For example, "P4DT12H30M5S" represents a duration of four days, twelve hours, thirty minutes, and five seconds. Unused date/time designators may be left out completely. (A five-minute duration may be represented as simply "PT5M"). Also note that "PT36H" and "P1DT12H" represent the same duration.

This format is based on ISO-8601, but unlike the ISO specification this duration property does not support durations measured in years or months.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setDuration

public void setDuration(java.lang.String duration)
                 throws IPWorksException
Duration of the calendar event.

This property contains the duration for a calendar event. Durations are represented by the format P <date> T <time>. The date component may contain a number of days or weeks (but not months or years), and the time component may consist of hours, minutes, and seconds. These are represented by an integer value followed by a letter representing the units, as specified by the table below:

P
is the duration designator (historically called "period") placed at the start of the duration representation.
W
is the week designator that follows the value for the number of weeks.
D
is the day designator that follows the value for the number of days.
T
is the time designator that precedes the time components of the representation.
H
is the hour designator that follows the value for the number of hours.
M
is the minute designator that follows the value for the number of minutes.
S
is the second designator that follows the value for the number of seconds.
For example, "P4DT12H30M5S" represents a duration of four days, twelve hours, thirty minutes, and five seconds. Unused date/time designators may be left out completely. (A five-minute duration may be represented as simply "PT5M"). Also note that "PT36H" and "P1DT12H" represent the same duration.

This format is based on ISO-8601, but unlike the ISO specification this duration property does not support durations measured in years or months.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getEndDate

public java.lang.String getEndDate()
Specifies the date and time that a calendar event ends.

This property specifies the date and time that a calendar event will end. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setEndDate

public void setEndDate(java.lang.String endDate)
                throws IPWorksException
Specifies the date and time that a calendar event ends.

This property specifies the date and time that a calendar event will end. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getETag

public java.lang.String getETag()
Identifier returned by the CalDAV server which is used to synchronize edits.

This property identifies the state of the event in the calendar. An ETag is returned by the CalDAV server after a successful PutCalendarEvent request. Every time an event is updated, the ETag changes. This gives you the ability to determine if another user has changed the event you added.

You can use this ETag value to maintain a cache. If you submit a GetCalendarReport request with the ReturnCalendarData field set to False only the URI and ETags for each event in the calendar will be returned in the report. You can cache the ETag and URI locally, and then inspect the report for any changes and update only the events that have changed ETags.

When updating an event with the PutCalendarEvent method, you may add the ETag to the "If-Match" header (using OtherHeaders ) in order to insure that you are not overwriting more recent changes on the server. For instance:

 calDAV.UID = "20110202T000000Z-6414-500-10112-204@nsoftest";
   calDAV.StartDate = "20110202T000000Z";
   calDAV.EndDate = "20110202T110000Z";
   calDAV.TimeStamp = "20100301T000000Z";
   calDAV.Summary = "Dinner with friends";
   calDAV.Description = "Getting everyone together for some food and fun";
   calDAV.Location = "The James Joyce Irish Pub";
   calDAV.EventType = CaldavsEventTypes.vEvent;
   calDAV.OtherHeaders = "If-Match: 1900-1900\\r\\n";
   calDAV.PutCalendarEvent "https://caldav.calendar.yahoo.com/dav/user_name/Calendar/My_Calendar/20110202T000000Z-6414-500-10112-204@nsoftest.ics" 
If the current ETag for the above event is "1900-1900", then the above modification will work perfectly. However, if the event was modified on the Yahoo server, the ETag will not match and the above will fail with an HTTP Protocol error: "409 Conflict". In that case you should retrieve the event with GetCalendarEvent and update the most recent version.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setETag

public void setETag(java.lang.String ETag)
             throws IPWorksException
Identifier returned by the CalDAV server which is used to synchronize edits.

This property identifies the state of the event in the calendar. An ETag is returned by the CalDAV server after a successful PutCalendarEvent request. Every time an event is updated, the ETag changes. This gives you the ability to determine if another user has changed the event you added.

You can use this ETag value to maintain a cache. If you submit a GetCalendarReport request with the ReturnCalendarData field set to False only the URI and ETags for each event in the calendar will be returned in the report. You can cache the ETag and URI locally, and then inspect the report for any changes and update only the events that have changed ETags.

When updating an event with the PutCalendarEvent method, you may add the ETag to the "If-Match" header (using OtherHeaders ) in order to insure that you are not overwriting more recent changes on the server. For instance:

 calDAV.UID = "20110202T000000Z-6414-500-10112-204@nsoftest";
   calDAV.StartDate = "20110202T000000Z";
   calDAV.EndDate = "20110202T110000Z";
   calDAV.TimeStamp = "20100301T000000Z";
   calDAV.Summary = "Dinner with friends";
   calDAV.Description = "Getting everyone together for some food and fun";
   calDAV.Location = "The James Joyce Irish Pub";
   calDAV.EventType = CaldavsEventTypes.vEvent;
   calDAV.OtherHeaders = "If-Match: 1900-1900\\r\\n";
   calDAV.PutCalendarEvent "https://caldav.calendar.yahoo.com/dav/user_name/Calendar/My_Calendar/20110202T000000Z-6414-500-10112-204@nsoftest.ics" 
If the current ETag for the above event is "1900-1900", then the above modification will work perfectly. However, if the event was modified on the Yahoo server, the ETag will not match and the above will fail with an HTTP Protocol error: "409 Conflict". In that case you should retrieve the event with GetCalendarEvent and update the most recent version.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getEventType

public int getEventType()
Indicates the type of calendar object resource.

This property indicates the type of calendar object resource is used.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setEventType

public void setEventType(int eventType)
                  throws IPWorksException
Indicates the type of calendar object resource.

This property indicates the type of calendar object resource is used.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getFirewall

public Firewall getFirewall()
A set of properties related to firewall access.

This is a Firewall type property which contains fields describing the firewall through which the bean will attempt to connect.


setFirewall

public void setFirewall(Firewall firewall)
                 throws IPWorksException
A set of properties related to firewall access.

This is a Firewall type property which contains fields describing the firewall through which the bean will attempt to connect.

Throws:
IPWorksException

getFollowRedirects

public int getFollowRedirects()
Determines what happens when the server issues a redirect.

This property determines what happens when the server issues a redirect. Normally, the bean returns an error if the server responds with an "Object Moved" message. If this property is set to frAlways (1), the new URL for the object is retrieved automatically every time.

If this property is set to frSameScheme (2), the new URL is retrieved automatically only if the URLScheme is the same, otherwise the bean throws an exception.

Note that following the HTTP specification, unless this property is set to frAlways (1), automatic redirects will be performed only for 'GET' or 'HEAD' requests. Other methods could potentially change the conditions of the initial request and create security vulnerabilities.

Furthermore, if either the new URL server and port are different than the existing one, User and Password are also reset to empty, unless this property is set to frAlways (1), in which case the same credentials are used to connect to the new server.

A Redirect event is fired for every URL the product is redirected to. In the case of automatic redirections, the Redirect event is a good place to set properties related to the new connection (e.g. new authentication parameters).

The default value is frNever (0). In this case, redirects are never followed, and the bean throws an exception instead.


setFollowRedirects

public void setFollowRedirects(int followRedirects)
                        throws IPWorksException
Determines what happens when the server issues a redirect.

This property determines what happens when the server issues a redirect. Normally, the bean returns an error if the server responds with an "Object Moved" message. If this property is set to frAlways (1), the new URL for the object is retrieved automatically every time.

If this property is set to frSameScheme (2), the new URL is retrieved automatically only if the URLScheme is the same, otherwise the bean throws an exception.

Note that following the HTTP specification, unless this property is set to frAlways (1), automatic redirects will be performed only for 'GET' or 'HEAD' requests. Other methods could potentially change the conditions of the initial request and create security vulnerabilities.

Furthermore, if either the new URL server and port are different than the existing one, User and Password are also reset to empty, unless this property is set to frAlways (1), in which case the same credentials are used to connect to the new server.

A Redirect event is fired for every URL the product is redirected to. In the case of automatic redirections, the Redirect event is a good place to set properties related to the new connection (e.g. new authentication parameters).

The default value is frNever (0). In this case, redirects are never followed, and the bean throws an exception instead.

Throws:
IPWorksException

getFreeBusy

public CalFreeBusyList getFreeBusy()
Specifies the times when the calendar owner is free or busy.

This property may contain free/busy information in response to a GetFreeBusyReport request or after either a GetCalendarReport or a GetCalendarEvent request. In the latter case, this property will only contain data when the EventType is vFreeBusy .


isIdle

public boolean isIdle()
The current status of the component.

Idle will be False if the component is currently busy (communicating and/or waiting for an answer), and True at all other times.


getLastModified

public java.lang.String getLastModified()
The date and time that the information associated with the calendar event was last revised in the calendar store.

This property contains the date and time that the information associated with the calendar event was last revised in the calendar store. This is analogous to the modification date and time for a file in the file system, and must be specified in the UTC time format: <date> T <time>Z, where date is in "YYYYMMDD" format and time is in "hhmmss" format. "T" is the delimiter between date and time, and "Z" is the UTC timezone indicator. For example, "20020119T13:23:56Z" is 1:23:56pm on January 19th, 2002. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setLastModified

public void setLastModified(java.lang.String lastModified)
                     throws IPWorksException
The date and time that the information associated with the calendar event was last revised in the calendar store.

This property contains the date and time that the information associated with the calendar event was last revised in the calendar store. This is analogous to the modification date and time for a file in the file system, and must be specified in the UTC time format: <date> T <time>Z, where date is in "YYYYMMDD" format and time is in "hhmmss" format. "T" is the delimiter between date and time, and "Z" is the UTC timezone indicator. For example, "20020119T13:23:56Z" is 1:23:56pm on January 19th, 2002. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getLocalHost

public java.lang.String getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.


setLocalHost

public void setLocalHost(java.lang.String localHost)
                  throws IPWorksException
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.

Throws:
IPWorksException

getLocation

public java.lang.String getLocation()
Defines the intended venue for the activity defined by a calendar component.

This property may be used to explicitly specify the venue, such as conference or meeting rooms, for the activity defined by a calendar component. An alternate representation may be specified using a URI that points to directory information with more structured specifications of the location. For example, the alternate representation may specify either an LDAP URL [RFC4516] pointing to an LDAP server entry or a CID URL [RFC2392] pointing to a MIME body part containing a Virtual-Information Card (vCard) [RFC2426] for the location.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setLocation

public void setLocation(java.lang.String location)
                 throws IPWorksException
Defines the intended venue for the activity defined by a calendar component.

This property may be used to explicitly specify the venue, such as conference or meeting rooms, for the activity defined by a calendar component. An alternate representation may be specified using a URI that points to directory information with more structured specifications of the location. For example, the alternate representation may specify either an LDAP URL [RFC4516] pointing to an LDAP server entry or a CID URL [RFC2392] pointing to a MIME body part containing a Virtual-Information Card (vCard) [RFC2426] for the location.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getLockProperties

public CalLock getLockProperties()
Fields used when locking and unlocking a calendar resource.

This property used the LockType , Owner , Scope Timeout , and Tokens fields when locking and unlocking a calendar resource. You may lock the whole calendar, or only a single event within the calendar, depending on the URI you pass to LockCalendar or UnLockCalendar . After a successful LockCalendar operation, the bean will the LockType , Owner , Scope Timeout , and Tokens fields to the values returned in the server's response. The lock Tokens are then passed along when you call CopyCalendarEvent or MoveCalendarEvent


setLockProperties

public void setLockProperties(CalLock lockProperties)
                       throws IPWorksException
Fields used when locking and unlocking a calendar resource.

This property used the LockType , Owner , Scope Timeout , and Tokens fields when locking and unlocking a calendar resource. You may lock the whole calendar, or only a single event within the calendar, depending on the URI you pass to LockCalendar or UnLockCalendar . After a successful LockCalendar operation, the bean will the LockType , Owner , Scope Timeout , and Tokens fields to the values returned in the server's response. The lock Tokens are then passed along when you call CopyCalendarEvent or MoveCalendarEvent

Throws:
IPWorksException

getOrganizer

public java.lang.String getOrganizer()
Defines the organizer of a calendar event.

This property is specified within the vEvent , vTodo , and vJournal calendar EventType s to specify the organizer of a group-scheduled calendar entity. The property is specified within the vFreeBusy EventType to identify the calendar user requesting the free or busy time. When publishing a vFreeBusy EventType , the property is used to specify the calendar that the published busy time came from.

Each email address should be in the mailto URI format (as defined in RFC2368).

For instance:

 CalDAV.Organizer = "mailto:jane_doe@example.com"; 

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setOrganizer

public void setOrganizer(java.lang.String organizer)
                  throws IPWorksException
Defines the organizer of a calendar event.

This property is specified within the vEvent , vTodo , and vJournal calendar EventType s to specify the organizer of a group-scheduled calendar entity. The property is specified within the vFreeBusy EventType to identify the calendar user requesting the free or busy time. When publishing a vFreeBusy EventType , the property is used to specify the calendar that the published busy time came from.

Each email address should be in the mailto URI format (as defined in RFC2368).

For instance:

 CalDAV.Organizer = "mailto:jane_doe@example.com"; 

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getOtherHeaders

public java.lang.String getOtherHeaders()
Other headers as determined by the user (optional).

This property can be set to a string of headers to be appended to the HTTP request headers created from other properties like ContentType , From , etc.

The headers must be of the format "header: value" as described in the HTTP specifications. Header lines should be separated by CRLF ("\\r\\n") .

Use this property with caution. If this property contains invalid headers, HTTP requests may fail.

This property is useful for extending the functionality of the bean beyond what is provided.

For CalDAV, the "If-Match" header is extremely useful. After adding a an event with PutCalendarEvent or retrieving an event with GetCalendarEvent , the ETag property will contain a value indicating the current state of the event. If you wish to update the event, you may pass this returned ETag in an "If-Match" header. If the event on the server has been modified since you retrieved it (and the ETag on the server has changed), then the PutCalendarEvent will fail with an HTTP Protocol Error: "409 Conflict", which indicates there is a conflict between the version you're trying to update and the current version on the sever. For instance:

 calDAV.OtherHeaders = "If-Match: 1900-1900\\r\\n"; 


setOtherHeaders

public void setOtherHeaders(java.lang.String otherHeaders)
                     throws IPWorksException
Other headers as determined by the user (optional).

This property can be set to a string of headers to be appended to the HTTP request headers created from other properties like ContentType , From , etc.

The headers must be of the format "header: value" as described in the HTTP specifications. Header lines should be separated by CRLF ("\\r\\n") .

Use this property with caution. If this property contains invalid headers, HTTP requests may fail.

This property is useful for extending the functionality of the bean beyond what is provided.

For CalDAV, the "If-Match" header is extremely useful. After adding a an event with PutCalendarEvent or retrieving an event with GetCalendarEvent , the ETag property will contain a value indicating the current state of the event. If you wish to update the event, you may pass this returned ETag in an "If-Match" header. If the event on the server has been modified since you retrieved it (and the ETag on the server has changed), then the PutCalendarEvent will fail with an HTTP Protocol Error: "409 Conflict", which indicates there is a conflict between the version you're trying to update and the current version on the sever. For instance:

 calDAV.OtherHeaders = "If-Match: 1900-1900\\r\\n"; 

Throws:
IPWorksException

getParsedHeaders

public HeaderList getParsedHeaders()
Collection of headers returned from the last request.

This property contains a collection of headers returned from the last request. Whenever headers are returned from the server, the headers are parsed into a collection of headers. Each header in this collection contains information describing that header.

MaxHeaders can be used to control the maximum number of headers saved.

This collection is indexed from 0 to size - 1.


getPassword

public java.lang.String getPassword()
A password if authentication is to be used.

This property contains a password if authentication is to be used. If AuthScheme is set to HTTP Basic Authentication, The User and Password are Base64 encoded and the result is put in the Authorization config setting in the form "Basic [encoded-user-password]".

If AuthScheme is set to HTTP Digest Authentication, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

If AuthScheme is set to NTLM, NTLM authentication will be attempted. If AuthScheme is set to NTLM and User and Password are empty, the bean will attempt to authenticate using the current user's credentials.


setPassword

public void setPassword(java.lang.String password)
                 throws IPWorksException
A password if authentication is to be used.

This property contains a password if authentication is to be used. If AuthScheme is set to HTTP Basic Authentication, The User and Password are Base64 encoded and the result is put in the Authorization config setting in the form "Basic [encoded-user-password]".

If AuthScheme is set to HTTP Digest Authentication, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

If AuthScheme is set to NTLM, NTLM authentication will be attempted. If AuthScheme is set to NTLM and User and Password are empty, the bean will attempt to authenticate using the current user's credentials.

Throws:
IPWorksException

getPriority

public int getPriority()
Defines the relative priority for a calendar event.

This property defines the relative priority of a calendar event. The priority is specified as an integer in the range 0 to 9. A value of 0 specifies an undefined Priority . A value of 1 is the highest Priority . A value of 2 is the second highest Priority . Subsequent numbers specify a decreasing ordinal Priority . A value of 9 is the lowest Priority .

A Calendar User-Agent (CUA) with a three-level Priority scheme of "HIGH", "MEDIUM", and "LOW" is mapped into this property such that a property value in the range of 1 to 4 specifies "HIGH" Priority . A value of 5 is the normal or "MEDIUM" Priority . A value in the range of 6 to 9 is "LOW" Priority .

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setPriority

public void setPriority(int priority)
                 throws IPWorksException
Defines the relative priority for a calendar event.

This property defines the relative priority of a calendar event. The priority is specified as an integer in the range 0 to 9. A value of 0 specifies an undefined Priority . A value of 1 is the highest Priority . A value of 2 is the second highest Priority . Subsequent numbers specify a decreasing ordinal Priority . A value of 9 is the lowest Priority .

A Calendar User-Agent (CUA) with a three-level Priority scheme of "HIGH", "MEDIUM", and "LOW" is mapped into this property such that a property value in the range of 1 to 4 specifies "HIGH" Priority . A value of 5 is the normal or "MEDIUM" Priority . A value in the range of 6 to 9 is "LOW" Priority .

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getProxy

public Proxy getProxy()
A set of properties related to proxy access.

This property contains fields describing the proxy through which the bean will attempt to connect.


setProxy

public void setProxy(Proxy proxy)
              throws IPWorksException
A set of properties related to proxy access.

This property contains fields describing the proxy through which the bean will attempt to connect.

Throws:
IPWorksException

getRecurrence

public CalRecurrence getRecurrence()
Defines the recurrence set for the event.

This property defines the recurrence set for the event. The recurrence set is the complete set of recurrence instances for a calendar component. The recurrence set is generated by considering the initial CALDAV StartDate property along with the Rule , Dates , ExceptionRule , and ExceptionDates fields contained within the recurring event. The CALDAV StartDate property defines the first instance in the recurrence set. The starting date SHOULD match the pattern of the recurrence rule, if specified. The recurrence set generated with a start date that doesn't match the pattern of the rule is undefined. The final recurrence set is generated by gathering all of the start DATE-TIME values generated by any of the specified Rule and Dates fields, and then excluding any start DATE-TIME values specified by the ExceptionRule or ExceptionDates fields. This implies that DATE-TIME values specified by the ExceptionRule and ExceptionDates fields take precedence over those specified by inclusion properties (i.e., Dates and Rule ). When duplicate instances are generated by the recurrence Rule and Dates fields, only one recurrence is considered. Duplicate instances are ignored.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setRecurrence

public void setRecurrence(CalRecurrence recurrence)
                   throws IPWorksException
Defines the recurrence set for the event.

This property defines the recurrence set for the event. The recurrence set is the complete set of recurrence instances for a calendar component. The recurrence set is generated by considering the initial CALDAV StartDate property along with the Rule , Dates , ExceptionRule , and ExceptionDates fields contained within the recurring event. The CALDAV StartDate property defines the first instance in the recurrence set. The starting date SHOULD match the pattern of the recurrence rule, if specified. The recurrence set generated with a start date that doesn't match the pattern of the rule is undefined. The final recurrence set is generated by gathering all of the start DATE-TIME values generated by any of the specified Rule and Dates fields, and then excluding any start DATE-TIME values specified by the ExceptionRule or ExceptionDates fields. This implies that DATE-TIME values specified by the ExceptionRule and ExceptionDates fields take precedence over those specified by inclusion properties (i.e., Dates and Rule ). When duplicate instances are generated by the recurrence Rule and Dates fields, only one recurrence is considered. Duplicate instances are ignored.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getReportFilter

public CalReportFilter getReportFilter()
Criteria used to filter reports.

This property may be used to restrict the results of reports to only those that match your search criteria.The GetCalendarReport method will normally return the entire calendar collection at the specified ResourceURI . You can restrict results to only events within a specified time range (using StartDate and EndDate ), to only recurring events within a specified time range (using RecurStart and RecurEnd ), and to events with an alarm set to go off within a specified time range. (using AlarmStart and AlarmEnd ). You can also restrict results to only those events which contain a specific Property (either by property name, or name and a specific value). The EventType property determines what kind of events are returned (events, todo lists, journal entries, or free/busy time).


setReportFilter

public void setReportFilter(CalReportFilter reportFilter)
                     throws IPWorksException
Criteria used to filter reports.

This property may be used to restrict the results of reports to only those that match your search criteria.The GetCalendarReport method will normally return the entire calendar collection at the specified ResourceURI . You can restrict results to only events within a specified time range (using StartDate and EndDate ), to only recurring events within a specified time range (using RecurStart and RecurEnd ), and to events with an alarm set to go off within a specified time range. (using AlarmStart and AlarmEnd ). You can also restrict results to only those events which contain a specific Property (either by property name, or name and a specific value). The EventType property determines what kind of events are returned (events, todo lists, journal entries, or free/busy time).

Throws:
IPWorksException

getSequence

public int getSequence()
Defines the revision sequence number of the event within a sequence of revisions.

This property defines the revision sequence number of the event within a sequence of revisions. When a calendar component is created its Sequence number is 0. It is incremented by the Organizer 's Calendar User Agent (CUA) each time the Organizer makes a significant revision to the calendar event. Therefore, a Sequence number of 2 means the event has been revised twice.

The Organizer includes this property in a calendar event that it sends to an Attendees to specify the current version of the event. Likewise, the Attendees includes this property in an event that it sends to the Organizer to specify the version of the calendar component to which the Attendees is referring.

Note: Recurrence instances of a recurring event may have different sequence numbers.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setSequence

public void setSequence(int sequence)
                 throws IPWorksException
Defines the revision sequence number of the event within a sequence of revisions.

This property defines the revision sequence number of the event within a sequence of revisions. When a calendar component is created its Sequence number is 0. It is incremented by the Organizer 's Calendar User Agent (CUA) each time the Organizer makes a significant revision to the calendar event. Therefore, a Sequence number of 2 means the event has been revised twice.

The Organizer includes this property in a calendar event that it sends to an Attendees to specify the current version of the event. Likewise, the Attendees includes this property in an event that it sends to the Organizer to specify the version of the calendar component to which the Attendees is referring.

Note: Recurrence instances of a recurring event may have different sequence numbers.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getStartDate

public java.lang.String getStartDate()
Specifies the date and time that an event begins.

This property specifies the date and time that an event begins. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setStartDate

public void setStartDate(java.lang.String startDate)
                  throws IPWorksException
Specifies the date and time that an event begins.

This property specifies the date and time that an event begins. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getStatus

public java.lang.String getStatus()
Defines the overall status or confirmation for the calendar event.

In a group-scheduled calendar component, the property is used by the Organizer to provide a confirmation of the event to the Attendees . For example in a vEvent EventType the Organizer can indicate that a meeting is tentative, confirmed, or canceled. For a vTodo EventType , the Organizer can indicate that an action item needs action, is completed, is in process or being worked on, or has been canceled. In a vJournal EventType , the Organizer can indicate that a journal entry is draft, final, or has been canceled or removed.

Statuses for a vEvent EventType :

TENTATIVE
Indicates event is tentative.
CONFIRMED
Indicates event is definite.
CANCELLED
Indicates event was canceled.
Statuses for a vTodo EventType :
NEEDS-ACTION
Indicates to-do needs action.
COMPLETED
Indicates to-do completed.
IN-PROCESS
Indicates to-do in process of.
CANCELLED
Indicates to-do was canceled.
Statuses for a vJournal EventType :
DRAFT
Indicates event is draft.
FINAL
Indicates event is final.
CANCELLED
Indicates event is removed.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setStatus

public void setStatus(java.lang.String status)
               throws IPWorksException
Defines the overall status or confirmation for the calendar event.

In a group-scheduled calendar component, the property is used by the Organizer to provide a confirmation of the event to the Attendees . For example in a vEvent EventType the Organizer can indicate that a meeting is tentative, confirmed, or canceled. For a vTodo EventType , the Organizer can indicate that an action item needs action, is completed, is in process or being worked on, or has been canceled. In a vJournal EventType , the Organizer can indicate that a journal entry is draft, final, or has been canceled or removed.

Statuses for a vEvent EventType :

TENTATIVE
Indicates event is tentative.
CONFIRMED
Indicates event is definite.
CANCELLED
Indicates event was canceled.
Statuses for a vTodo EventType :
NEEDS-ACTION
Indicates to-do needs action.
COMPLETED
Indicates to-do completed.
IN-PROCESS
Indicates to-do in process of.
CANCELLED
Indicates to-do was canceled.
Statuses for a vJournal EventType :
DRAFT
Indicates event is draft.
FINAL
Indicates event is final.
CANCELLED
Indicates event is removed.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getStatusLine

public java.lang.String getStatusLine()
The first line of the last server response.

This property contains the first line of the last server response. This value can be used for diagnostic purposes. If an HTTP error is returned when calling a method of the bean, the error string is the same as the StatusLine property.

The HTTP protocol specifies the structure of the StatusLine as: [HTTP version] [Result Code] [Description].


getSummary

public java.lang.String getSummary()
Defines a short summary or subject for the calendar event.

This property defines a short summary or subject for the calendar event.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setSummary

public void setSummary(java.lang.String summary)
                throws IPWorksException
Defines a short summary or subject for the calendar event.

This property defines a short summary or subject for the calendar event.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getTimeout

public int getTimeout()
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an exception.

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by the AbsoluteTimeout configuration setting.

The default value for the Timeout property is 60 (seconds).


setTimeout

public void setTimeout(int timeout)
                throws IPWorksException
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an exception.

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by the AbsoluteTimeout configuration setting.

The default value for the Timeout property is 60 (seconds).

Throws:
IPWorksException

getTimestamp

public java.lang.String getTimestamp()
Specifies the date and time that the instance of the event was created.

This property specifies the date and time that the instance of the event was created. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

Note: This property must be specified in UTC time format.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setTimestamp

public void setTimestamp(java.lang.String timestamp)
                  throws IPWorksException
Specifies the date and time that the instance of the event was created.

This property specifies the date and time that the instance of the event was created. The date/time format is "YYYYMMDDThhmmss", where "T" indicates the break between date and time. You may also append a 1-character alpha code for the timezone. For instance, "20100104T123456Z" indicates January 4th, 2010 at 12:34:56 PM UTC.

Note: This property must be specified in UTC time format.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getTimezone

public CalTimezone getTimezone()
Specifies a time zone on a calendar collection.

This property is used to specify the time zone the server should rely on to resolve "date" values and "date with local time" values (i.e., floating time) to "date with UTC time" values. The server will require this information to determine if a calendar component scheduled with "date" values or "date with local time" values overlap a time range specified in a GetCalendarReport . In the absence of this property, the server may rely on a time zone of its choosing.

This may be specified when adding or modifying an event with the PutCalendarEvent method, and can also specify the default timezone for the calendar when creating a new calendar collection via the CreateCalendar method.

This property may be filled from the response to a GetCalendarEvent , and can also be used when creating an event to be added using the PutCalendarEvent method. It is also optional when calling the CreateCalendar method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setTimezone

public void setTimezone(CalTimezone timezone)
                 throws IPWorksException
Specifies a time zone on a calendar collection.

This property is used to specify the time zone the server should rely on to resolve "date" values and "date with local time" values (i.e., floating time) to "date with UTC time" values. The server will require this information to determine if a calendar component scheduled with "date" values or "date with local time" values overlap a time range specified in a GetCalendarReport . In the absence of this property, the server may rely on a time zone of its choosing.

This may be specified when adding or modifying an event with the PutCalendarEvent method, and can also specify the default timezone for the calendar when creating a new calendar collection via the CreateCalendar method.

This property may be filled from the response to a GetCalendarEvent , and can also be used when creating an event to be added using the PutCalendarEvent method. It is also optional when calling the CreateCalendar method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getTransparency

public java.lang.String getTransparency()
Defines whether or not an event is transparent to busy time searches.

This property defines whether or not an event is transparent to busy time searches. Time Transparency is the characteristic of an event that determines whether it appears to consume time on a calendar. Events that consume actual time for the individual or resource associated with the calendar SHOULD be recorded as "OPAQUE", allowing them to be detected by free/busy time searches. Other events, which do not take up the individual's (or resource's) time SHOULD be recorded as "TRANSPARENT", making them invisible to free/ busy time searches.

Custom transparency values may or may not be supported by your calendar implementation, but all implementations will support the "OPAQUE" and "TRANSPARENT" values.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setTransparency

public void setTransparency(java.lang.String transparency)
                     throws IPWorksException
Defines whether or not an event is transparent to busy time searches.

This property defines whether or not an event is transparent to busy time searches. Time Transparency is the characteristic of an event that determines whether it appears to consume time on a calendar. Events that consume actual time for the individual or resource associated with the calendar SHOULD be recorded as "OPAQUE", allowing them to be detected by free/busy time searches. Other events, which do not take up the individual's (or resource's) time SHOULD be recorded as "TRANSPARENT", making them invisible to free/ busy time searches.

Custom transparency values may or may not be supported by your calendar implementation, but all implementations will support the "OPAQUE" and "TRANSPARENT" values.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getUID

public java.lang.String getUID()
A persistent, globally unique identifier for the calendar event.

This property contains a persistent, globally unique identifier. The generator of the identifier MUST guarantee that the identifier is unique. There are several algorithms that can be used to accomplish this. A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which the identifier was created on the right-hand side of an "@", and on the left-hand side, put a combination of the current calendar date and time of day (i.e., formatted in as a date/time value) along with some other currently unique (perhaps sequential) identifier available on the system (for example, a process id number). Using a date/time value on the left-hand side and a domain name or domain literal on the right-hand side makes it possible to guarantee uniqueness since no two hosts should be using the same domain name or IP address at the same time. Though other algorithms will work, it is recommended that the right-hand side contain some domain identifier (either of the host itself or otherwise) such that the generator of the message identifier can guarantee the uniqueness of the left-hand side within the scope of that domain.

NOTE: Some CalDAV servers (Yahoo for example) require that the UID and the filename portion of the Resource URI match. For example, if the UID is "hello_world" then the ResourceURI parameter of the PutCalendarEvent should be "https://caldav.calendar.yahoo.com/dav/user_name/Calendar/My_Calendar/ hello_world.ics ". If the UID and filename portion of the URI do not match, the Yahoo CalDAV server will return a "302 Found" response indicating that the requested resource resides under a different URI. (Meaning the event was not added to the calendar)

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


setUID

public void setUID(java.lang.String UID)
            throws IPWorksException
A persistent, globally unique identifier for the calendar event.

This property contains a persistent, globally unique identifier. The generator of the identifier MUST guarantee that the identifier is unique. There are several algorithms that can be used to accomplish this. A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which the identifier was created on the right-hand side of an "@", and on the left-hand side, put a combination of the current calendar date and time of day (i.e., formatted in as a date/time value) along with some other currently unique (perhaps sequential) identifier available on the system (for example, a process id number). Using a date/time value on the left-hand side and a domain name or domain literal on the right-hand side makes it possible to guarantee uniqueness since no two hosts should be using the same domain name or IP address at the same time. Though other algorithms will work, it is recommended that the right-hand side contain some domain identifier (either of the host itself or otherwise) such that the generator of the message identifier can guarantee the uniqueness of the left-hand side within the scope of that domain.

NOTE: Some CalDAV servers (Yahoo for example) require that the UID and the filename portion of the Resource URI match. For example, if the UID is "hello_world" then the ResourceURI parameter of the PutCalendarEvent should be "https://caldav.calendar.yahoo.com/dav/user_name/Calendar/My_Calendar/ hello_world.ics ". If the UID and filename portion of the URI do not match, the Yahoo CalDAV server will return a "302 Found" response indicating that the requested resource resides under a different URI. (Meaning the event was not added to the calendar)

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.

Throws:
IPWorksException

getURL

public java.lang.String getURL()
Location of the event resource on the CalDAV server.

This property is read-only, and will be filled with the location of the event resource for each event returned. This will only be returned in response to a GetCalendarReport transaction.

This property is filled from the response to a GetCalendarEvent , and is also used when creating an event to be added using the PutCalendarEvent method. However, when requesting a report using the GetCalendarReport method, the contents of this property will only be valid inside the EventDetails event.


getUser

public java.lang.String getUser()
A user name if authentication is to be used.

This property contains a user name if authentication is to be used. If AuthScheme is set to HTTP Basic Authentication, The User and Password are Base64 encoded and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

If AuthScheme is set to HTTP Digest Authentication, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

If AuthScheme is set to NTLM, NTLM authentication will be attempted. If AuthScheme is set to NTLM and User and Password are empty, the bean will attempt to authenticate using the current user's credentials.


setUser

public void setUser(java.lang.String user)
             throws IPWorksException
A user name if authentication is to be used.

This property contains a user name if authentication is to be used. If AuthScheme is set to HTTP Basic Authentication, The User and Password are Base64 encoded and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

If AuthScheme is set to HTTP Digest Authentication, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

If AuthScheme is set to NTLM, NTLM authentication will be attempted. If AuthScheme is set to NTLM and User and Password are empty, the bean will attempt to authenticate using the current user's credentials.

Throws:
IPWorksException

addCookie

public void addCookie(java.lang.String cookieName,
                      java.lang.String cookieValue)
               throws IPWorksException
Adds a cookie and the corresponding value to the outgoing request headers.

This property adds a cookie and the corresponding value to the outgoing request headers. Please refer to the Cookies property for more information on cookies and how they are managed.

Throws:
IPWorksException

addCustomProperty

public void addCustomProperty(java.lang.String varName,
                              java.lang.String varValue)
                       throws IPWorksException
Adds a form variable and the corresponding value.

This property adds a form variable and the corresponding value. For information on form variables and how they are managed, please refer to the CustomProperties collection .

Example using the AddCustomProperty method:

 CalDAVControl.Reset()
 CalDAVControl.AddCustomProperty("propname1", "propvalue1")
 CalDAVControl.AddCustomProperty("propname2", "propvalue2") 
Example using the CustomProperties collection:
 CalDAVControl.Reset()
 CalDAVControl.CustomProperties.Add(new CalCustomProp("propname1", "propvalue1"))
 CalDAVControl.CustomProperties.Add(new CalCustomProp("propname2", "propvalue2")) 

Throws:
IPWorksException

config

public java.lang.String config(java.lang.String configurationString)
                        throws IPWorksException
Sets or retrieves a configuration setting.

Config is a generic method available in every bean. It is used to set and retrieve configuration settings for the bean.

Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.

The bean accepts one or more of the following configuration settings . Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

CalDAV Configuration Settings

AuthScheme
The authentication scheme to use for server authorization
This setting is used to support non-standard CalDAV server authentication. The following values are supported:
0
Basic
1
Digest
2
Proprietary
3
None
4
NTLM
Use the AuthScheme setting to tell the bean which type of authorization to perform when the User and Password properties are set. By default, CalDav servers use Basic authentication, and if the User and Password properties are set, the bean will attempt basic authentication. Digest, NTLM, and Negotiate authentication are also available to support custom CalDAV server implementations.Note that if the AuthScheme is set to Proprietary (2) then the authorization token must be supplied through Authorization setting.

For security purposes, changing the value of this property will cause the bean to clear the values of User , Password and Authorization .

DueDate
Specifies the due date for a calendar event
This setting can be used to configure or obtain the due date for the selected calendar event.Note that the format of this field will be the same as EndDate .

ExpandRecurringEvents
Instructs the component to return all instances of a recurring event within a timeframe
When false (default), the CalDAV server will return only a single response for each recurring event along with the recurrence rules. If this configuration option is set to true the CalDAV server will return a response for each instance of a recurring event during a given time interval. The ReportFilter .RecurStart and ReportFilter .RecurEnd fields must also be set to use this functionality. Please see the example code below:
 calDAV.ReportFilter.StartDate = "20120130T000000Z"; 
   calDAV.ReportFilter.EndDate = "20120203T235959Z";
   calDAV.ReportFilter.RecurStart = calDAV.ReportFilter.StartDate;
   calDAV.ReportFilter.RecurEnd = calDAV.ReportFilter.EndDate;
   calDAV.Config("ExpandRecurringEvents=true");
 
   calDAV.ReportFilter.ReturnCalendarData = true;
 
   calDAV.ReportFilter.EventType = VEventTypes.vtAll;
 
   calDAV.GetCalendarReport("http://www.some-url.com/caldav.php/events"); 
ProductId
Specifies the identifier for the product that created the iCalendar object
The vendor of the implementation should assure that this is a globally unique identifier.This setting should not be used to alter the interpretation of a calendar resource. For example, it is not to be used to further the understanding of non-standard properties.

This setting is required to have a value when creating a new calendar collection resource via the CreateCalendar method. For all others it is optional.

WebDAV Configuration Settings

EncodeURL
If set to true the URL will be encoded by the bean
The default value is false. If set to true the URL passed to the bean will be URL encoded.
MaxResources
Instructs bean to save the amount of resources specified that are returned by the server after a ListDirectory call has been made
This config should be set when the Resources collection will be populated after a call to ListDirectory . This value represents the number of resources that are to be saved in the collection .To save all items to the collection , set this config to -1. If no items are wanted, set this to 0, which will not save any to the collection . The default for this config is -1, so all items will be included in the collection .

NOTE: This functionality is only available in Java and .NET.

HTTP Configuration Settings

AcceptEncoding
Used to tell the server which types of content encodings the client supports
When AllowHTTPCompression is true, the bean adds an "Accept-Encoding: " header to the request being sent to the server. By default, this header's value is "gzip, deflate". This config allows you to change the value of the "Accept-Encoding" header. NOTE: The bean only supports gzip and deflate decompression algorithms.
AllowHTTPCompression
This property enables HTTP compression for receiving data
This is the same as the AllowHTTPCompression property. This setting is exposed here for use by beans that inherit from HTTP.
Authorization
The Authorization string to be sent to the server
If the Authorization property contains a non-empty string, an Authorization HTTP request header is added to the request. This header conveys Authorization information to the server.This property is provided so that the HTTP bean can be extended with other security schemes in addition to the authorization schemes already implemented by the bean.

The AuthScheme property defines the authentication scheme used. In the case of HTTP Basic Authentication (default), every time User and Password are set, they are Base64 encoded, and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

BytesTransferred
Contains the number of bytes transferred in the response data
Returns the raw number of bytes from the HTTP response data, prior to the component processing the data, whether it is chunked and/or compressed. This returns the same value as the Transfer event, by BytesTransferred .
EncodeURL
If set to true the URL will be encoded by the bean
The default value is false. If set to true the URL passed to the bean will be URL encoded.
GetOn302Redirect
If set to true the bean will perform a GET on the new location
The default value is false. If set to true the bean will perform a GET on the new location. Otherwise it will use the same HTTP method again.
HTTPVersion
The version of HTTP used by the bean
Possible values include "1.0", and "1.1". The default is "1.1".
IfModifiedSince
A date determining the maximum age of the desired document
This is the same as the IfModifiedSince property. This setting is exposed here for use by beans that inherit from HTTP.
KeepAlive
Determines whether the HTTP connection is closed after completion of the request
If true, the component will not send the 'Connection: Close' header. The absence of the Connection header indicates to the server that HTTP persistent connections should be used if supported. Note that not all server support persistent connections. You may also explicitly add the Keep-Alive header to the request headers by setting OtherHeaders to 'Connection: Keep-Alive'. If false, the connection will be closed immediately after the server response is received.The default value for KeepAlive is false.

MaxHeaders
Instructs bean to save the amount of headers specified that are returned by the server after a Header event has been fired
This config should be set when the TransferredHeaders collection is to be populated when a Header event has been fired. This value represents the number of headers that are to be saved in the collection.To save all items to the collection , set this config to -1. If no items are wanted, set this to 0, which will not save any to the collection . The default for this config is -1, so all items will be included in the collection .

NOTE: This functionality is only available in Java and .NET.

MaxHTTPCookies
Instructs bean to save the amount of cookies specified that are returned by the server when a SetCookie event is fired
This config should be set when populating the Cookies collection as a result of an HTTP request. This value represents the number of cookies that are to be saved in the collection .To save all items to the collection , set this config to -1. If no items are wanted, set this to 0, which will not save any to the collection . The default for this config is -1, so all items will be included in the collection .

NOTE: This functionality is only available in Java and .NET.

MaxRedirectAttempts
Limits the number of redirects that are followed in a request
When FollowRedirects is set to any value besides frNever the bean will follow redirects until this maximum number of redirect attempts are made. The default value is 20. \011
ProxyAuthorization
The authorization string to be sent to the proxy server
Similar to the Authorization config, but for proxy authorization. If this config contains a non-empty string, a Proxy-Authorization HTTP request header is added to the request. This header conveys proxy authorization information to the server. If User and Password are specified, this value is calculated using the algorithm specified by AuthScheme .
ProxyAuthScheme
The authorization scheme to be used for the proxy
This is the same as AuthScheme . This setting is provided for use by beans that do not directly expose Proxy properties.
ProxyPassword
A password if authentication is to be used for the proxy
This is the same as Password . This setting is provided for use by beans that do not directly expose Proxy properties.
ProxyPort
Port for the proxy server (default 80)
This is the same as Port . This setting is provided for use by beans that do not directly expose Proxy properties.
ProxyServer
Name or IP address of a proxy server (optional)
This is the same as Server . This setting is provided for use by beans that do not directly expose Proxy properties.
ProxyUser
A user name if authentication is to be used for the proxy
This is the same as User . This setting is provided for use by beans that do not directly expose Proxy properties.
TransferredDataLimit
The maximum number of incoming bytes to be stored by the bean
The default value is 65,536, allowing the bean to accumulate the first 64K of data into the TransferredData buffer.If TransferredDataLimit is set to 0, no limits are imposed.

UseChunkedEncoding
Enables or Disables HTTP chunked encoding for transfers
If UseChunkedEncoding is set to true, the bean will use HTTP chunked encoding when posting if possible. HTTP chunked encoding allows large files to be sent in chunks instead of all at once. If set to false, the bean will not use HTTP chunked encoding. The default value is false. Note: Some servers (such as the ASP.NET Development Server) may not support chunked encoding.

ChunkSize
Specifies the chunk size in bytes when using chunked encoding
This is only applicable when UseChunkedEncoding is true. This setting specifies the chunk size in bytes to be used when posting data. The default value is 16384.
UsePlatformHTTPClient
Whether or not to use the platform HTTP client
If True, the component will use the default HTTP client for the platform ( URLConnection in Java or WebRequest in .NET) instead of the internal HTTP implementation. This is important for environments where direct access to sockets is limited or not allowed (as in the Google AppEngine for instance).
UserAgent
Information about the user agent (browser)
This is the value supplied in the HTTP User-Agent header. The default setting is "/n software IPWorks HTTP/S Component - www.nsoftware.com".Override the default with the name and version of your software.

KerberosSPN
The Service Principal Name for the Kerberos Domain Controller
If the Service Principal Name on the Kerberos Domain Controller is not the same as the URL that you are authenticating to, the Service Principal Name should be set here.

IPPort Configuration Settings

FirewallAutoDetect
Tells the bean whether or not to automatically detect and use firewall system settings, if available
This is the same as AutoDetect . This setting is provided for use by beans that do not directly expose Firewall properties.
FirewallHost
Name or IP address of firewall (optional)
If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.If the FirewallHost setting is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost setting is set to the corresponding address. If the search is not successful, an error is returned.

NOTE: This is the same as Host . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallListener
If true, the component binds to a SOCKS firewall as a server (IPPort only)
This entry is for IPPort only and does not work for other components that descend from IPPort.If this entry is set, the bean acts as a server. RemoteHost and RemotePort are used to tell the SOCKS firewall in which address and port to listen to. The firewall rules may ignore RemoteHost , and it is recommended that RemoteHost be set to empty string in this case.

RemotePort is the port in which the firewall will listen to. If set to 0, the firewall will select a random port. The binding (address and port) is provided through the ConnectionStatus event.

The connection to the firewall is made by calling the Connect method.

FirewallPassword
Password to be used if authentication is to be used when connecting through the firewall
If FirewallHost is specified, the FirewallUser and FirewallPassword settings are used to connect and authenticate to the given firewall. If the authentication fails, the bean throws an exception.NOTE: This is the same as Password . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallPort
The TCP port for the FirewallHost;
Note that the FirewallPort is set automatically when FirewallType is set to a valid value.NOTE: This is the same as Port . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallType
Determines the type of firewall to connect through
The appropriate values are as follows:
0
No firewall (default setting).
1
Connect through a tunneling proxy. FirewallPort is set to 80.
2
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
3
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.
NOTE: This is the same as FirewallType . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallUser
A user name if authentication is to be used connecting through a firewall
If the FirewallHost is specified, the FirewallUser and FirewallPassword settings are used to connect and authenticate to the Firewall. If the authentication fails, the bean throws an exception.NOTE: This is the same as User . This setting is provided for use by beans that do not directly expose Firewall properties.

KeepAliveTime
The inactivity time in milliseconds before a TCP keep-alive packet is sent
When set, TCPKeepAlive will automatically be set to true. By default the operating system will determine the time a connection is idle before a TCP keep-alive packet is sent. This system default if this value is not specified here is 2 hours. In many cases a shorter interval is more useful. Set this value to the desired interval in milliseconds.Note: This value is not applicable in Java.

KeepAliveInterval
The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received
When set, TCPKeepAlive will automatically be set to true. A TCP keep-alive packet will be sent after a period of inactivity as defined by KeepAliveTime . If no acknowledgement is received from the remote host the keep-alive packet will be re-sent. This setting specifies the interval at which the successive keep-alive packets are sent in milliseconds. This system default if this value is not specified here is 1 second.Note: This value is not applicable in Java or MAC.

Linger
When set to True, connections are terminated gracefully
This property controls how a connection is closed. The default is True.In the case that Linger is True (default), there are two scenarios for determining how long the connection will linger. The first, if LingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP protocol timeout expires.

In the second scenario, LingerTime is a positive value, the system will attempt to send pending data until the specified LingerTime is reached. If this attempt fails, then the system will reset the connection.

The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the bean returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.

LingerTime
Time in seconds to have the connection linger
LingerTime is the time, in seconds, to leave the socket connection linger. This value is 0 by default, which means it will use the default IP protocol timeout.
LocalHost
The name of the local host through which connections are initiated or accepted
The LocalHost setting contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

LocalPort
The TCP port in the local host where the bean binds
This must be set before a connection is attempted. It instructs the bean to bind to a specific port (or communication endpoint) in the local machine.Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by LocalPort after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.

This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.

MaxLineLength
The maximum amount of data to accumulate when no EOL is found
MaxLineLength is the size of an internal buffer, which holds received data while waiting for an EOL string.If an EOL string is found in the input stream before MaxLineLength bytes are received, the DataIn event is fired with the EOL parameter set to True, and the buffer is reset.

If no EOL is found, and MaxLineLength bytes are accumulated in the buffer, the DataIn event is fired with the EOL parameter set to False, and the buffer is reset.

The minimum value for MaxLineLength is 256 bytes. The default value is 2048 bytes. The maximum value is 65536 bytes.

MaxTransferRate
The transfer rate limit in bytes per second
This setting can be used to throttle outbound TCP traffic. Set this to the number of bytes to be sent per second. By default this is not set and there is no limit.
TCPKeepAlive
Determines whether or not the keep alive socket option is enabled
If set to true, the socket's keep-alive option is enabled and keep-alive packets will be sent periodically to maintain the connection. Set KeepAliveTime and KeepAliveInterval to configure the timing of the keep-alive packets.Note: This value is not applicable in Java.

UseIPv6
Whether or not to use IPv6
By default, the component expects an IPv4 address for local and remote host properties, and will create an IPv4 socket. To use IPv6 instead, set this to True.
CloseStreamAfterTransfer
If true, the component will close the upload or download stream after the transfer
This entry is for bean and all the components that descend from it.This property is true by default. Therefore, by default, all streams will be closed after a transfer is completed. In order to keep streams open after the transfer of data, you must set this config to false.

TcpNoDelay
Whether or not to delay when sending packets
When true, the socket will send all data that is ready to send at once. When false, the socket will send smaller buffered packets of data at small intervals. This is known as the Nagle algorithm.By default, this config is set to false.

Socket Configuration Settings

AbsoluteTimeout
Determines whether timeouts are inactivity timeouts or absolute timeouts
If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.
FirewallData
Used to send extra data to the firewall
When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).
InBufferSize
The size in bytes of the incoming queue of the socket
This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be receiving. Increasing the value of the InBufferSize setting can provide significant improvements in performance in some cases.Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the bean is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

OutBufferSize
The size in bytes of the outgoing queue of the socket
This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be sending. Increasing the value of the OutBufferSize setting can provide significant improvements in performance in some cases.Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the bean is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

Base Configuration Settings

GUIAvailable
Tells the bean whether or not a message loop is available for processing events
In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The bean will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GuiAvailable to false will ensure that the bean does not attempt to process external events.

Throws:
IPWorksException

copyCalendarEvent

public void copyCalendarEvent(java.lang.String sourceResourceURI,
                              java.lang.String destinationResourceURI)
                       throws IPWorksException
Copy events to a new location.

The CopyCalendarEvent method will copy the resource indicated by SourceResourceURI to a new location under the resource indicated by DestinationResourceURI .

This method is associated with the Depth property. If Depth is set to "0", the bean will copy only SourceResourceURI . If Depth is set to "infinity", the bean will copy SourceResourceURI and its entire subtree to the relative locations.

If the user has acquired a LockCalendar of infinite depth on either DestinationResourceURI or any collection it is under, SourceResourceURI will be added to that lock.

Note that neither Yahoo nor Google CalDAV servers support locking, copying, or moving calendar resources.

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

createCalendar

public void createCalendar(java.lang.String resourceURI)
                    throws IPWorksException
Creates a new calendar collection resource.

The CreateCalendar method creates a new calendar collection resource . A server MAY restrict calendar collection creation to particular collections. Creating calendar collections is not supported by all CalDAV servers. Some calendar stores only support one calendar per user (or principal), and those are typically pre-created for each account.

The following properties are used to create a new calendar collection resource:

To successfully create a calendar, the ResourceURI cannot already exist, and must point to a valid location where a new calendar can be created. The DAV:bind privilege MUST be granted to the current user on the parent collection of the specified ResourceURI .

The following example shows how to create a simple new calendar collection resource with Yahoo Calendar.

 CalDAVS1.DisplayName = "Testing Create Calendar method";
   CalDAVS1.Description = "Test Calendar";
   CalDAVS1.CreateCalendar("https://caldav.calendar.yahoo.com/dav/userid/Calendar/TestCal1"); 

Note that Google does not support creating a new calendar through CalDAV. It must be created through the Google calendar web interface.

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

deleteCalendarEvent

public void deleteCalendarEvent(java.lang.String resourceURI)
                         throws IPWorksException
Delete a resource or collection.

This method behaves independently of the Depth property. It is used to delete the resource or collection specified by ResourceURI . If ResourceURI denotes a non-collection resource, it is first removed from any collection in which it is contained, it is then removed from the server. If ResourceURI denotes a collection, the server behaves as if the command were issued with an infinite depth (i.e., all internal member URIs denoting single resources or collections are deleted).

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

doEvents

public void doEvents()
              throws IPWorksException
Processes events from the internal message queue.

When DoEvents is called, the bean processes any available events. If no events are available, it waits for a preset period of time, and then returns.

Throws:
IPWorksException

exportICS

public java.lang.String exportICS()
                           throws IPWorksException
Generates an event from the properties in the iCal (.ICS) format.

The ExportICS method is used to create a calendar object and export it in the iCal/ICS format, which can then be saved to disk and imported using any calendar software, even those that do not support CalDAV. The ExportICS method will create the exact same data as the PutCalendarEvent method sends when adding or updating an event to a calendar.

Note that if ExportICS is called immediately after a successful GetCalendarEvent , the unmodified calendar returned from the CalDAV server will be returned. However if any properties are changed between the GetCalendarEvent and ExportICS calls, the bean will generate and return a brand new event.

The following properties are used when creating a request with PutCalendarEvent or ExportICS , and will be filled after calling GetCalendarEvent or ImportICS . These will also be available from inside the EventDetails event, which is fired for each event received from the CalDAV server in response to a GetCalendarReport .

Throws:
IPWorksException

getCalendarEvent

public void getCalendarEvent(java.lang.String resourceURI)
                      throws IPWorksException
Retrieves a single event from the CalDAV server.

This method retrieves a single event from a CalDAV server. The ResourceURI points to the exact location of the iCal (*.ics) file you wish to retrieve. (If you do not know the URL of the event you need, you can use the GetCalendarReport method along with the ReportFilter property to find it.)

The event will be fetched using the WebDAV GET method. The full response is delivered through the Transfer event and the HTTP response headers through the Header event. After an event is retrieved with this method, the bean parses the calendar data into properties. You may then edit these properties and use PutCalendarEvent to update the calendar event resource.

The following properties are used when creating a request with PutCalendarEvent or ExportICS , and will be filled after calling GetCalendarEvent or ImportICS . These will also be available from inside the EventDetails event, which is fired for each event received from the CalDAV server in response to a GetCalendarReport .

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

getCalendarOptions

public void getCalendarOptions(java.lang.String resourceURI)
                        throws IPWorksException
Retrieves options for the ResourceURI to determines whether it supports calendar access.

This method sends an OPTIONS HTTP request to the indicated ResourceURI . The server will respond with an 200 OK HTTP message, and the supported options will fire one-by-one in the Header event. If a server supports CalDAV calendar access, the "DAV" header will contain the string "calendar-access". The allowable CalDAV and WebDAV methods may also be returned in the "Allow" header.

For instance, the following headers may be returned from a call to the GetCalendarOptions method:

Field
Value
Allow
OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
Allow
PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL
DAV\011\011
1, 2, access-control, calendar-access
Date
Sat, 11 Nov 2006 09:32:12 GMT
Content-Length
0
Since the "DAV" header contains "calendar-access", CalDAV is supported on this ResourceURI .

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

getCalendarReport

public void getCalendarReport(java.lang.String resourceURI)
                       throws IPWorksException
Generates a report on the indicated calendar collection resource.

This method is used to send a calendar-query request to the calendar located at the specified ResourceURI . The ReportFilter can be used to filter out and return only the calendar events you wish to receive. The response to a calendar-query report will be parsed by the bean, and information about the individual events contained within shall be fired in the EventDetails event.

The following properties are used when creating a request with PutCalendarEvent or ExportICS , and will be filled after calling GetCalendarEvent or ImportICS . These will also be available from inside the EventDetails event, which is fired for each event received from the CalDAV server in response to a GetCalendarReport .

For example:

 CalDAV.User = "myusername";
   CalDAV.Password = "mypassword";
   CalDAV.ReportFilter.StartDate = "20090101T000000Z";
   CalDAV.ReportFilter.EndDate = "20091231T230000Z";
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/default_calendar/"); 
The following code inside the EventDetails event will print the start and end time as well as the summary for each event:
 void CalDAV_OnEventDetails(object sender, CaldavsEventDetailsEventArgs e) {
 \011  Console.WriteLine(CalDAV.Summary + ": " + CalDAV.StartDate + " to " + CalDAV.EndDate);
     
   } 
The output from the above code will look something like this:
 \011Carolina Hurricanes vs. Colorado Avalanche: 20090222T150000 to 20090222T180000
 \011Lone Rider Brewery Tour: 20091107T124500 to 20091107T134500
 \011Salsa Dancing: 20090927T154500 to 20090927T181500
 \011Superbowl Party: 20090201T170000 to 20090202T000000
 \011Kathy's Birthday: 20090608T010000 to 20090608T020000
 \011Dinner at Shannon's: 20091001T183000 to 20091001T203000
 \011Carolina Rollergirls match: 20090411T170000 to 20090411T180000 

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

getFreeBusyReport

public void getFreeBusyReport(java.lang.String resourceURI)
                       throws IPWorksException
Generates a report as to when the calendar owner is free and/or busy.

This method sends a free-busy-query request to the calendar at the specified ResourceURI . . The CalDAV server will return a list of FREEBUSY elements, which will be fired in the FreeBusy event and also stored in the FreeBusy collection. Each FREEBUSY element contains a type (BUSY, FREE, BUSY-TENTATIVE, etc.) and a date range.

Note that the StartDate field is required for a Free/Busy report. The EndDate field is optional. These are the only two ReportFilter s used by the GetFreeBusyReport request, all other filters will be ignored.

Note that Google Calendar does not currently support Free/Busy reporting.

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

importICS

public void importICS(java.lang.String calendarData)
               throws IPWorksException
Imports iCal data (contained in an ICS file) into the bean's property list.

This method is used to load calendar data from an external source into the bean. You may then submit this data with a call to PutCalendarEvent . If you edit any of the bean properties between importing and calling PutCalendarEvent , the bean will re-generate the PUT request itself. If no properties are changed, the imported data will be submitted unaltered when calling PutCalendarEvent .

Note that the CalendarData you wish to import must contain a single VEVENT, VTODO, or VJOURNAL inside of a VCALENDAR. (A VTIMEZONE may be optionally contained inside the VCALENDAR as well). If multiple calendar objects are included in the imported data they will not be parsed correctly into properties, and the server's response to the PutCalendarEvent method is undefined.

Throws:
IPWorksException

interrupt

public void interrupt()
               throws IPWorksException
Interrupt the current method.

If there is no method in progress, Interrupt simply returns, doing nothing.

Throws:
IPWorksException

lockCalendar

public void lockCalendar(java.lang.String resourceURI)
                  throws IPWorksException
Obtain a lock for a specified calendar resource.

This method will request a new lock to be placed on ResourceURI in the user's name so that only the user can operate on it. The method is linked to a number of properties that it uses to generate the lock request:

Owner
The principle that will own the lock.
Scope
The scope of the lock. The bean only currently supports locks of scope "exclusive" and "shared".
Timeout
The amount of time that the lock is allowed to exist before ResourceURI is automatically unlocked by the server.
Tokens
The lock itself. If the user sets this before making the request, the timeout on the existing lock will be refreshed (reset to 0). Otherwise, a new set of lock tokens will be returned.
LockType
The type of lock. The bean only currently supports of type "write".
After a successful call to the LockCalendar method the bean will receive the new lock values, which it will parse and store in the lock properties.

This method is associated with the Depth property. If Depth is set to "0", the bean will lock only ResourceURI and its properties. If Depth is set to "infinity", the bean will lock ResourceURI and its entire subtree.

If MoveCalendarEvent or CopyCalendarEvent are used to place a resource or collection in a location under a resource locked with "infinity", the new resource or collection will be added to the lock. Any lock on a collection will prevent non-lock owners from adding resources to that collection.

Note that while the Yahoo CalDAV server does accept LockCalendar and UnLockCalendar requests, the server does not respect resource locks (either on events or on the entire calendar). The Google CalDAV sever does not support either of these requests, and will respond with an HTTP protocol error: 405 Method Not Allowed. Also, neither Yahoo nor Google CalDAV servers support copying or moving calendar resources.

Throws:
IPWorksException

moveCalendarEvent

public void moveCalendarEvent(java.lang.String sourceResourceURI,
                              java.lang.String destinationResourceURI)
                       throws IPWorksException
Moves one calendar resource to a new location.

This method will move the resource indicated by SourceResourceURI to a new location under the resource indicated by DestinationResourceURI .

This method is associated with the Depth property. If Depth is set to "0", the bean will move only SourceResourceURI . If Depth is set to "infinity", the bean will move SourceResourceURI and its entire subtree to locations relative to it.

If the user has acquired a lock of infinite depth (via LockCalendar ) on either DestinationResourceURI or any collection it is under, SourceResourceURI will be added to that lock.

Note that neither Yahoo nor Google CalDAV servers support locking, copying, or moving calendar resources.

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

putCalendarEvent

public void putCalendarEvent(java.lang.String resourceURI)
                      throws IPWorksException
Adds a calendar resource at the specified ResourceURI using the CalDAV PUT method.

This method adds a new event to the calendar collection at the specified ResourceURI . The ResourceURI must be a fully qualified URL to the location on the CalDAV server to which this event will be saved. If the ResourceURI already exists, the event at that URI will be overwritten.

NOTE: Some CalDAV servers (Yahoo for example) require that the UID and the filename portion of the URI match. For example, if the UID is "hello_world" then the ResourceURI parameter of the PutCalendarEvent should be "https://caldav.calendar.yahoo.com/dav/user_name/Calendar/My_Calendar/hello_world.ics". If the UID and filename portion of the URI do not match, the Yahoo CalDAV server will return a "302 Found" response indicating that the requested resource resides under a different URI. (Meaning the event was not added to the calendar)

The following properties are used when creating a request with PutCalendarEvent or ExportICS , and will be filled after calling GetCalendarEvent or ImportICS . These will also be available from inside the EventDetails event, which is fired for each event received from the CalDAV server in response to a GetCalendarReport .

There is no standard format for resource URIs. Google for instance, uses "https://www.google.com/calendar/dav/" plus your email address to access the default calendar. So "https://www.google.com/calendar/dav/username@gmail.com/" is the base URI for the default calendar. If you have multiple calendars, replace the email address portion above with the Id of the calendar, plus "@group.calendar.google.com/". For instance: "https://www.google.com/calendar/dav/ev3nkr4ua83jej7q32oumn5eeo@group.calendar.google.com/". For Google, calendar events are stored in the "/events/" path. To retrieve a report on a calendar, you'd add "/events/" to one of the above paths. For example:

 CalDAV.GetCalendarReport("https://www.google.com/calendar/dav/username@gmail.com/events/"); 
Leaving the "/events/" out of the URI will result in an HTTP protocol error: 405 Method not allowed.

To add or retrieve an event, add the UID of the event you're creating or retrieving plus ".ics" to the path. Note that when putting an event with the PutCalendarEvent method, if the resourceURI and the UID do not match Google will create the event using the UID stored in the UID property. The actual location of will be newly added event will be returned in a "Location" header. This is the resource URI you must use to retrieve the event with GetCalendarEvent . For example:

 CalDAV.UID = "1234567890";
   CalDAV.PutCalendarEvent("https://www.google.com/calendar/dav/username@gmail.com/events/1234567890.ics"); 

Yahoo uses a different format for CalDAV access. Yahoo's ResourceURIs always start with "https://caldav.calendar.yahoo.com/dav/" plus your user name, plus "/Calendar/" plus the name of your calendar. For instance: "https://caldav.calendar.yahoo.com/dav/username/Calendar/Your_Name" for the default calendar. (Yahoo uses your name to create the default calendar). When using the CreateCalendar event to create a new calendar, replace "Your_Name" in the URI with the desired name of your new calendar. Event resources are located directly under the "/Calendar/Calendar_Name/" path. Like Google, the UID and filename portion of the resource URI must match, but Yahoo will actually return an HTTP protocol error if they differ. The examples below show a few possible transactions:

 CalDAVS1.User = "username";
   CalDAVS1.Password = "password";
   
   CalDAV.DisplayName = "My Hockey Calendar";
   CalDAV.CreateCalendar("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/");
   
   CalDAV.StartDate = "20100401T040000";
   CalDAV.EndDate = "20100401T060000";
   CalDAV.UID = "qwerty1234567";
   CalDAV.Summary = "First Practice";
   CalDAV.Location = "Rink on 1st and main";
   CalDAV.EventType = vEvent;
   CalDAV.PutCalendarEvent("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/qwerty1234567.ics");
   
   CalDAV.GetCalendarReport("https://caldav.calendar.yahoo.com/dav/username/Calendar/Hockey_Calendar/"); 

Throws:
IPWorksException

reset

public void reset()
           throws IPWorksException
Reset the bean.

This method will reset the bean properties to their default values when called.

Throws:
IPWorksException

unLockCalendar

public void unLockCalendar(java.lang.String resourceURI)
                    throws IPWorksException
Unlocks a calendar resource.

This method unlocks a calendar resource. Before calling UnLockCalendar on a particular calendar resource, the Tokens property must be set to the lock tokens for ResourceURI . The method will remove the lock, allowing other users or non-privileged users to access and operate on the file.

Throws:
IPWorksException

addCaldavEventListener

public void addCaldavEventListener(CaldavEventListener l)
                            throws java.util.TooManyListenersException
Throws:
java.util.TooManyListenersException

removeCaldavEventListener

public void removeCaldavEventListener(CaldavEventListener l)

IP*Works! V9

Copyright (c) 2013 /n software inc. - All rights reserved.