bea.jolt
Class JoltParam

java.lang.Object
  bea.jolt.JoltDefAttrs
      bea.jolt.JoltParam

public class JoltParam
extends bea.jolt.JoltDefAttrs

JoltParam implements the parameter object in a service definition object. It contains the name, data type, access information, and more about the parameter.

See Also:
JoltDefinition, JoltDefAttrs

Field Summary
static java.lang.String AVLIST
           
static java.lang.String BINARY
           
static java.lang.String BOP
           
static java.lang.String BYTE
          supported data types ("pt") in human readable format
static java.lang.String CONVERSATION
           
static java.lang.String DOUBLE
           
static java.lang.String EOP
           
static java.lang.String EVENT
           
static java.lang.String FLOAT
           
static java.lang.String IBUFTYPE
           
static java.lang.String INTEGER
           
static java.lang.String IVIEWNAME
           
static java.lang.String MANDATORY
          supported status type ("ps") - not used.
static java.lang.String NOACC
          supported access type ("pa")
static int NOACCESS
          The numeric value for access type: NOACCESS
static java.lang.String OBUFTYPE
           
static java.lang.String OPTIONAL
           
static java.lang.String OVIEWNAME
           
static java.lang.String PARMACC
           
static java.lang.String PARMDESC
           
static java.lang.String PARMFID
           
static java.lang.String PARMFINDEX
           
static java.lang.String PARMFNAME
           
static java.lang.String PARMLEN
           
static java.lang.String PARMNAME
          Jolt well-known properties for parameter
static java.lang.String PARMOCC
           
static java.lang.String PARMSTATUS
           
static java.lang.String PARMTYPE
           
static java.lang.String QSPACE
           
static java.lang.String QUEUE
           
static java.lang.String RDONLY
           
static java.lang.String RDWR
           
static int READONLY
          The numeric value for access type: READONLY
static int READWRITE
          The numeric value for access type: READWRITE
static java.lang.String SERVICE
          Supported definition types
static java.lang.String SHORT
           
static java.lang.String STRING
           
static java.lang.String VERSION
          Jolt well-known properties for definition
static int WRITEONLY
          The numeric value for access type: WRITEONLY
static java.lang.String WRONLY
           
 
Constructor Summary
JoltParam()
           
 
Method Summary
 int accessType()
          Get the access type that is relative to the service.
 void addProperty(java.lang.String name, java.lang.String val)
          Add a parameter property as the name-value pair.
 int getID()
          Get the field ID of the parameter.
static int getInteger(java.lang.String s)
          Parse the integer as Unix strtol(3C) function.
 java.util.Enumeration getKeys()
          Get an enumeration of the property keys.
 int getMaxLength()
          Get the max length defined.
 int getMaxOccurrence()
          Get the max occurrence defined.
 java.lang.String getName()
          Get the name of the parameter.
 java.lang.String getProperty(java.lang.String name)
          Get a property element of the named parameter.
 int getType()
          Get the data type.
 boolean isMandatory()
          Check if the parameter is a manadatory field.
 java.lang.String toString()
          Construct the string for the parameter beginning with "bp:" and ending with "ep:".
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOACCESS

public static final int NOACCESS
The numeric value for access type: NOACCESS

See Also:
Constant Field Values

READONLY

public static final int READONLY
The numeric value for access type: READONLY

See Also:
Constant Field Values

WRITEONLY

public static final int WRITEONLY
The numeric value for access type: WRITEONLY

See Also:
Constant Field Values

READWRITE

public static final int READWRITE
The numeric value for access type: READWRITE

See Also:
Constant Field Values

SERVICE

public static final java.lang.String SERVICE
Supported definition types

See Also:
Constant Field Values

QUEUE

public static final java.lang.String QUEUE
See Also:
Constant Field Values

EVENT

public static final java.lang.String EVENT
See Also:
Constant Field Values

CONVERSATION

public static final java.lang.String CONVERSATION
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Jolt well-known properties for definition

See Also:
Constant Field Values

QSPACE

public static final java.lang.String QSPACE
See Also:
Constant Field Values

IBUFTYPE

public static final java.lang.String IBUFTYPE
See Also:
Constant Field Values

OBUFTYPE

public static final java.lang.String OBUFTYPE
See Also:
Constant Field Values

IVIEWNAME

public static final java.lang.String IVIEWNAME
See Also:
Constant Field Values

OVIEWNAME

public static final java.lang.String OVIEWNAME
See Also:
Constant Field Values

BOP

public static final java.lang.String BOP
See Also:
Constant Field Values

EOP

public static final java.lang.String EOP
See Also:
Constant Field Values

PARMNAME

public static final java.lang.String PARMNAME
Jolt well-known properties for parameter

See Also:
Constant Field Values

PARMTYPE

public static final java.lang.String PARMTYPE
See Also:
Constant Field Values

PARMLEN

public static final java.lang.String PARMLEN
See Also:
Constant Field Values

PARMDESC

public static final java.lang.String PARMDESC
See Also:
Constant Field Values

PARMFID

public static final java.lang.String PARMFID
See Also:
Constant Field Values

PARMACC

public static final java.lang.String PARMACC
See Also:
Constant Field Values

PARMSTATUS

public static final java.lang.String PARMSTATUS
See Also:
Constant Field Values

PARMOCC

public static final java.lang.String PARMOCC
See Also:
Constant Field Values

PARMFNAME

public static final java.lang.String PARMFNAME
See Also:
Constant Field Values

PARMFINDEX

public static final java.lang.String PARMFINDEX
See Also:
Constant Field Values

BYTE

public static final java.lang.String BYTE
supported data types ("pt") in human readable format

See Also:
Constant Field Values

SHORT

public static final java.lang.String SHORT
See Also:
Constant Field Values

INTEGER

public static final java.lang.String INTEGER
See Also:
Constant Field Values

FLOAT

public static final java.lang.String FLOAT
See Also:
Constant Field Values

DOUBLE

public static final java.lang.String DOUBLE
See Also:
Constant Field Values

BINARY

public static final java.lang.String BINARY
See Also:
Constant Field Values

STRING

public static final java.lang.String STRING
See Also:
Constant Field Values

AVLIST

public static final java.lang.String AVLIST
See Also:
Constant Field Values

NOACC

public static final java.lang.String NOACC
supported access type ("pa")

See Also:
Constant Field Values

RDONLY

public static final java.lang.String RDONLY
See Also:
Constant Field Values

WRONLY

public static final java.lang.String WRONLY
See Also:
Constant Field Values

RDWR

public static final java.lang.String RDWR
See Also:
Constant Field Values

MANDATORY

public static final java.lang.String MANDATORY
supported status type ("ps") - not used.

See Also:
Constant Field Values

OPTIONAL

public static final java.lang.String OPTIONAL
See Also:
Constant Field Values
Constructor Detail

JoltParam

public JoltParam()
Method Detail

getName

public java.lang.String getName()
Get the name of the parameter.

Returns:
the parameter name

getID

public int getID()
Get the field ID of the parameter. A field ID is composed of data type information and a unique sequence number within a definition.

Returns:
the internal field id
See Also:
SBuffer

accessType

public int accessType()
Get the access type that is relative to the service. NOACCESS can be used if the parameter has an indirect parameter. READONLY means an input field of the service. The WRITEONLY means an output field of the service. READWRITE means an input/output field of the service.

Returns:
NOACCESS, READONLY, WRITEONLY or READWRITE

getType

public int getType()
Get the data type. Note: The value from "pt," which is in human readable format, is not used. However, it may not be accurate because the string may change. The actual data type is from the "pf".

Returns:
the actual data type
See Also:
SBuffer

isMandatory

public boolean isMandatory()
Check if the parameter is a manadatory field. Currently this field is not enforced.

Returns:
true if it is manadatory; false otherwise.

getMaxOccurrence

public int getMaxOccurrence()
Get the max occurrence defined. If this property is not defined, the default is 1. Currently this field is not enforced.

Returns:
The max occurrence, or 0 if it is infinite or undefined.

getMaxLength

public int getMaxLength()
Get the max length defined. This field is intended for string or carray (opaque binary) data type. Currently this field is not enforced.

Returns:
The max length or 0 if it is undefined.

getProperty

public java.lang.String getProperty(java.lang.String name)
Get a property element of the named parameter.

Parameters:
name - the name of the parameter
Returns:
The String value of the property element, or null if not found.

getKeys

public java.util.Enumeration getKeys()
Get an enumeration of the property keys.

Returns:
Enumeration of the keys
See Also:
Enumeration

toString

public java.lang.String toString()
Construct the string for the parameter beginning with "bp:" and ending with "ep:".

Returns:
String of the parameter

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String val)
                 throws java.lang.NumberFormatException,
                        DefinitionException
Add a parameter property as the name-value pair.

Parameters:
name - Name of the parameter
val - Value of the parameter
Throws:
java.lang.NumberFormatException - If "pf" or "fi" does not contain a parseable integer.
DefinitionException - If "pa" has an invalid value.

getInteger

public static int getInteger(java.lang.String s)
                      throws java.lang.NumberFormatException
Parse the integer as Unix strtol(3C) function. If s starts with 0x, it assumes the hex (radix 16) value. If s starts with 0, it assumes the octal (radix 8) value. Otherwise, decimal (radix 10) value is assumed.

Parameters:
s - String value to be parsed
Returns:
numeric value of the string
Throws:
java.lang.NumberFormatException - If the string contains unparseable integer.