www.novell.com beginning programming with the novell groupwise ® object api john cox dse worldwide...

49
www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. [email protected]

Upload: priscilla-poole

Post on 04-Jan-2016

233 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

www.novell.com

Beginning Programming with the Novell GroupWise® Object API

Beginning Programming with the Novell GroupWise® Object API

John CoxDSE Worldwide Developer SupportNovell, [email protected]

Page 2: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Vision…one NetA world where networks of all types—corporate and public, intranets, extranets, and the Internet—work together as one Net and securely connect employees, customers, suppliers, and partners across organizational boundaries

MissionTo solve complex business and technical challenges with Net business solutions that enable people, processes, and systems to work together and our customers to profit from the opportunities of a networked world

Page 3: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com
Page 4: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Agenda

• Overview• API Design• Using the Object API• Developer Resources

agenda

Page 5: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Novell GroupWise® Object API

• Access to GroupWise information store

• Address book and document management Mail messages Appointments Tasks Notes Phone messages

Page 6: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

COM Automation

• Accessible through any language that supports Component Object Model (COM)

Visual Basic Delphi C++

COM

Page 7: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Agenda

• Overview• API Design• Using the Object API• Developer Resources

agenda

Page 8: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

FieldFieldDefinitionDefinition

AddressAddressBookBook AccountAccount

AddressAddressBookBookEntryEntry

FieldField

AddressAddress

AddressAddress

BusyBusySearchSearch

ElementElement

TimeBlockTimeBlock

ApplicationApplication

AccountAccountRightsRights

AddressAddressFilterFilter

AddressAddress

RecipientRecipient

FolderFolder

MessageMessage

AppointmentAppointment

DocRefDocRef

MailMail

TaskTask

NoteNote

PhonePhoneMessageMessage

SharedSharedNotificationNotification

FieldField

AttachmentAttachment

QueryQuery

LookupLookupTablesTables DocumentDocument

DocumentDocumentLibraryLibrary

DocumentDocumentTypeType

AddressAddress

DocumentDocumentversionversion

DocumentDocumentVersionVersionViewerViewer

FieldDefFieldDef

Page 9: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Agenda

• Overview• API Design• Using the Object API• Developer Resources

agenda

Page 10: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Demo (Login)

Page 11: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

GroupWise Login

hands o

Page 12: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Objective

• Build an application that allows a user to enter a user id and password and confirms that the user has logged into GroupWise

Page 13: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

FieldFieldDefinitionDefinition

AddressAddressBookBook AccountAccount

AddressAddressBookBookEntryEntry

FieldField

AddressAddress

AddressAddress

BusyBusySearchSearch

ElementElement

TimeBlockTimeBlock

ApplicationApplication

AccountAccountRightsRights

AddressAddressFilterFilter

AddressAddress

RecipientRecipient

FolderFolder

MessageMessage

AppointmentAppointment

DocRefDocRef

MailMail

TaskTask

NoteNote

PhonePhoneMessageMessage

SharedSharedNotificationNotification

FieldField

AttachmentAttachment

QueryQuery

LookupLookupTablesTables

DocumentDocument

DocumentDocumentLibraryLibrary

DocumentDocumentTypeType

AddressAddress

DocumentDocumentVersionVersion

DocumentDocumentVersionVersionViewerViewer

FieldDefFieldDef

Step 1: Application 1. Application1. Application

Page 14: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

FieldFieldDefinitionDefinition

AddressAddressBookBook AccountAccount

AddressAddressBookBookEntryEntry

FieldField

AddressAddress

AddressAddress

BusyBusySearchSearch

ElementElement

TimeBlockTimeBlock

ApplicationApplication

AccountAccountRightsRights

AddressAddressFilterFilter

AddressAddress

RecipientRecipient

FolderFolder

MessageMessage

AppointmentAppointment

DocRefDocRef

MailMail

TaskTask

NoteNote

PhonePhoneMessageMessage

SharedSharedNotificationNotification

FieldField

AttachmentAttachment

QueryQuery

LookupLookupTablesTables

DocumentDocument

DocumentDocumentLibraryLibrary

DocumentDocumentTypeType

AddressAddress

DocumentDocumentVersionVersion

DocumentDocumentVersionVersionViewerViewer

FieldDefFieldDef

Step 2: Account1. Application1. Application

2. Account2. Account

Page 15: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Early Binding vs Late Binding

• Early binding ( GroupWare Type Library / GWCMA1.DLL)

Dim gwApplication As Application Set gwApplication = New Application2

• Late binding Dim gwApplication As Object Set gwApplication = CreateObject("NovellGroupWareSession")

Page 16: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Advantages of Early Binding

• Development

• Better Debugging

• Faster Run-time

Page 17: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Account Login

• Account login ( [String UserID],

[String CommandLine],[String Password],

[LoginConstants WhenToPrompt], [Variant Reserved] )

• Account MultiLogin(...) * GroupWise 5.5 and above

• Account Proxy( Variant UserID )

Page 18: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Visual Basic (Early binding)

• Login()

Dim gwApplication As Application Dim gwAccount As Account

Set gwApplication = New Application Set gwAccount = gwApplication.Login(“UserID”,, “Pswd”)

Page 19: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com
Page 20: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Account Related Objects

• Account• Accounts• AccountRights• AccountRightsCollection• Filter• Filters• TrashEntry• TrashEntries• Trash

• AllFolders• AllMessages

Page 21: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Demo (Folders)

Page 22: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Folders

hands o

Page 23: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Objective

• Build an application that displays a list of folders in your account

• Display individual information of a folder that is selected

• Allow users to add a new folder

Page 24: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

FieldFieldDefinitionDefinition

AddressAddressBookBook AccountAccount

AddressAddressBookBookEntryEntry

FieldField

AddressAddress

AddressAddress

BusyBusySearchSearch

ElementElement

TimeBlockTimeBlock

ApplicationApplication

AccountAccountRightsRights

AddressAddressFilterFilter

AddressAddress

RecipientRecipient

FolderFolder

MessageMessage

AppointmentAppointment

DocRefDocRef

MailMail

TaskTask

NoteNote

PhonePhoneMessageMessage

SharedSharedNotificationNotification

FieldField

AttachmentAttachment

QueryQuery

LookupLookupTablesTables

DocumentDocument

DocumentDocumentLibraryLibrary

DocumentDocumentTypeType

AddressAddress

DocumentDocumentVersionVersion

DocumentDocumentVersionVersionViewerViewer

FieldDefFieldDef

Step 1: Application 1. Application1. Application

Page 25: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

FieldFieldDefinitionDefinition

AddressAddressBookBook AccountAccount

AddressAddressBookBookEntryEntry

FieldField

AddressAddress

AddressAddress

BusyBusySearchSearch

ElementElement

TimeBlockTimeBlock

ApplicationApplication

AccountAccountRightsRights

AddressAddressFilterFilter

AddressAddress

RecipientRecipient

FolderFolder

MessageMessage

AppointmentAppointment

DocRefDocRef

MailMail

TaskTask

NoteNote

PhonePhoneMessageMessage

SharedSharedNotificationNotification

FieldField

AttachmentAttachment

QueryQuery

LookupLookupTablesTables

DocumentDocument

DocumentDocumentLibraryLibrary

DocumentDocumentTypeType

AddressAddress

DocumentDocumentVersionVersion

DocumentDocumentVersionVersionViewerViewer

FieldDefFieldDef

Step 2: Account1. Application1. Application

2. Account2. Account

Page 26: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

FieldFieldDefinitionDefinition

AddressAddressBookBook AccountAccount

AddressAddressBookBookEntryEntry

FieldField

AddressAddress

AddressAddress

BusyBusySearchSearch

ElementElement

TimeBlockTimeBlock

ApplicationApplication

AccountAccountRightsRights

AddressAddressFilterFilter

AddressAddress

RecipientRecipient

FolderFolder

MessageMessage

AppointmentAppointment

DocRefDocRef

MailMail

TaskTask

NoteNote

PhonePhoneMessageMessage

SharedSharedNotificationNotification

FieldField

AttachmentAttachment

QueryQuery

LookupLookupTablesTables

DocumentDocument

DocumentDocumentLibraryLibrary

DocumentDocumentTypeType

AddressAddress

DocumentDocumentVersionVersion

DocumentDocumentVersionVersionViewerViewer

FieldDefFieldDef

Step 3: Folder1. Application1. Application

2. Account2. Account

3. Folder3. Folder

Page 27: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Folder-Related Objects

• Folder

• Folders

Page 28: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com
Page 29: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Psuedo Code (Folders)

Begin sub routine to list Folders

Get reference to the main Folders Collection from the Acc obj

Loop from i = 1 to Folders Count

Set Folder equal to the first item in the Folders Collection

Add Folder Name to the listbox collection

End Loop

End sub routine

Begin sub routine to display Folder information

Loop to find Folder that was selected in the main Folders collection

Display information

End sub routine

Begin sub routine to add Folder

Get reference to the main Folders Collection from the Acc obj

Use the Folders collection add method to create a new Folder

End sub routine

Page 30: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Folder-Related Objects

• Folder• Folders• FolderRights• FolderRightsCollection

Page 31: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Demo (Address Books)

Page 32: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Address Books

hands o

Page 33: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Objective

• Build an application that displays a list of address books in your account

• Display the list of entries in a selected book• Display individual information about a

selected entry• Allow users to add new entries

Page 34: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Address-Related Objects

• Address• Addresses• AddressBookEntry• AddressBookEntries • AddressBook• AddressBooks

Page 35: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

FieldFieldDefinitionDefinition

AddressAddressBookBook AccountAccount

AddressAddressBookBookEntryEntry

FieldField

AddressAddress

AddressAddress

BusyBusySearchSearch

ElementElement

TimeBlockTimeBlock

ApplicationApplication

AccountAccountRightsRights

AddressAddressFilterFilter

AddressAddress

RecipientRecipient

FolderFolder

MessageMessage

AppointmentAppointment

DocRefDocRef

MailMail

TaskTask

NoteNote

PhonePhoneMessageMessage

SharedSharedNotificationNotification

FieldField

AttachmentAttachment

QueryQuery

LookupLookupTablesTables

DocumentDocument

DocumentDocumentLibraryLibrary

DocumentDocumentTypeType

AddressAddress

DocumentDocumentVersionVersion

DocumentDocumentVersionVersionViewerViewer

FieldDefFieldDef

Address Book Entry 1. Application1. Application

2. Account2. Account

3. Address 3. Address BookBook

4. Address Book 4. Address Book EntryEntry

Page 36: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com
Page 37: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Psuedo Code (Address Book)Begin sub routine to list Address Books

Get reference to the main AddressBooks Collection from the Acc obj

Loop from 1 to AddressBooks Count

Set AddressBook equal to the first item in the AB Collection

Add AddressBook Name to the listbox collection

End Loop

End sub routine

Begin sub routine to display Address Book Entries

Loop to find Address Book that matches the selected list item

Loop through entries in Address Book and display names in a list

End sub routine

Begin sub routine to display AddressBookEntry information

Loop to find AddressBookEntry that matches the selected list item

Once match is found, access and display properties

End sub routine

Begin sub routine to add new AB entry

Use the AB entries collection to add a new entry (non system book only)

End sub routine

Page 38: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Address-Related Objects

• GroupMember• GroupMembers• AddressBookRights• AddressBookRightsCollectio

n

Page 39: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Demo (Send Mail)

Page 40: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Send Mail

hands o

Page 41: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Objective

• Build an application that creates and sends a mail message

Set the subject and body text Populate recipients as TO, CC, BC Set message priority Add attachments

Page 42: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Message-Related Objects

• Message• Messages• MessageList• AllMessages• Mail• Recipient• Recipients• Attachment• Attachments

Page 43: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

FieldFieldDefinitionDefinition

AddressAddressBookBook AccountAccount

AddressAddressBookBookEntryEntry

FieldField

AddressAddress

AddressAddress

BusyBusySearchSearch

ElementElement

TimeBlockTimeBlock

ApplicationApplication

AccountAccountRightsRights

AddressAddressFilterFilter

AddressAddress

RecipientRecipient

FolderFolder

MessageMessage

AppointmentAppointment

DocRefDocRef

MailMail

TaskTask

NoteNote

PhonePhoneMessageMessage

SharedSharedNotificationNotification

FieldField

AttachmentAttachment

QueryQuery

LookupLookupTablesTables

DocumentDocument

DocumentDocumentLibraryLibrary

DocumentDocumentTypeType

AddressAddress

DocumentDocumentVersionVersion

DocumentDocumentVersionVersionViewerViewer

FieldDefFieldDef

Send Mail1. Application1. Application

2. Account2. Account

3. Folder3. Folder

4. Message4. Message

5. Mail5. Mail

Page 44: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com
Page 45: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Psuedo Code (Send Mail)

Begin sub routine to create and send Mail message

Create a new message object with Add on a Messages collection

Use message properties to set the subject, bodytext and priority

Loop through each recipient box and add TO, CC, BC objects

Loop through the attachments list box and add attachments

Send Message

End sub routine

Page 46: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Message-Related Objects

• AllMessages• AllMessagesIterator• FormattedText• Appointment• DocumentReference• Note• PhoneMessage• SharedNotification• Task

Page 47: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Agenda

•Overview•API Design•Using the Object API•Developer Resources

agenda

Page 48: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

Developer Resources

•Training http://developer.novell.com/support/training/

•Documentation and Sample Code http://developer.novell.com/ndk/gwobjapi http://developer.novell.com/support/sample.htm

•Support 1-800-733-9673 / 1-801-861-5281 [email protected] http://developer-forums.novell.com/category/

index.tpt

Page 49: Www.novell.com Beginning Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com