Previous Next Contents Index


IAppEventObj interface

See the IAppEventMgr interface for details on IAppEventObj.

Package
com.kivasoft

Methods
Method
Description
addAction( )
Appends an action to an ordered list of actions.
deleteActions( )
Deletes all actions added to this IAppEventObj.
enumActions( )
Enumerates the actions added to this IAppEventObj.
getAttributes( )
Retrieves the list of attributes of an IAppEventObj.
getName( )
Retrieves the name of the IAppEventObj.
setAttributes( )
Sets a list of attribute values for the IAppEventObj.

Related Topics
IAppEventMgr interface

Taking Advantage of NAS Features

addAction( )
Appends an action to an ordered list of actions.

Syntax
public int addAction(
	IValList action)

action. The input IValList object that defines the action to add. When an event is triggered, actions are executed in the same order in which they were added. The entries in this IValList object vary from one action type to another.

The keys and values you can specify are as follows. Note that string constants are available in the class com.kivasoft.types.GXConstants.

For AppLogics:

Key
Value
GXConstants.GX_AE2_RE_KEY_NREQ
The AppLogic to execute when the event is triggered. Use the following format:
GUIDGX-{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX?Param1=ABC&Param2=123. The parameters and their values are passed as input to the events.

For email:

To send email when the event is triggered, all of the following items must be specified.

Key
Value
GXConstants. GX_AE2_RE_KEY_MFILE
The name of the file that contains the body of an email message.
GXConstants. GX_AE2_RE_KEY_MTO
A comma separated list of users to send the email to.
GXConstants. GX_AE2_RE_KEY_MHOST
The name of the SMTP mail server.
GXConstants. GX_AE2_RE_KEY_SADDR
The sender's email address.

For servlets:

Key
Value
GXConstants. GX_AE2_RE_KEY_SERVLET
The name of the servlet to be executed when the event is triggered. Use the following format:
appName/ServletName?Param1=ABC&Param2=123. Parameters and their values are passed as input to the events. The only required item is the servlet name. The application name and parameters are optional.

Usage
Use the addAction( ) method after creating an application event object (by calling createEvent( ) on the IAppEventMgr object). After you change an event (for example, by adding or deleting actions or by setting attributes), you must register the event in order for the changes to take effect.

To list the added actions, use enumActions( ). To delete all actions, use deleteActions( ).

Return Value
GXE.SUCCESS if the method succeeds.

deleteActions( )
Deletes all actions added to this IAppEventObj.

Syntax
public int deleteActions()
Usage
Use this method to remove all actions associated with this IAppEventObj.

Return Value
GXE.SUCCESS if the method succeeds.

enumActions( )
Enumerates the actions added to this IAppEventObj.

Syntax
public IEnumObject enumActions()
Usage
Use this method to obtain a list of actions that have been added to this IAppEventObj. Each entry in the returned IEnumObject is an IValList object representing an action.

Return Value
IEnumObject that contains the list of actions, or null for failure.

getAttributes( )
Retrieves the list of attributes of an IAppEventObj.

Syntax
public IValList getAttributes()
Usage
Call this method after calling setAttributes( ).

Return Value
IValList object that contains the list of attributes, or null for failure.

Related Topics
setAttributes( )

getName( )
Retrieves the name of the IAppEventObj.

Syntax
public String getName()

pName. A pointer to an input buffer.

nName. The size of the input buffer.

Usage
The name of an IAppEventObj is set by calling createEvent( ) on the IAppEventMgr object. After creating an application event object, use the getName( ) method to retrieve the name.

Return Value
A string representing the name of the application event object, or null for failure.

setAttributes( )
Sets a list of attribute values for the IAppEventObj.

Syntax
public int setAttributes(
	IValList attrList)

attrList. The input IValList object that specifies the attributes. The keys and values you can specify are as follows. Note that string constants are available in the class com.kivasoft.types.GXConstants.

Usage
Use the setAttributes( ) method after creating an application event object (by calling createEvent( ) on the IAppEventMgr object). After you change an event (for example, by adding or deleting actions or by changing attributes), you must register the event in order for the changes to take effect.

Tip
None of the attributes are required to be set. The default state is enabled, and the default action mode is concurrent.

To retrieve the list of attributes that are set, use getAttributes( ).

Return Value
GXE.SUCCESS if the method succeeds.

Related Topics
getAttributes( )

 

© Copyright 1999 Netscape Communications Corp.