www.novell.com beginning programming with the novell groupwise ® object api john cox dse worldwide...
TRANSCRIPT
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]
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
Agenda
• Overview• API Design• Using the Object API• Developer Resources
agenda
Novell GroupWise® Object API
• Access to GroupWise information store
• Address book and document management Mail messages Appointments Tasks Notes Phone messages
COM Automation
• Accessible through any language that supports Component Object Model (COM)
Visual Basic Delphi C++
COM
Agenda
• Overview• API Design• Using the Object API• Developer Resources
agenda
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
Agenda
• Overview• API Design• Using the Object API• Developer Resources
agenda
Demo (Login)
GroupWise Login
hands o
Objective
• Build an application that allows a user to enter a user id and password and confirms that the user has logged into GroupWise
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
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
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")
Advantages of Early Binding
• Development
• Better Debugging
• Faster Run-time
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 )
Visual Basic (Early binding)
• Login()
Dim gwApplication As Application Dim gwAccount As Account
Set gwApplication = New Application Set gwAccount = gwApplication.Login(“UserID”,, “Pswd”)
Account Related Objects
• Account• Accounts• AccountRights• AccountRightsCollection• Filter• Filters• TrashEntry• TrashEntries• Trash
• AllFolders• AllMessages
Demo (Folders)
Folders
hands o
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
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
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
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
Folder-Related Objects
• Folder
• Folders
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
Folder-Related Objects
• Folder• Folders• FolderRights• FolderRightsCollection
Demo (Address Books)
Address Books
hands o
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
Address-Related Objects
• Address• Addresses• AddressBookEntry• AddressBookEntries • AddressBook• AddressBooks
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
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
Address-Related Objects
• GroupMember• GroupMembers• AddressBookRights• AddressBookRightsCollectio
n
Demo (Send Mail)
Send Mail
hands o
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
Message-Related Objects
• Message• Messages• MessageList• AllMessages• Mail• Recipient• Recipients• Attachment• Attachments
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
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
Message-Related Objects
• AllMessages• AllMessagesIterator• FormattedText• Appointment• DocumentReference• Note• PhoneMessage• SharedNotification• Task
Agenda
•Overview•API Design•Using the Object API•Developer Resources
agenda
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