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

READONLY

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

WRITEONLY

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

READWRITE

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

SERVICE

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

QUEUE

public static final java.lang.String QUEUE

EVENT

public static final java.lang.String EVENT

CONVERSATION

public static final java.lang.String CONVERSATION

VERSION

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

QSPACE

public static final java.lang.String QSPACE

IBUFTYPE

public static final java.lang.String IBUFTYPE

OBUFTYPE

public static final java.lang.String OBUFTYPE

IVIEWNAME

public static final java.lang.String IVIEWNAME

OVIEWNAME

public static final java.lang.String OVIEWNAME

BOP

public static final java.lang.String BOP

EOP

public static final java.lang.String EOP

PARMNAME

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

PARMTYPE

public static final java.lang.String PARMTYPE

PARMLEN

public static final java.lang.String PARMLEN

PARMDESC

public static final java.lang.String PARMDESC

PARMFID

public static final java.lang.String PARMFID

PARMACC

public static final java.lang.String PARMACC

PARMSTATUS

public static final java.lang.String PARMSTATUS

PARMOCC

public static final java.lang.String PARMOCC

PARMFNAME

public static final java.lang.String PARMFNAME

PARMFINDEX

public static final java.lang.String PARMFINDEX

BYTE

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

SHORT

public static final java.lang.String SHORT

INTEGER

public static final java.lang.String INTEGER

FLOAT

public static final java.lang.String FLOAT

DOUBLE

public static final java.lang.String DOUBLE

BINARY

public static final java.lang.String BINARY

STRING

public static final java.lang.String STRING

AVLIST

public static final java.lang.String AVLIST

NOACC

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

RDONLY

public static final java.lang.String RDONLY

WRONLY

public static final java.lang.String WRONLY

RDWR

public static final java.lang.String RDWR

MANDATORY

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

OPTIONAL

public static final java.lang.String OPTIONAL
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:".
Overrides:
toString in class java.lang.Object
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.