Previous Contents Index DocHome Next |
iPlanet Unified Integration Framework Developer's Guide |
Chapter 5 API Reference
This chapter describes the interfaces and methods you can use from your servlet or EJB to access and manipulate data stored on a EIS system.This chapter contains the following sections:
IBSPRuntime Interface
IBSPDataObjectPrimitive Interface
IBSPDataObjectPrimitiveInfo Interface
IBSPDataObjectCollection Interface
IBSPDataObjectStructure Interface
IBSPDataObjectStructureInfo Interface
IBSPDataObjectListInfo Interface
IBSPRuntime Interface
The IBSPRuntime interface defines the methods you need to create service provider and function objects.
createFunctionObject()
Creates a function object.
Syntax
public
netscape.bsp.runtime.IBSPFunctionObject createFunctionObject(
java.lang.String pconnectorName,
java.lang.String pTemplateName);pconnectorName - A string that specifies the connector type name.
pTemplateName - A string that specifies the function object template name.
Usage
Specify an connector type name and a template name from the repository.
Example
IBSPFunctionObject fn = null;if( (runtime != null) && (sp != null) )
fn = runtime.createFunctionObject("CICS", "phonebook");
Return Value
An IBSPFunctionObject.
createServiceProvider()
Creates a service provider object.
Syntax
public
netscape.bsp.runtime.IBSPServiceProvider createServiceProvider(
java.lang.String pconnectorName,
java.lang.String pTemplateName);pconnectorName - A string that specifies the connector type name.
pTemplateName - A string that specifies the service provider template name.
Usage
Specify an connector type name and a template name from the repository.
Example
IBSPServiceProvider sp = null;sp = runtime.createServiceProvider("CICS", "CICS_sp1");
Return Value
An IBSPServiceProviderObject object.
getServerContext()
Retrieves the server's context object.
Syntax
public com.kivasoft.IContext getServerContext();
Return Value
The IContext object associated with this runtime object.
IBSPServiceProvider Interface
The IBSPServiceProvider interface defines the methods you need to enable or disable a connection to a backendbackend server from your servlet or EJB.
disable()
Disables the backend connection.
Syntax
public int disable();
Usage
The disable() method causes the connection with the backend to be dropped. You should disable sp-bound connections after they are no longer needed. After you call the disable() method, the connection is no longer valid and the connection is returned to the pool. You can call enable() to reestablish the connection.An integer that contains GXE.SUCCESS if the operation was successful.
enable()
Enables the backend connection.
Syntax
public int enable();
Usage
The enable() method validates the logical connection with the backend system and establishes a physical connection. You must enable the connection before you associate a service provider with a function object. For method-bound connections, the connection is automatically released after the method call.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
extendBindDuration()
Extends the bind duration.
Syntax
public int extendBindDuration();
Usage
The extendBindDuration() method increases the bind duration timeout value beyond the bind duration specified in the repository. Call this method when you expect a long transaction and want to hold the same physical connection. For information about bind durations, see Bind Durations.An integer that contains GXE.SUCCESS if the operation was successful.
getConfig()
Determines the configuration of the backend connection.
Syntax
public netscape.bsp.dataobject.IBSPDataObject getConfig();
Usage
You can use this method to set up configuration information for a backend connection.
Return Value
An IBSPDataObject object that contains the configuration information.
isEnabled()
Determines whether the backend connection is enabled.
Syntax
public boolean isEnabled();
Return Value
A boolean value that is true if the connection is enabled; otherwise, it is false.
IBSPFunctionObject Interface
The IBSPFunctionObject interface defines the methods you need to specify a service provider prepare and execute a backend request obtain properties and data from a backend system.
execute()
Executes a backend request.
Syntax
public int execute();
Usage
You must call the prepare() method before calling execute().
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
getDataBlock()
Retrieves a data block from the backend system.
Syntax
public netscape.bsp.dataobject.IBSPDataObject getDataBlock();
Return Value
An IBSPDataObject object that contains the data block.
getProperties()
Determines backend system properties.
Syntax
public netscape.bsp.dataobject.IBSPDataObject getProperties();
Return Value
An IBSPDataObject object that contains the properties for the current operation.
getServiceProvider()
Determines the service provider.
Syntax
public netscape.bsp.dataobject.IBSPServiceProvider getServiceProvider();
Return Value
An IBSPServiceProvider object that represents a connection to the backend.
prepare()
Prepares a backend request.
Syntax
public int prepare(java.lang.String pOperation);pOperation - A string that specifies the operation to perform.
Usage
Specify an operation by name from the repository. The prepare() method sets up the data block and properties for the specified operation and causes the specified operation to become the current operation for this function object.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
IBSPDataObjectMgr Interface
The IBSPDataObjectMgr interface implements a method for examining the contents of a data object. The following example shows how to create an reference to an IBSPDataObjectMgr object:netscape.bsp.dataobject.IBSPDataObjectMgr doMgr =
netscape.bsp.dataobject.access_cDataObject.getcDataObject(
context, null, null);
Note Currently, data object creation methods are not exposed; you can only create a data object by creating the object info in the repository and accessing the repository.
Package
netscape.bsp.dataobject
dumpDataObject()
Displays the data contained in a data object on the console.
Syntax
public int dumpDataObject(
netscape.bsp.dataobject.IBSPDataObject dataObject);dataObject - The IBSPDataObject object whose data you want to display.
Usage
Use the dumpDataObject() method for debugging. The data is displayed on the console.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
IBSPDataObject Interface
The IBSPDataObject interface implements methods for accessing data objects and their attributes.
Package
netscape.bsp.dataobject
Attribute Access Methods
Determines the value of a double precision floating point attribute.
Determines the value of a variable size byte array attribute.
Sets the value of a double precision floating point attribute.
Other Methods
attrExists()
Determines whether an attribute exists in the instance.
Syntax
public boolean attrExists(java.lang.String path);path - The path to a data attribute you want to check.
Usage
An attribute exists if it has a value in the object.
Return Value
A boolean value that is true if the attribute exits; otherwise, it is false.
attrIsDefined()
Determines whether an attribute is defined in the repository.
Syntax
public boolean attrIsDefined(java.lang.String path);path - The path to a data attribute you want to check.
Usage
An attribute is defined if its type information is defined in the repository.
Return Value
A boolean value that is true if the attribute is defined; otherwise, it is false.
copy()
Creates a copy of this object.
Syntax
public netscape.bsp.dataobject.IBSPDataObject copy();
Usage
The copy() method performs a deep copy.
Return Value
A copy of the data object.
getAttr()
Determines the attribute at the specified path.
Syntax
public netscape.bsp.dataobject.IBSPDataObject
getAttr(java.lang.String path);path - The path to a data attribute you want to check.
Usage
If the returned value is of a primitive data type, it is copied into a new primitive data object and the primitive data object is returned; otherwise, a reference to the data object is returned.
Return Value
An IBSPDataObject object that contains the attribute.
getAttrBinary()
Determines the value of a byte array attribute.
Syntax
public byte[] getAttrBinary(java.lang.String path);path - The path to a data attribute you want to check.
Return Value
A byte array that contains the value.
getAttrBinarySize()
Determines the current size of a byte array attribute.
Syntax
public int getAttrBinarySize(java.lang.String path);path - The path to a byte array attribute whose size you want to obtain.
Return Value
An integer that contains the size, in bytes.
getAttrCount()
Determines the number of attributes in the data object.
Syntax
public int getAttrCount();
Return Value
An integer that specifies the number of attributes.
getAttrDouble()
Determines the value of a double precision floating point attribute.public double getAttrDouble(java.lang.String path);
path - The path to a data attribute you want to check.
Return Value
A double precision floating point number that contains the value.
getAttrFloat()
Determines the value of a floating point attribute.
Syntax
public float getAttrFloat(java.lang.String path);path - The path to a data attribute whose value you want to obtain.
Return Value
A floating point number that contains the value.
getAttrFString()
Determines the value of a fixed length string attribute.
Syntax
public java.lang.String getAttrFString(java.lang.String path);path - The path to a data attribute whose value you want to obtain.
Return Value
A string that contains the value.
getAttrFStringMaxLen()
Determines the maximum length of a fixed-size string attribute.
Syntax
public int getAttrFStringMaxLen(java.lang.String path);path - The path to a fixed length string attribute whose maximum length you want to obtain.
Return Value
An integer that contains the maximum length, in bytes.
getAttrInt()
Determines the value of an integer attribute.
Syntax
public int getAttrInt(java.lang.String path);path - The path to a data attribute whose value you want to obtain.
Return Value
An integer that contains the value.
getAttrString()
Determines the value of a string attribute.
Syntax
public java.lang.String getAttrString(java.lang.String path);path - The path to a data attribute whose value you want to obtain.
Return Value
A string that contains the value.
getAttrType()
Determines the data type of an attribute.
Syntax
public int getAttrType(java.lang.String path);path - The path to a data attribute whose value you want to determine.
Usage
The attribute type may be one of the following:You should always use a constant instead of a value in your servlet or EJB; values are subject to change.
Return Value
An integer that contains the type number.
getAttrVBinary()
Determines the value of a variable size byte array attribute.
Syntax
public byte[] getAttrVBinary(java.lang.String path);path - The path to a data attribute whose value you want to obtain.
Return Value
A byte array that contains the value.
getAttrVBinarySize()
Determines the current size of a variable byte array attribute.
Syntax
public int getAttrVBinarySize(java.lang.String path);path - The path to a variable length byte array attribute whose size you want to obtain.
Return Value
An integer that contains the size, in bytes.
getDataItr()
Retrieves the data iterator for this object.
Syntax
public
netscape.bsp.dataobject.IBSPDataObjectDataItr getDataItr();
Usage
For information about the IBSPDataObjectDataItr interface, see IBSPDataObjectDataItr Interface.
Return Value
An IBSPDataObjectDataItr object.
getTypeInfo()
Determines the type information for this object.
Syntax
public
netscape.bsp.dataobject.IBSPDataObjectInfo getTypeInfo();
Return Value
An IBSPDataObjectInfo object.
isAttrType()
Determines whether an attribute's type matches the specified type.
Syntax
public
boolean isAttrType(java.lang.String path, int typeNumber);typeNumber - The specified type.
Usage
The attribute type may be one of the following:
Return Value
A boolean value that is true if the types match; otherwise, it is false.
isType()
Determines whether the type matches the specified type.
Syntax
public boolean isType(int typeNumber);typeNumber - The specified type.
Usage
The attribute type may be one of the following:
Return Value
A boolean value that is true if the types match; otherwise, it is false.
removeAttr()
Removes an attribute.
Syntax
public int removeAttr(java.lang.String path);path - The path to a data attribute you want to remove.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrBinary()
Sets the value of a byte array attribute.
Syntax
public int setAttrBinary(java.lang.String path, byte[] buf);path - The path to a data attribute whose value you want to set.
buf - The value with which to set the attribute.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrDataObject()
Sets the value of an attribute to a data object.
Syntax
public int setAttrDataObject(java.lang.String path,
netscape.bsp.dataobject.IBSPDataObject value);path - The path to a data attribute whose value you want to set.
value - The object that you want to associate with the attribute.
Usage
A value for a primitive data type is unwrapped and copied when it is set in the object; in other words, the value is stored in the object, not an object that contains the value. Otherwise, the data object itself is set to the value.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrDataObjectList()
Sets the value of an attribute to a new empty list.
Syntax
public int setAttrDataObjectList(java.lang.String path);path - The path to a data attribute whose value you want to set.
Usage
An empty list is created at the specified path.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrDataObjectStructure()
Sets the value of an attribute to a new empty structure.
Syntax
public int setAttrDataObjectStructure(java.lang.String path);path - The path to a data attribute whose value you want to set.
Usage
An empty structure is created at the specified path.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrDouble()
Sets the value of a double precision floating point attribute.
Syntax
public int setAttrDouble(java.lang.String path, double value);path - The path to a data attribute whose value you want to set.
value - The value with which to set the attribute.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrFloat()
Sets the value of a floating point attribute.
Syntax
public int setAttrFloat(java.lang.String path, float value);path - The path to a data attribute whose value you want to set.
value - The value with which to set the attribute.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrFString()
Sets the value of a fixed length string attribute.
Syntax
public int setAttrFString( java.lang.String path,
java.lang.String stringValue);path - The path to a data attribute whose value you want to set.
stringValue - The value with which to set the attribute.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrInt()
Sets the value of an integer attribute.
Syntax
public int setAttrInt(java.lang.String path, int intValue);path - The path to a data attribute whose value you want to set.
intValue - The value with which to set the attribute.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrString()
Sets the value of a string attribute.
Syntax
public int setAttrString(java.lang.String path,
java.lang.String stringValue);path - The path to a data attribute whose value you want to set.
stringValue - The value with which to set the attribute.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setAttrVBinary()
Sets the value of a variable size byte array attribute.
Syntax
public int setAttrVBinary(java.lang.String path, byte[] buf);path - The path to a data attribute whose value you want to set.
buf - The value with which to set the attribute.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
IBSPDataObjectPrimitive Interface
The IBSPDataObjectPrimitive interface defines methods for accessing primitive data objects, which include integers, floating point numbers, double precision floating point numbers, byte arrays, and strings.
Package
netscape.bsp.dataobject
Methods
Determines the value of a double precision floating point number.
getBinary()
Determines the value of a byte array.
Syntax
public byte[] getBinary();
Return Value
A byte array that contains the value.
getBinarySize()
Determine the size of a byte array.
Syntax
public int getBinarySize();
Return Value
An integer that contains the size, in bytes.
getDouble()
Determines the value of a double precision floating point number.
Syntax
public double getDouble();
Return Value
A double precision floating point number that contains the value.
getFloat()
Determines the value of a floating point number.
Syntax
public float getFloat();
Return Value
A floating point number that contains the value.
getFString()
Determines the value of a fixed length string.
Syntax
public java.lang.String getFString();
Return Value
A string that contains the value.
getFStringMaxLen()
Determines the maximum length of a fixed-size string.
Syntax
public int getFStringMaxLen();
Return Value
An integer that contains the maximum length, in bytes.
getInt()
Determines the value of an integer.
Syntax
public int getInt();
Return Value
An integer that contains the value.
getString()
Determines the value of a string.
Syntax
public java.lang.String getString();
Return Value
A string that contains the value.
getVBinary()
Determines the value of a variable size binary number.
Syntax
public byte[] getVBinary();
Return Value
A byte array that contains the value.
getVBinarySize()
Determine the size of a variable byte array.
Syntax
public int getVBinarySize();
Return Value
An integer that contains the size, in bytes.
setBinary()
Sets the value of a binary number.
Syntax
public int setBinary(byte[] buf);buf - The value with which to set the object.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setDouble()
Sets the value of a double precision floating point number.
Syntax
public int setDouble(double value);value - The value with which to set the object.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setFloat()
Sets the value of a floating point number.
Syntax
public int setFloat(float value);value - The value with which to set the object.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setFString()
Sets the value of a fixed length string.
Syntax
public int setFString(java.lang.String stringValue);stringValue - The value with which to set the object.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setInt()
Sets the value of an integer.
Syntax
public int setInt(int intValue);intValue - The value with which to set the object.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setString()
Sets the value of a string.
Syntax
public int setString(java.lang.String stringValue);stringValue - The value with which to set the attribute.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setVBinary()
Sets the value of a variable size byte array.
Syntax
public int setVBinary(byte[] buf);buf - The value with which to set the object.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
IBSPDataObjectPrimitiveInfo Interface
The IBSPDataObjectPrimitiveInfo interface defines methods for getting and setting the default values and lengths of primitive data types.
Package
netscape.bsp.dataobject
Methods
Syntax
public netscape.bsp.dataobject.IBSPDataObjectPrimitive
getPrimDefault();
Return Value
The default IBSPDataObjectPrimitive object.
getPrimDefaultBinary()
Determines the default value of a byte array.
Syntax
public byte[] getPrimDefaultBinary();
Return Value
A byte array that contains the value.
getPrimDefaultDataObject()
Determines the default primitive data object.
Syntax
public netscape.bsp.dataobject.IBSPDataObjectPrimitive
getPrimDefaultDataObject();
Return Value
The default IBSPDataObjectPrimitive object.
getPrimDefaultDouble()
Determines the default value of a double precision floating point number.
Syntax
public double getPrimDefaultDouble();
Return Value
A double precision floating point number that contains the value.
getPrimDefaultFloat()
Determines the default value of a floating point number.
Syntax
public float getPrimDefaultFloat();
Return Value
A floating point number that contains the value.
getPrimDefaultFString()
Determines the default value of a fixed length string.
Syntax
public java.lang.String getPrimDefaultFString();
Return Value
A string that contains the value.
getPrimDefaultFStringMaxLen()
Determines the default maximum length of a fixed-size string.
Syntax
public int getPrimDefaultFStringMaxLen();
Return Value
An integer that contains the size, in bytes.
getPrimDefaultInt()
Determines the default value of an integer.
Syntax
public int getPrimDefaultInt();
Return Value
An integer that contains the value.
getPrimDefaultVBinary()
Determines the default value of a variable size byte array.
Syntax
public byte[] getPrimDefaultVBinary();
Return Value
A byte array that contains the value.
getPrimSize()
Determines the size of the defined primitive data object.
Syntax
public int getPrimSize();
Return Value
An integer that contains the size, in bytes.
getPrimType()
Determines the data type of the defined primitive data object.public int getPrimType();Usage
The primitive type may be one of the following:
You should always use a constant instead of a value in your servlet or EJB; values are subject to change.
Return Value
An integer that contains the type number.
setPrimDefaultBinary()
Sets the default value of a binary number.
Syntax
public int setPrimDefaultBinary(byte[] buf);buf - The default value with which to set the default.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setPrimDefaultDataObject()
Sets the default primitive data object.
Syntax
public int setPrimDefaultDataObject(
netscape.bsp.dataobject.IBSPDataObjectPrimitive value);value - The value with which to set the default.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setPrimDefaultDouble()
Sets the default value of a double precision floating point number.
Syntax
public int setPrimDefaultDouble(double value);value - The value with which to set the default.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setPrimDefaultFloat()
Sets the default value of a floating point number.
Syntax
public int setPrimDefaultFloat(float value);value - The value with which to set the default.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setPrimDefaultFString()
Sets the default value of a fixed length string.
Syntax
public int setPrimDefaultFString(java.lang.String value);stringValue - The value with which to set the default.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setPrimDefaultInt()
Sets the default value of an integer.
Syntax
public int setInt(int intValue);intValue - The value with which to set the default.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setPrimDefaultString()
Sets the default value of a string.
Syntax
public int setString(java.lang.String stringValue);stringValue - The value with which to set the default.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setPrimDefaultVBinary()
Sets the default value of a variable size byte array.
Syntax
public int setVBinary(byte[] buf);buf - The value with which to set the default.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
IBSPDataObjectCollection Interface
The IBSPDataObjectCollection interface defines an interface from which collections, such as data object lists and structures are derived. The interface currently has no methods.
IBSPDataObjectList Interface
The IBSPDataObjectList interface defines methods for accessing elements of list data objects. The interface defines an ordered list in which new elements are added to the end.
Package
netscape.bsp.dataobject
Access Methods
Determines the value of a double precision floating point number element.
Sets the value of a double precision floating point number element.
Element Insertion and Deletion Methods
Adds a double precision floating point number as an element in the list.
Adds a variable length byte array as an element in the list.
Other Methods
Determines the maximum length of a fixed length string element.
addElemBinary()
Adds a byte array as an element in the list.
Syntax
public int addElemBinary(byte[] buf);buf - The value with which to set the element.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemDataObject()
Adds a data object as an element in the list.
Syntax
public int addElemDataObject
(netscape.bsp.dataobject.IBSPDataObject value);value - The value with which to set the element.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemDataObjectList()
Adds a new empty list as an element in the list.
Syntax
public int addElemDataObjectList();
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemDataObjectStructure()
Adds a new empty structure as an element in the list.
Syntax
public int addElemDataObjectStructure();
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemDouble()
Adds a double precision floating point number as an element in the list.
Syntax
public int addElemDouble(double value);value - The value with which to set the element.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemFloat()
Adds a floating point number as an element in the list.
Syntax
public int addElemFloat(float value);value- The value with which to set the element.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemFString()
Adds a fixed length string as an element in the list.
Syntax
public int addElemFString(java.lang.String value);value - The value with which to set the element.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemInt()
Adds an integer number as an element in the list.
Syntax
public int addElemInt(int value);value - The value with which to set the element.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemString()
Adds a string as an element in the list.
Syntax
public int addElemString(java.lang.String value);value - The value with which to set the element.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
addElemVBinary()
Adds a variable-length byte array as an element in the list.
Syntax
public int addElemVBinary(byte[] buf);buf - The value with which to set the element.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
Syntax
public boolean elemExists(int index);index - The position of the element to test.
Usage
An element exists if its value exists in the object. The first index position in the list is 0.
Return Value
A boolean value that is true if the element exists; otherwise, it is false.
elemIsDefined()
Determines whether an element is defined in the repository.
Syntax
public boolean elemIsDefined(int index);index - The position of the element to test.
Usage
An element is defined if its index is between 0 and one less than the maximum element count, inclusive.
Return Value
A boolean value that is true if the element is defined; otherwise, it is false.
getElem()
Determines the value of an element.
Syntax
public
netscape.bsp.dataobject.IBSPDataObject getElem(int index);index - The position of the element whose value you want to determine.
Usage
If the returned value is of a primitive data type, it is copied into a primitive data object and the primitive data object is returned; otherwise, a reference to the data object is returned. The first index position in the list is 0.
Return Value
An IBSPDataObject object that contains the value.
getElemBinary()
Determines the value of a byte array element.
Syntax
public byte[] getElemBinary(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
A byte array that contains the value.
getElemBinarySize()
Determines the size of a byte array element.
Syntax
public byte[] getElemBinaryize(int index);index - The position of the element whose size you want to determine.
Usage
The first index position in the list is 0.
Return Value
An integer that contains the size, in bytes.
getElemCount()
Determines the current number of elements in the list.
Syntax
public int getElemCount();
Return Value
An integer that contains the number of elements.
getElemDataObject()
Determines the data object stored in an element.
Syntax
public netscape.bsp.dataobject.IBSPDataObject getElemDataObject
(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
A double precision floating point number that contains the value.
getElemDouble()
Determines the value of a double precision floating point number element.
Syntax
public double getElemDouble(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
A double precision floating point number that contains the value.
getElemFloat()
Determines the value of a floating point number element.
Syntax
public float getElemFloat(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
A floating point number that contains the value.
getElemFString()
Determines the value of a fixed length string element.
Syntax
public java.lang.String getElemFString(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
A string that contains the value.
getElemFStringMaxLen()
Determines the maximum length of a fixed length string element.
Syntax
public int getElemStringMaxLen(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
An integer that contains the size, in bytes.
getElemInt()
Determines the value of an integer element.
Syntax
public int getElemInt(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
An integer that contains the value.
getElemString()
Determines the value of a string element.
Syntax
public java.lang.String getElemString(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
A string that contains the value.
getElemType()
Determines the type of an element.
Syntax
public int getElemType(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
An integer value that specifies the type, which may be one of the following types:
getElemVBinary()
Determines the value of a variable size byte array element.
Syntax
public byte[] getElemVBinary(int index);index - The position of the element whose value you want to determine.
Variable Size Usage
The first index position in the list is 0.
Return Value
A byte array that contains the value.getElemVBinarySize()
Determines the size of a variable byte array element.
Syntax
public int getElemVBinarySize(int index);index - The position of the element whose value you want to determine.
Usage
The first index position in the list is 0.
Return Value
An integer that contains the size, in bytes.
getMaxElemCount()
Determines the maximum number of elements in the list.
Syntax
public int getMaxElemCount();
Return Value
An integer that contains the number of elements.
isElemType()
Compares the element with the specified type.
Syntax
public boolean isElemType(int index,int typeNumber);index - The position of the element whose value you want to determine.
typeNumber - The type with which you want to compare this element.
Usage
The first index position in the list is 0. The type may be one of the following:You should always use a constant instead of a value in your servlet or EJB; values are subject to change.
Return Value
A boolean value that is true if the type of the element matches the specified type; otherwise, it is false.
removeElem()
Removes an element in the list.
Syntax
public int removeElem(int index);index - The position of the element to remove.
Usage
Elements after the element that was removed are moved down by one position in the list; for example, if you remove element 0, all elements are shifted down by one such that element 1 becomes element 0, element 2 becomes element 1, and so on. The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemBinary()
Sets the value of a binary number element.
Syntax
public int setElemBinary(int index, byte[] buf);index - The position of the element whose value you want to set.
buf - The value with which to set the object.
Usage
The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemDataObject()
Sets the data object stored in an element.
Syntax
public int setElemDataObject(int index,
netscape.bsp.dataobject.IBSPDataObject value);index - The position of the element whose value you want to set.
value - The value with which to set the element.
Usage
A value for a primitive data type is unwrapped and copied when it is set in the object; in other words, the value is stored in the object, not an object that contains the value. Otherwise, the data object itself is set to the value. The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemDataObjectList()
Sets an element to a new empty list.
Syntax
public int setElemDataObjectList(int index);index - The position of the element to set.
Usage
An empty list is created at the specified index. The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemDataObjectStructure()
Sets an element to a new empty structure.
Syntax
public int setElemDataObjectStructure(int index);index - The position of the element to set.
Usage
An empty structure is created at the specified index. The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemDouble()
Sets the value of a double precision floating point number element.
Syntax
public int setElemDouble(int index, double value);index - The position of the element whose value you want to set.
value - The value with which to set the element.
Usage
The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemFloat()
Sets the value of a floating point number element.
Syntax
public int setElemFloat(int index, float value);index - The position of the element whose value you want to set.
value - The value with which to set the element.
Usage
The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemFString()
Sets the value of a fixed length string element.
Syntax
public
int setElemFString(int index, java.lang.String stringValue);index - The position of the element whose value you want to set.
stringValue - The value with which to set the element.
Usage
The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemInt()
Sets the value of an integer element.
Syntax
public int setElemInt(int index, int intValue);index - The position of the element whose value you want to set.
intValue - The value with which to set the element.
Usage
The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemString()
Sets the value of a string element.
Syntax
public
int setElemString(int index, java.lang.String stringValue);index - The position of the element whose value you want to set.
stringValue - The value with which to set the element.
Usage
The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setElemVBinary()
Sets the value of a variable size byte array element.
Syntax
public int setElemBinary(int index, byte[] buf);index - The position of the element whose value you want to set.
buf - The value with which to set the element.
Usage
The first index position in the list is 0.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
setMaxElemCount()
Specifies the maximum number of elements in the list.
Syntax
public int setMaxElemCount(int maxElemCount);maxElemCount - The maximum number of elements you want to specify.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
IBSPDataObjectArray Interface
The IBSPDataObjectArray interface extends the IBSPDataObjectList interface to provide methods for accessing homogeneous data objects; an array's elements are homogeneous. An IBSPDataObjectInfo object is associated with an array to define the type of objects that the array contains.
Package
netscape.bsp.dataobject
addElem()
Add an element to an array.
Syntax
public int addElem();
Usage
The method creates an instance of the element type info object and adds it to the array. The data type of the element added is determined by the type information object associated with this array.
Return Value
An integer that contains GXE.SUCCESS if the operation was successful.
getElemTypeInfo()
Determine the type information associated with an array.
Syntax
public
netscape.bsp.dataobject.IBSPDataObjectInfo getElemTypeInfo();
Return Value
An IBSPDataObjectInfo object that contains the type information.
IBSPDataObjectStructure Interface
The IBSPDataObjectStructure interface defines methods for accessing fields in a structure.
Package
netscape.bsp.dataobject
Access Methods
Determines the value of a double precision floating point number field.
Sets the value of a double precision floating point number. field.
Other Methods
Determines the maximum length of a fixed length string field.
fieldExists()
Determines whether a field exists in the instance.
Syntax
public boolean fieldExists(java.lang.String fieldName);fieldName - The name of the field to test.
Usage
A field exists if its value exists in the object.
Return Value
A boolean value that is true if the field exists; otherwise, it is false.
fieldIsDefined()
Determines whether a field is defined in the repository.
Syntax
public boolean fieldIsDefined(java.lang.String fieldName);fieldName - The name of the field to test.
Usage
A field is defined if its type information is defined in the repository.
Return Value
A boolean value that is true if the field is defined; otherwise, it is false.
getField()
Determines the value of a field.
Syntax
public netscape.bsp.dataobject.IBSPDataObject getField(
java.lang.String fieldName);fieldName - The name of the field whose value you want to determine.
Usage
If the returned value is of a primitive data type, it is copied into a new primitive data object and the primitive data object is returned; otherwise, a reference to the data object is returned.
Return Value
An IBSPDataObject object that contains the value.
getFieldBinary()
Determines the value of a byte array field.
Syntax
public byte[] getFieldBinary(java.lang.String fieldName);fieldName - The name of the field whose value you want to determine.