Beginning programming with the Novell GroupWise® Object API

Glade Monson

Developer Services

Novell, Inc.

devsup@novell.com

Agenda

Overview

API design

Using the Object API

Developer resources

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++

Agenda

Overview

API Design

Using the Object API

Developer Resources

Account

Field Definition

Address Book

Address

Folder

Filter

Query

Document Library

Address

Account Rights

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

Application

Address Book Entry

API design

Agenda

Overview

API Design

Using the Object API

Developer Resources

GroupWise login

hands on

Objective

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

Account

Field Definition

Address Book

Address

Folder

Filter

Query

Document Library

Address

Account Rights

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

1. Application

Address Book Entry

Step 1:
Application

1. Application

2.

Account

Field Definition

Address Book

Address

Folder

Filter

Query

Document Library

Address

Account Rights

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

Address Book Entry

Step 2:
Account

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

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

Objects accessible from Account

AccountRights

AccountRightsCollection

Accounts

AddressBook(s)

AllMessages

CategoryDefinitions (new for GW 6.5)

DocumentLibrary(s)

FieldDefinitions

Filters

Folder(s)

Trash

Folders

hands on

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

Account

Field Definition

Address Book

Address

Folder

Filter

Query

Document Library

Address

Account Rights

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

1. Application

Address Book Entry

Step 1:
Application

1. Application

2.

Account

Field Definition

Address Book

Address

Folder

Filter

Query

Document Library

Address

Account Rights

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

Address Book Entry

Step 2:
Account

1. Application

2.

Account

Field Definition

Address Book

Address

3.

Folder

Filter

Query

Document Library

Address

Account Rights

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

Address Book Entry

Step 3:
Folder

Objects accessible from Folder

Fields

FolderRightsCollection

Folders

Messages

Query

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

Address books

hands on

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

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

1. Application

2.

Account

Field Definition

3. Address Book

Address

Folder

Filter

Query

Document Library

Address

Account Rights

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

4. Address Book Entry

Address Book Entry

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

Send mail

hands on

Objective

Build an application that creates and sends a mail message

Set the subject and the body text

Populate recipients as TO, CC, BC

Set message priority

Add attachments

Objects accessible from Message

Attachments

Fields

FormattedText

Recipients

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

1. Application

2.

Account

Field Definition

Address Book

Address

3.

Folder

Filter

Query

Document Library

Address

Account Rights

4.

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

5.

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

Address Book Entry

Send 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

Find messages

hands on

Objective

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

Find() and FindMessages()

Find() and FindMessages()

Can take Filter Expression Syntax (string)

Filter objects

Expression syntax

Text

Numeric

Data

Text expressions

Examples

(SUBJECT CONTAINS "Internet")

(AUTHOR MATCHES "Mr. Byg")

(MESSAGE BEGINSWITH "Now hear this")

(MESSAGE CONTAINS CASE ("Inter*" OR "Intra*") AND ("Test". . "Plan"))

(<BOSS,STRING> MATCHES “Mr.Byg”)

Numeric expressions

Examples

(SIZE < 12000)

(NUMBER_ACCEPTED = TOTAL_RECIPIENTS)

(<TOTAL_EMPLOYEES,NUMERIC> > 50)

Date expressions

Examples

(DUEEND_DATE <= TOMORROW)

(START_DATE >= 1996/2/5 AT 8:00:00)

(CREATE_DATE >= THIS_YEAR 31)

(<BIRTHDAY,DATE> = THIS_MONTH)

3. Query

Find()

FindMessages()

3.

1. Application

2. Account

Field Definition

Address Book

Address

Folder

Filter

Query

Document Library

Address

Account Rights

Message

FieldDef

Lookup Tables

Field

Document

Document Type

Document Version

Doc Version Viewer

Address

Address

Address

Busy Search Element

TimeBlock

Appointment

DocRef

Mail

Phone Message

Task

Note

Shared Notification

Field

Recipient

Attachment

Address Book Entry

Object model

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

Agenda

Overview

API Design

Using the Object API

Developer Resources

Developer Resources

Software, Sample Code, and Documentation

http://developer.novell.com/ndk

http://developer.novell.com/ndk/devforums.htm

http://forge.novell.com/modules/xfref_library

http://forge.novell.com/modules/xftrove/project_list.php

Support

1-800-733-9673

Unpublished Work of Novell, Inc. All Rights Reserved.

This work is an unpublished work and contains confidential, proprietary, and trade secret information of Novell, Inc. Access to this work is restricted to Novell employees who have a need to know to perform tasks within the scope of their assignments. 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.

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.

This means that no work is lost with either the Novell Nsure UDDI corporate or testing solution.

Enterprises that build their UDDI solutions with Novell Nsure UDDI Server, are not only leveraging the deep experience Novell Identity Management foundation brings to the standard, they are securing their own future by building on an open standard implementation that will grow and scale with their corporate needs.

Title of PowerPoint Slide Presentation

McKay Brown

2002-04-25T15:40:43