Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intermediate Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc.

Similar presentations


Presentation on theme: "Intermediate Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc."— Presentation transcript:

1 www.novell.com Intermediate Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc. devsup@novell.com

2 Vision…one Net A 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 Mission To 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

3

4 Agenda Overview API Design Using the Object API Developer Resources agenda

5 Novell GroupWise ® Object API Access to GroupWise information store Address book and document management  Mail messages  Appointments  Tasks  Notes  Phone messages

6 COM Automation Accessible through any language that supports Component Object Model (COM)  Visual Basic  Delphi  C++ COM

7 Agenda Overview API Design Using the Object API Developer Resources agenda

8 FieldDefinition AddressBook Account AddressBookEntry Field Address Address BusySearchElement TimeBlock Application AccountRights Address Filter Address Recipient Folder Message Appointment DocRef Mail Task Note PhoneMessage SharedNotification Field Attachment Query LookupTables Document DocumentLibrary DocumentType Address Documentversion DocumentVersionViewer FieldDef

9 Agenda Overview API Design Using the Object API Developer Resources agenda

10 Demo (Login)

11 GroupWise Login hands o

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

13 FieldDefinition AddressBook Account AddressBookEntry Field Address Address BusySearchElement TimeBlock Application AccountRights Address Filter Address Recipient Folder Message Appointment DocRef Mail Task Note PhoneMessage SharedNotification Field Attachment Query LookupTables Document DocumentLibrary DocumentType Address DocumentVersion DocumentVersionViewer FieldDef Step 1: Application 1. Application

14 FieldDefinition AddressBook Account AddressBookEntry Field Address Address BusySearchElement TimeBlock Application AccountRights Address Filter Address Recipient Folder Message Appointment DocRef Mail Task Note PhoneMessage SharedNotification Field Attachment Query LookupTables Document DocumentLibrary DocumentType Address DocumentVersion DocumentVersionViewer FieldDef Step 2: Account 1. Application 2. Account 2. Account

15 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")

16 Advantages of Early Binding Development Better Debugging Faster Run-time

17 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 )

18 Visual Basic (Early binding) Login()  Dim gwApplication As Application  Dim gwAccount As Account  Set gwApplication = New Application  Set gwAccount = gwApplication.Login(“UserID”,, “Pswd”)

19

20 Demo (Fields and FieldDefinitions)

21 Fields and FieldDefinitions hands o

22 Objective Build an application that will add a FieldDefinition of type string to your GW account Add your own custom field to a message List the Field names, types and values for the first message in your MailBox

23 Field-Related Objects Field Fields FieldDefinition FieldDefinitions

24 FieldDefinition AddressBook Account AddressBookEntry Field Address Address BusySearchElement TimeBlock Application AccountRights Address Filter Address Recipient Folder Message Appointment DocRef Mail Task Note PhoneMessage SharedNotification Field Attachment Query LookupTables Document DocumentLibrary DocumentType Address DocumentVersion DocumentVersionViewer FieldDef 1. Application 2. Account 3. Query, Find (), FindMessages() Object Model 4. Field

25

26 Psuedo Code (Fields and FieldDefinitions) Begin sub routine to add FieldDefinition Get reference to the FieldDefinitions collection from the Acc obj Add definition with a name and type End sub routine Begin sub routine to add Field Get reference to the Fields collection of a message that you will send Add field (name & type of associated field def) along with value to store End sub routine Begin sub routine to list non system Fields Get reference to Messages collection from Acc obj Loop through the Fields collection of each object and display information where Fields.Count is greater than zero End sub routine

27 Demo (Find Messages)

28 Find Messages hands o

29 Objective Build an application that uses Find() to display messages based on text, numeric, and date criteria that you specify

30 Find() and FindMessages()  Can take Filter Expression Syntax (string)  Filter objects

31 Expression Syntax Text Numeric Date

32 Text Expressions Examples  (SUBJECT CONTAINS "Internet")  (AUTHOR MATCHES "Mr. Byg")  (MESSAGE BEGINSWITH "Now hear this")  (MESSAGE CONTAINS CASE ("Inter*" OR "Intra*") AND ("Test".. "Plan"))  ( MATCHES “Mr.Byg”)

33 Numeric Expressions Examples  (SIZE < 12000)  (NUMBER_ACCEPTED = TOTAL_RECIPIENTS)  ( > 50)

34 Date Expressions Examples  (DUEEND_DATE <= TOMORROW)  (START_DATE >= 1996/2/5 AT 8:00:00)  (CREATE_DATE >= THIS_YEAR 31)  ( = THIS_MONTH)

35 FieldDefinition AddressBook Account AddressBookEntry Field Address Address BusySearchElement TimeBlock Application AccountRights Address Filter Address Recipient Folder Message Appointment DocRef Mail Task Note PhoneMessage SharedNotification Field Attachment Query LookupTables Document DocumentLibrary DocumentType Address DocumentVersion DocumentVersionViewer FieldDef 1. Application 2. Account 3. Query, Find (), FindMessages() Object Model

36

37 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

38 Demo (Query)

39 Query hands o

40 Objective Build an application that lists messages based on enumeration and unary criteria that you specify Build a query folder to display the messages

41 Query  Represent either a stand-alone query or a query associated with a query folder  Can take Filter Expression Syntax (string)

42 Expression Syntax Enumerated Unary Basic (Groups and Compound)

43 Enumeration Expressions Examples  (PRIORITY = HIGH)  (ATTACHMENT_TYPE <> OLE)  (BOX_TYPE = INCOMING)

44 Unary Expressions Examples  (MAIL OR APPOINTMENT)  (ACCEPTED AND COMPLETED)  (DOCUMENT AND NOT HIDDEN AND NOT READ)

45 FieldDefinition AddressBook Account AddressBookEntry Field Address Address BusySearchElement TimeBlock Application AccountRights Address Filter Address Recipient Folder Message Appointment DocRef Mail Task Note PhoneMessage SharedNotification Field Attachment Query LookupTables Document DocumentLibrary DocumentType Address DocumentVersion DocumentVersionViewer FieldDef 1. Application 2. Account 3. Query, Find (), FindMessages() Object Model

46

47 Basic Expressions Groups example  (TASK) OR (APPOINTMENT) AND (SUBJECT CONTAINS "PROJECT7") Compound statement example  (CREATE_DATE >= YESTERDAY AND CREATE_DATE <= TODAY) Groups and compound statements example  (FROM CONTAINS "TJEFFERSON" OR FROM CONTAINS "jADAMS") AND (MESSAGE BEGINS WITH "When in the course" AND CREATE_DATE = 1776/7/4)

48 Psuedo Code (Query) Begin sub routine to Query Build an expression string based on the priority selected Append type criteria to the expression Append custom text field criteria Append box type criteria Create a query object, set Folder name (from text field) & query location (your account obj) Look at Folder.Messages for results to populate list box End sub routine

49 Agenda Overview API Design Using the Object API Developer Resources agenda

50 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  devsup@novell.com  http://developer-forums.novell.com/category/index.tpt

51


Download ppt "Intermediate Programming with the Novell GroupWise ® Object API John Cox DSE Worldwide Developer Support Novell, Inc."

Similar presentations


Ads by Google