Presentation is loading. Please wait.

Presentation is loading. Please wait.

Beginning Programming with the Novell GroupWise ® Object API Glade Monson Developer Services, Novell Inc.

Similar presentations


Presentation on theme: "Beginning Programming with the Novell GroupWise ® Object API Glade Monson Developer Services, Novell Inc."— Presentation transcript:

1 Beginning Programming with the Novell GroupWise ® Object API Glade Monson Developer Services, Novell Inc. devsup@novell.com

2 © March 9, 2004 Novell Inc. 2 one Net: Information without boundaries…where the right people are connected with the right information at the right time to make the right decisions. The one Net vision Novell exteNd ™ Novell Nsure ™ Novell Nterprise ™ Novell Ngage SM : : : :

3 © March 9, 2004 Novell Inc. 3 The one Net vision Novell Nterprise is an innovative family of products which gives you the power to enable and manage the constant interaction of people with your business systems — regardless of who they are or where they are. Novell Nterprise ™ Novell exteNd ™ Novell Nsure ™ Novell Nterprise ™ Novell Ngage SM : : : :

4 © January 26, 2004 Novell Inc, Confidential & Proprietary 4 Agenda Overview API design Using the Object API Developer resources

5 © January 26, 2004 Novell Inc, Confidential & Proprietary 5 Novell GroupWise ® Object API Access to GroupWise information store Address book and document management Mail messages Appointments Tasks Notes Phone messages

6 © January 26, 2004 Novell Inc, Confidential & Proprietary 6 COM Automation Accessible through any language that supports Component Object Model (COM) Visual Basic DelphiC++

7 © January 26, 2004 Novell Inc, Confidential & Proprietary 7 Agenda Overview API design Using the Object API Developer resources

8 © January 26, 2004 Novell Inc, Confidential & Proprietary 8 API Design Account Field Definition Address Book AddressFolder Filter Query Document Library Address Account Rights Message FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Mail Phone Message Task Note Shared Notification Field Recipient Attachment Application Address Book Entry

9 © January 26, 2004 Novell Inc, Confidential & Proprietary 9 Agenda Overview API design Using the Object API Developer resources

10 © January 26, 2004 Novell Inc, Confidential & Proprietary 10 Hands On Demonstration GroupWise Login

11 © January 26, 2004 Novell Inc, Confidential & Proprietary 11 Objective Build an application that allows a user to enter a user id and password and confirms that the user has logged into GroupWise

12 © January 26, 2004 Novell Inc, Confidential & Proprietary 12 Account Field Definition Address Book AddressFolder Filter Query Document Library Address Account Rights Message FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Mail Phone Message Task Note Shared Notification Field Recipient Attachment Address Book Entry Step 1: Application 1 STEP 1 Application

13 © January 26, 2004 Novell Inc, Confidential & Proprietary 13 Step 2: Account Field Definition Address Book AddressFolder Filter Query Document Library Address Account Rights Message FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Mail Phone Message Task Note Shared Notification Field Recipient Attachment Address Book Entry 1 STEP 1 Application Account 2 STEP 2

14 © January 26, 2004 Novell Inc, Confidential & Proprietary 14 Early Binding vs Late Binding Early Binding (GroupWare Type Library / GWCMA1.DLL) Dim gwApplication As Application Set gwApplication = New Application Late Binding Dim gwApplication As Object (or Variant) Set gwApplication = CreateObject("NovellGroupWareSession")

15 © January 26, 2004 Novell Inc, Confidential & Proprietary 15 Advantages of Early Binding Better debugging Faster run-time Development

16 © January 26, 2004 Novell Inc, Confidential & Proprietary 16 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 )

17 © January 26, 2004 Novell Inc, Confidential & Proprietary 17 Login() Dim gwApplication As Application Dim gwAccount As Account Set gwApplication = New Application Set gwAccount = gwApplication.Login(“UserID”,, “Pswd”) Visual Basic Early Binding

18 © January 26, 2004 Novell Inc, Confidential & Proprietary 18 Objects Accessible from Account AccountRights AccountRightsCollection Accounts AddressBook(s) AllMessages CategoryDefinitions (new for GW 6.5) DocumentLibrary(s) FieldDefinitions Filters Folder(s) Trash

19 © January 26, 2004 Novell Inc, Confidential & Proprietary 19 Hands On Demonstration Folders

20 © January 26, 2004 Novell Inc, Confidential & Proprietary 20 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 Objective

21 © January 26, 2004 Novell Inc, Confidential & Proprietary 21 Step 1: Application Field Definition Address Book AddressFolder Filter Query Document Library Address Account Rights Message FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Mail Phone Message Task Note Shared Notification Field Recipient Attachment Address Book Entry 1 STEP 1 Application Account

22 © January 26, 2004 Novell Inc, Confidential & Proprietary 22 Field Definition Address Book AddressFolder Filter Query Document Library Address Account Rights Message FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Mail Phone Message Task Note Shared Notification Field Recipient Attachment Address Book Entry STEP 1 Account 2 STEP 2 Step 2: Account Application 1

23 © January 26, 2004 Novell Inc, Confidential & Proprietary 23 Step 3: Folder Field Definition Address Book Address Filter Query Document Library Address Account Rights Message FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Mail Phone Message Task Note Shared Notification Field Recipient Attachment Address Book Entry STEP 1 Account 2 STEP 2 Application 1 Folder 3 STEP 3

24 © January 26, 2004 Novell Inc, Confidential & Proprietary 24 Objects Accessible From Folder Fields FolderRightsCollection Folders Messages Query

25 © January 26, 2004 Novell Inc, Confidential & Proprietary 25

26 © January 26, 2004 Novell Inc, Confidential & Proprietary 26 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 next 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

27 © January 26, 2004 Novell Inc, Confidential & Proprietary 27 Hands On Demonstration Address Books

28 © January 26, 2004 Novell Inc, Confidential & Proprietary 28 Objective Displays the list of entries in a selected book Display individual information for a selected entry Allow users to add new entries Build an application that displays a list of address books in your account

29 © January 26, 2004 Novell Inc, Confidential & Proprietary 29 Address-Related Objects AddressBook(s) AddressBookEntries Categories (new in 6.5) EmailAddresses (new in 6.5) Fields GroupMembers IMAddresses (new in 6.5) AddressBookRights Address

30 © January 26, 2004 Novell Inc, Confidential & Proprietary 30 Address Book Entry Field Definition AddressFolder Filter Query Document Library Address Account Rights Message FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Mail Phone Message Task Note Shared Notification Field Recipient Attachment STEP 1 Account 2 STEP 2 Application 1 Address Book 3 STEP 3 Address Book Entry 4 STEP 4

31 © January 26, 2004 Novell Inc, Confidential & Proprietary 31

32 © January 26, 2004 Novell Inc, Confidential & Proprietary 32 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 next 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

33 © January 26, 2004 Novell Inc, Confidential & Proprietary 33 Hands On Demonstration Send Mail

34 © January 26, 2004 Novell Inc, Confidential & Proprietary 34 Set the subject and the body text Populate recipients as TO, CC, BC Set message priority Add attachments Objective Build an application that creates and sends a mail message

35 © January 26, 2004 Novell Inc, Confidential & Proprietary 35 Objects Accessible From Message AttachmentsFields FormattedTextRecipients

36 © January 26, 2004 Novell Inc, Confidential & Proprietary 36 Message Related Objects Message(s) AllMessages AllMessagesIterator FormattedText Subject BodyText Attachment(s) Recipient(s) MessageList Message Subtypes Appointment Task Note DocumentReference Mail PhoneMessage SharedNotification New Subtype Property Objects Categories DraftAutoDates

37 © January 26, 2004 Novell Inc, Confidential & Proprietary 37 Send Mail Field Definition Address Book Address Filter Query Document Library Address Account Rights FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Phone Message Task Note Shared Notification Field Recipient Attachment Address Book Entry STEP 1 Account 2 STEP 2 Application 1 Folder 3 STEP 3 Message 4 STEP 4 STEP 5 Mail 5

38 © January 26, 2004 Novell Inc, Confidential & Proprietary 38

39 © January 26, 2004 Novell Inc, Confidential & Proprietary 39 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

40 © January 26, 2004 Novell Inc, Confidential & Proprietary 40 Hands On Demonstration Find Messages

41 © January 26, 2004 Novell Inc, Confidential & Proprietary 41 Build an application that uses Find() to display messages based on text, numeric, and data criteria that you specify Objective

42 © January 26, 2004 Novell Inc, Confidential & Proprietary 42 Find() and FindMessages() Can take Filter Expression Syntax (string) Filter objects

43 © January 26, 2004 Novell Inc, Confidential & Proprietary 43 Text NumericData Expression Syntax

44 © January 26, 2004 Novell Inc, Confidential & Proprietary 44 Text Expressions (SUBJECT CONTAINS "Internet") (AUTHOR MATCHES "Mr. Byg") (MESSAGE BEGINSWITH "Now hear this") (MESSAGE CONTAINS CASE ("Inter*" OR "Intra*") AND ("Test".. "Plan")) ( MATCHES “Mr.Byg”) Examples A

45 © January 26, 2004 Novell Inc, Confidential & Proprietary 45 Numeric Expressions (SIZE < 12000) (NUMBER_ACCEPTED = TOTAL_RECIPIENTS) ( > 50) Examples

46 © January 26, 2004 Novell Inc, Confidential & Proprietary 46 (DUEEND_DATE <= TOMORROW) (START_DATE >= 1996/2/5 AT 8:00:00) (CREATE_DATE >= THIS_YEAR 31) ( = THIS_MONTH) Examples Date Expressions

47 © January 26, 2004 Novell Inc, Confidential & Proprietary 47 Query Find() FindMessages() Object Model Field Definition Address Book Address Filter Document Library Address Account Rights Message FieldDef Lookup Tables Field Document Document Type Document Version Doc Version Viewer Address Busy Search Element TimeBlock Appointment DocRef Mail Phone Message Task Note Shared Notification Field Recipient Attachment Address Book Entry STEP 1 Account 2 STEP 2 Application 1 Folder STEP 3 Query 3 3

48 © January 26, 2004 Novell Inc, Confidential & Proprietary 48

49 © January 26, 2004 Novell Inc, Confidential & Proprietary 49 Psuedo Code Find Messages Begin sub routine to Find Messages Build an expression string based on the subject entered Append criteria that accounts for recipient count to the expression Append criteria that accounts for the created date Get reference to a Messages collection Use Find with your expression to return a list of message objects Loop through MessageList collection to display item information End sub routine

50 © January 26, 2004 Novell Inc, Confidential & Proprietary 50 Agenda Overview API design Using the Object API Developer resources

51 © January 26, 2004 Novell Inc, Confidential & Proprietary 51 Developer Resources Software, Sample Code, and Documentation http://developer.novell.com/ndk. http:// forge.novell.com/modules/news Support 1-800-733-9673 / 1-801-861-5281 devsup@novell.com http://developer-forums.novell.com/category/index.tpt

52 © January 26, 2004 Novell Inc, Confidential & Proprietary 52

53 © January 26, 2004 Novell Inc, Confidential & Proprietary 53 General Disclaimer This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. Novell, Inc., makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc., reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All Novell marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of Novell, Inc. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.


Download ppt "Beginning Programming with the Novell GroupWise ® Object API Glade Monson Developer Services, Novell Inc."

Similar presentations


Ads by Google