CDO For Exchange 2000 - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

CDO For Exchange 2000

Description:

Expedia. Add itinerary to personal calendar. Flights, hotel, and rental car information ... Defines interoperable calendaring and scheduling services for the Internet ... – PowerPoint PPT presentation

Number of Views:223
Avg rating:3.0/5.0
Slides: 41
Provided by: naveenk1
Category:
Tags: cdo | exchange | expedia

less

Transcript and Presenter's Notes

Title: CDO For Exchange 2000


1
CDO For Exchange 2000 Calendaring Naveen
KachrooProgram ManagerExchange Server Product
UnitMicrosoft Corporation
2
(No Transcript)
3
Agenda
  • Scenarios and Applications
  • Internet Standards Overview
  • Object Model Description
  • Protocol and Process Flow
  • Feature Support
  • Question and Answer

4
Scenarios And Applications
  • Organization Needs
  • Interview schedules
  • Company Holidays
  • Expedia
  • Add itinerary to personal calendar
  • Flights, hotel, and rental car information
  • Internet Calendaring applications, i.e., Jump,
    Yahoo
  • Project Teams maintaining group schedules
  • Movie Theatre publishing its schedule

5
Calendaring Features
  • Personal and Group scheduling
  • Integrate server events and workflow
  • Calendaring infrastructure
  • Alarms and Reminders
  • TimeZones
  • Sophisticated recurrence pattern engine
  • Server side agents

6
iCalendar (RFC)
  • Defines interoperable calendaring and scheduling
    services for the Internet
  • MIME media type text/calendar
  • Calendaring information encoded as text
    characters
  • Features
  • Appointments, Alarms, Time Zones, Free/busy

7
Object Model
Appointment
CalendarMessage
CalendarParts
Exceptions
RecurrencePatterns
Attendees
Attachments
Fields
8
Calendar Schema
  • Set of fields that are required for building
    calendaring clients
  • Standardized on ICalendar specification
  • Clean mapping between ICalendar and MAPI
    properties
  • Property mapping transparent to end-user
  • Extensible schema

9
Appointment Object
  • Methods and properties for creating/opening
    appointment items
  • Protocol interaction with other calendar clients
  • IDataSource and Fields Collection
  • Supports attachments, recurring appointments

10
Appointment Object
IAppointment
Methods
Accept
AcceptTentative
Cancel
CreateRequest
Decline
  • Appointment entry in your calendar
  • Contains methods and properties for creating
    complex appointment items

GetFirstInstance
GetInterface
GetNextInstance
GetRecurringMaster
Invite
Publish
P
roperties
AllDayEvent
BusyStatus
Companies
Contact
Duration
EndTime
DateStamp
Duration
Keywords
Location
MeetingStatus
Priority
ReplyTime
Resources
ResponseRequested
Sensitivity
Sequence
StartTime
Subject
TextBody
Transparent
Collections
Attachments
Attendees
Exceptions
Fields
RecurrencePatterns
11
CalendarMessage Object
ICalendarRequest
  • Supports IMessage interface
  • Uses Send function for sending out meeting
    requests
  • MIME stream serialization
  • Supports CalendarParts Collection for multiple
    calendaring items
  • Full interop with MAPI clients

Methods
GetInterface
P
roperties
Configuration
DataSource
Message
Collections
CalendarParts
ICalendarPart
Methods
GetInterface
GetAssociatedItem
GetUpdatedItem
P
roperties
CalendarMethod
CalendarVersion
ComponentType
ProdID
12
DEMOInterview Scheduler
13
Meeting RequestExposing the MIME hierarchy
CalMsg.BodyPart
RFC 822 MessageContent-Type multipart/mixed
CalMsg.BodyPart.Bodyparts(1)
Content-Type multipart/alternative
Content-Type text/calendar
CalMsg.BodyPart.Bodyparts(1).Bodyparts(1)
Content-Type text/plain
CalMsg.BodyPart.Bodyparts(1).Bodyparts(2)
Content-Type application/msword
CalMsg.BodyPart.Bodyparts(2)
14
MeetingRequest/Response Protocol
Attendee
Organizer
Calendar Folder
Calendar Folder
Memory
Inbox
Inbox
Memory
CreateRequest
GetUpdatedItem
Send
Save
Meeting Request
Meeting Request
Appointment
Appointment
Appointment
Open
Accept Decline Tentative
Network
GetUpdatedItem
Send
Meeting Response
Meeting Response
Appointment
Invite
Send
Meeting Request
15
Inbound Processing Architecture
Inbox
Message (incoming)
BP(n)
BodyPart
Appointment stored in a File
OpenObject (Msg)
OpenObject (BP)
GetStream.LoadFromFile (File)
Meeting Request/Response
CalendarMessage Object
Appointment in the Exchange Store
CalendarParts Collection
Open (URL)
GetUpdatedItem(CalendarPart)
Appointment Object
16
Outbound Processing Architecture
Appointment Object
CreateRequest
Meeting Request
CalendarMessage Object
Additional Appointment
Add
CalendarParts Collection
Send
Internet
17
Code Example 1Simple meeting request
Public Sub SimpleMeetingRequest() Dim objAppt
As New Appointment Dim objReq As New
CalendarMessage objAppt.Subject "MEC
99" objAppt.StartTime "10/4/99
100PM" objAppt.EndTime "10/4/99
200PM" objAppt.Attendees.Add ("user_at_domain")
Set objReq objAppt.CreateRequest objReq.Mess
age.Send End Sub
18
Code Example 2Process inbound meeting request
Public sub AcceptMeeting () Dim objAppt As New
CDO.Appointment Dim objResp As New
CDO.CalendarMessage Dim objAccept As New
CDO.CalendarMessage objResp.DataSource.Open
(Store URL) Set objAppt objResp.CalendarParts(
1).GetUpdatedItem() Set objAccept
objAppt.Accept objAccept.Message.Send End Sub
19
Recurring Appointments
  • Sophisticated Recurrence Pattern engine
  • Recurring appointments and modifications via an
    exceptions engine
  • Client-side expansion via GetFirstInstance,
    GetNextInstance
  • Server-side expansion of recurring appointments
  • Full interop with Outlook 9x/2000

20
Code Example 3Recurring meeting request
Public Sub RecurringMeetingRequest() Dim objAppt
As New Appointment Dim objReq As New
CalendarMessage Dim recpat As IRecurrencePattern
objAppt.Subject "MEC 99" objAppt.StartTime
"10/4/99 100PM" objAppt.EndTime "10/4/99
200PM" objAppt.Attendees.Add ("user_at_domain")
Set recpat objAppt.RecurrencePatterns.Add("ADD"
) recpat.Frequency cdoWeekly recpat.Instances
10 Set objReq objAppt.CreateRequest objReq.Mess
age.Send End Sub
21
Code Example 4Meeting exception
Public Sub RecurringMeetingRequest() Same as
Example 4 . . Set myException
objAppt.Exceptions.Add(Modify) With
myException .RecurrenceID 10/11/99
100PM .Starttime 10/11/99 400PM .Endtime
10/11/99 500PM End With . . End Sub
22
Alarms
  • ReminderOffset property
  • Available on Appointment object
  • Sets offset for Alarm to fire
  • Compatible with ICalendar VALARMS and Outlook
    reminders
  • Alarms display and processing left to the user

23
Code Example 5Setting an alarm offset
Public Sub SimpleAppointment() Dim objAppt As
New CDO.Appointment objAppt.Subject
Understanding Calendaring objAppt.Starttime
10/4/99 200PM objAppt.Endtime 10/4/99
300PM objAppt.Attendees.Add ("user_at_domain") o
bjAppt.Fields(ReminderOffset)
30 objAppt.CreateRequest.Message.Send End Sub
24
Time Zones
  • Full Time Zone support including
    standard/daylight transitions
  • All date times normalized to UTC in store
  • Organizers Time Zone information stored with the
    appointment
  • Recurrence expansion generates correct set of
    date values across transition boundaries
  • View appointment information in any Time Zone
    using CDO configuration object
  • Request meetings in different Time Zones

25
Code Example 6Viewing appointment information
in a different time zone
Public Sub DisplayAppointment(ApptURL as
String) Dim objAppt As New CDO.Appointment Dim
myConfig As New CDO.Configuration myConfig.Field
s(TimeZoneID) session(OWATimeZone) objApp
t.Configuration myConfig objAppt.Open(ApptURL)
Display Appointment End Sub
26
Attendees
  • Simple Usage
  • Add attendees to collection
  • Attendees promoted as Meeting Recipients
  • Addressee object
  • Get Free Busy
  • Ambiguous Name Resolution
  • Addressee Fields properties set ATTENDEE specific
    information

27
FreeBusy
  • GetFreeBusy method on Addressee object
  • Bounded by time window
  • It takes a starttime, an endtime and an interval
    (time slots in minutes)
  • Returns a string which you can parse (same as CDO
    1.2)
  • 0 - Free
  • 1 - Tentative
  • 2 - Busy
  • 3 - Out of Office

28
Code Example 7Addressee/FreeBusy
Public Sub SimpleAppointment() Dim objAppt As
New CDO.Appointment Dim Addr as New
CDO.Addressee Dim Str as String objAppt.Subject
"Understanding Calendaring" objAppt.StartTime
"10/4/99 200PM" objAppt.EndTime "10/4/99
300PM" Addr.DisplayName Some User
Name" Addr.Checkname ("LDAP//servername") Str
Addr.GetFreeBusy(1/1/99, 6/1/99,
15) debug.print Str Str 000011100001122220000
objAppt.Attendees.Add (Addr.EmailAddress) objAp
pt.CreateRequest.Message.Send End Sub
29
Methods
  • CreateRequest
  • Invite(in STRING EmailList)
  • Cancel(in STRING EmailList)
  • Accept, Decline, Tentative
  • Publish
  • GetFirstInstance, GetNextInstance

30
Code Example 8Invite additional attendees
Public Sub SimpleInvite() Dim objAppt As New
CDO.Appointment Dim CalMessage As New
CDO.CalendarMessage objAppt.Datasource.Open(Exist
ing Appt URL) . Set CalMessage
objAppt.Invite(MEC Attendees) . CalMessage.Sen
d End Sub
31
Code Example 9GetFirstInstance/GetNextInstance
Public Sub EnumerateAppts() Dim ObjAppt As New
CDO.Appointment Dim TempAppt As New
CDO.Appointment Dim ObjRecurrence As
CDO.IRecurrencePattern ObjAppt.StartTime
1/1/99 1.00PM" ObjAppt.EndTime "1/1/99
2.00PM" Set ObjRecurrence ObjAppt.RecurrencePatt
erns.Add("ADD") ObjRecurrence.Frequency
cdoDaily ObjRecurrence.Instances 30 Set
TempAppt ObjAppt.GetFirstInstance("1/1/99","1/31
/99") For i 1 To 7 Debug.Print
TempAppt.StartTime Debug.Print
TempAppt.EndTime Set TempAppt
ObjAppt.GetNextInstance Next End Sub
32
DEMOAUTO-ACCEPT CALENDAR AGENT
33
Server-Side Agents
  • Offload Outlook client-side processing
  • Independent of Outlook running
  • Examples
  • Recurring meeting expansion
  • Free-busy publishing

34
Benefits
  • Performance benefits on Outlook client startup
  • CDO/DAV and Outlook Web Access users
  • Third party tools support
  • New clients can leverage this for free
  • Users calendar accurately represented in
    free/busy view

35
Recurrence Engine
  • Server-side expansion of recurring appointments
  • Expansion triggered by store queries
  • Need to pass in start time and end time values in
    the query
  • Recurring appointments are expanded for months
    corresponding to the dates
  • Dates must be
  • 1. converted to UTC time
  • 2. formatted to ISO
  • 3. cast to DATETIME type

36
Code Example 10Store expansion
Public Sub QueryStore() Dim Con As New
ADODB.Connection Dim RS As New ADODB.Recordset Dim
Query As String Dim URL As String URL
"file//./backofficestorage/domain.extest.microsof
t.com/MBX/user/calendar Con.Provider
"exoledb.datasource" Con.ConnectionString
URL Con.Open Query "Select from
scope('shallow traversal of """ URL """')
WHERE (""urnschemascalendardtstart""
CAST(""1999-01-01T000000Z"" as 'dateTime'))
AND (""urnschemascalendardtend"" CAST(""1999-12-31T000000Z"" as
'dateTime'))" Call RS.Open(Query, Con) Do While
Not RS.EOF Debug.Print RS.Fields("DAVhref") RS.
MoveNext Loop End Sub
37
Free-Busy Publishing
  • Server side agent for free/busy publishing
  • FB publishing triggered by save/changes against
    the calendar folder
  • Future support for FreeBusy via Internet Standards

38
Additional Resources
  • Internet Calendaring Drafts
  • http//www.ietf.org/ids.by.wg/calsch.html
  • http//www.microsoft.com/exchange
  • http//msdn.microsoft.com/developer/

39
Questions?
40
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com