HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.runtime
Class IOGV

java.lang.Object
  extended by com.ibm.hats.runtime.IOGV

public class IOGV
extends Object

IOGV is a convenience class that contains synchronized static methods for interacting with Global Variables.
It was specifcally designed to do this interaction for the benefit of Integration Objects (IOs) for input and output pages. Note that this is for accessing only shared Global Variables.


Field Summary
static String HATSGV
          The HttpServletRequest parameter value identifier
 
Constructor Summary
IOGV()
           
 
Method Summary
static IGlobalVariable getGlobalVariable(javax.servlet.http.HttpSession httpSession, String name)
          Deprecated. Use getGlobalVariable(ISession, String) instead.
static IGlobalVariable getGlobalVariable(ISession iSession, String name)
          This method returns the specified shared Global Variable from the specified client session.
This method will not execute if the objects passed in are null, or the iSession is not a valid client identifier.
static IGlobalVariable getGlobalVariable(String id, String name)
          This method allows direct access to the shared Global Variable.
static int getGlobalVariableLength(String id, String name)
          This method returns the integer (int) value of the length of an indexed shared Global Variable.
static String getGlobalVariableString(String id, String name)
          This method returns the String value of a shared Global Variable.
static String getGlobalVariableString(String id, String name, int i)
          This method returns the String value of an indexed shared Global Variable.
static void process(javax.servlet.http.HttpServletRequest req)
          Deprecated. Use process(IRequest) instead.
static void process(IRequest req)
          When the input page is generated for an IO, the parameters matching to Global Variables are added as hidden input fields.
Specifically, the hidden input fields have a name matching the value of HATSGV and a value of the name of the Global Variable.
There are input fields in the input IO page that have the same name as the global variable and a value.
When the input page is submitted to the output IO page, this data becomes IRequest parameters.
static void removeGlobalVariable(ISession iSession, IGlobalVariable igv)
          This method removes a shared Global Variable from a client session.
This method will not execute if the objects passed in are null, or the iSession is not a valid client identifier.
This method does nothing if the specified shared Global Variable does not exist.
static void removeGlobalVariable(ISession iSession, String gvName)
          This method removes a non-indexed shared Global Variable from a client session.
This method will not execute if the objects passed in are null, or the iSession is not a valid client identifier.
This method does nothing if the specified shared Global Variable name does not exist.
static void setGlobalVariable(javax.servlet.http.HttpSession httpSession, IGlobalVariable igv)
          Deprecated. Use setGlobalVariable(ISession, IGlobalVariable) instead.
static void setGlobalVariable(ISession iSession, IGlobalVariable igv)
          This method allows addition of a shared Global Variable to a client session.
static void setGlobalVariable(String id, IGlobalVariable igv)
          This method allows addition of a shared Global Variable to a client session.
This method will not execute if the objects passed in are null, or the id String is not a valid client identifier.
static void setGlobalVariableString(javax.servlet.http.HttpSession httpSession, String gvName, String gvValue)
          Deprecated. Use setGlobalVariableString(ISession, String, String) instead.
static void setGlobalVariableString(ISession iSession, String name, String value)
          This method adds the specified shared Global Variable name/value pair to the specified client session.
This method will not execute if the objects passed in are null, or the iSession is not a valid client identifier.
static void setGlobalVariableString(String id, String gvName, String gvValue)
          This method allows addition of a non-indexed shared Global Variable to a client session.
This method will not execute if the objects passed in are null, or the id String is not a valid client identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HATSGV

public static final String HATSGV
The HttpServletRequest parameter value identifier

See Also:
Constant Field Values
Constructor Detail

IOGV

public IOGV()
Method Detail

getGlobalVariableString

public static String getGlobalVariableString(String id,
                                             String name)
This method returns the String value of a shared Global Variable.
This method will return null if the ide string is null or the runtime does not contain any client with that identifier.

Parameters:
id - typically the HttpSession.getId() or whatever identifier string was used in creating the client
name - String name of the shared Global Variable
Returns:
String

getGlobalVariableString

public static String getGlobalVariableString(String id,
                                             String name,
                                             int i)
This method returns the String value of an indexed shared Global Variable.
This method will return an empty String ("") if
1)the identifier string is null or the runtime does not contain any client with that identifier
or
2)the name is null or the runtime does not contain any variable with that name

Parameters:
id - String typically HttpSession.getId() or whatever identifier string was used in creating the client
name - String name of the shared Global Variable
i - index within the shared Global Variable of the String to return
Returns:
String

getGlobalVariableLength

public static int getGlobalVariableLength(String id,
                                          String name)
This method returns the integer (int) value of the length of an indexed shared Global Variable.
This method will return a zero (0) if
1)the id string is null or the runtime does not contain any client with that identifier
or
2) the name is null or the runtime does not contain any Global Variable with that name

Parameters:
id - typically HttpSession.getId() or whatever identifier string was used in creating the client
name - name of the shared Global Variable
Returns:
int

getGlobalVariable

public static IGlobalVariable getGlobalVariable(javax.servlet.http.HttpSession httpSession,
                                                String name)
Deprecated. Use getGlobalVariable(ISession, String) instead.

This method allows direct access to the shared Global Variable.
This method will return a null if
1)the httpSession is null or the runtime does not contain any client with that identifier
or
2) the name is null or the runtime does not contain any variable with that name

Parameters:
httpSession - HttpSession
name - name of the shared Global Variable
Returns:
IGlobalVariable

getGlobalVariable

public static IGlobalVariable getGlobalVariable(String id,
                                                String name)
This method allows direct access to the shared Global Variable.
This method will return a null if
1)the id String is null or the runtime does not contain any client with that identifier
or
2)the name is null or the runtime does not contain any variable with that name

Parameters:
id - typically the HttpSession.getId() or whatever identifier string was used in creating the client
name - name of the shared Global Variable
Returns:
IGlobalVariable

setGlobalVariable

public static void setGlobalVariable(javax.servlet.http.HttpSession httpSession,
                                     IGlobalVariable igv)
Deprecated. Use setGlobalVariable(ISession, IGlobalVariable) instead.

This method allows addition of a shared Global Variable to a client session.
This method will not actually work if the objects passed in are null, or the httpSession is not a valid client identifier.

Parameters:
httpSession - the HttpSession
igv - the new IGlobalVariable object

setGlobalVariable

public static void setGlobalVariable(String id,
                                     IGlobalVariable igv)
This method allows addition of a shared Global Variable to a client session.
This method will not execute if the objects passed in are null, or the id String is not a valid client identifier.

Parameters:
id - typically the HttpSession.getId() or whatever identifier string was used in creating the client
igv - the new IGlobalVariable object

setGlobalVariableString

public static void setGlobalVariableString(javax.servlet.http.HttpSession httpSession,
                                           String gvName,
                                           String gvValue)
Deprecated. Use setGlobalVariableString(ISession, String, String) instead.

This method allows the addition of a non-indexed shared Global Variable to a client session.
This method will not execute if the objects passed in are null, or the httpSession is not a valid client identifier.

Parameters:
httpSession - HttpSession
gvName - the new shared Global Variable name
gvValue - the new shared Global Variable value

setGlobalVariableString

public static void setGlobalVariableString(String id,
                                           String gvName,
                                           String gvValue)
This method allows addition of a non-indexed shared Global Variable to a client session.
This method will not execute if the objects passed in are null, or the id String is not a valid client identifier.

Parameters:
id - String typically HttpSession.getId() or whatever identifier string was used in creating the client
gvName - the new shared Global Variable name
gvValue - the new shared Global Variable value

process

public static void process(javax.servlet.http.HttpServletRequest req)
Deprecated. Use process(IRequest) instead.

When the input page is generated for an IO, the parameters matching to Global Variables are added as hidden input fields.
Specifically, the hidden input fields have a name matching the value of HATSGV and a value of the name of the Global Variable.
There are input fields in the input IO page that have the same name as the global variable and a value.
When the input page is submitted to the output IO page, this data becomes HttpServletRequest parameters.
This method is used to accept those Global Variables into an output page prior to running the IO code.
The parameter values strings array for the parameters matching the HATSGV identifier are converted into the names for the Global Variables.
Each parameter identified by name identified as a Global Variable, and the parameter by that name is accessed and its value becomes the value for a new Global Variable matching the name.
If no Global Variable by that name exists, it is replaced by the Global Variable created.

Parameters:
req - The HTTP request object containing the HATSGV parameter values.

process

public static void process(IRequest req)
When the input page is generated for an IO, the parameters matching to Global Variables are added as hidden input fields.
Specifically, the hidden input fields have a name matching the value of HATSGV and a value of the name of the Global Variable.
There are input fields in the input IO page that have the same name as the global variable and a value.
When the input page is submitted to the output IO page, this data becomes IRequest parameters.
This method is used to accept those Global Variables into an output page prior to running the IO code.
The parameter values strings array for the parameters matching the HATSGV identifier are converted into the names for the Global Variables.
Each parameter identified by name identified as a Global Variable, and the parameter by that name is accessed and its value becomes the value for a new Global Variable matching the name.
If no Global Variable by that name exists, it is replaced by the Global Variable created.

Parameters:
req - The IRequest object containing the HATSGV parameter values.

removeGlobalVariable

public static void removeGlobalVariable(ISession iSession,
                                        IGlobalVariable igv)
This method removes a shared Global Variable from a client session.
This method will not execute if the objects passed in are null, or the iSession is not a valid client identifier.
This method does nothing if the specified shared Global Variable does not exist.

Parameters:
iSession - the session containing the Global Variable to be removed
igv - the IGlobalVariable to remove

removeGlobalVariable

public static void removeGlobalVariable(ISession iSession,
                                        String gvName)
This method removes a non-indexed shared Global Variable from a client session.
This method will not execute if the objects passed in are null, or the iSession is not a valid client identifier.
This method does nothing if the specified shared Global Variable name does not exist.

Parameters:
iSession - the ISession containing the Global Variable to be removed
gvName - the name of the Global Variable to remove

getGlobalVariable

public static IGlobalVariable getGlobalVariable(ISession iSession,
                                                String name)
This method returns the specified shared Global Variable from the specified client session.
This method will not execute if the objects passed in are null, or the iSession is not a valid client identifier.

Parameters:
iSession - the ISession containing the Global Variable
name - the name of the IGlobalVariable to return

setGlobalVariableString

public static void setGlobalVariableString(ISession iSession,
                                           String name,
                                           String value)
This method adds the specified shared Global Variable name/value pair to the specified client session.
This method will not execute if the objects passed in are null, or the iSession is not a valid client identifier.

Parameters:
iSession - the ISession to add the Global Variable to
name - the name of the IGlobalVariable to add
value - the value of the Global Variable being added

setGlobalVariable

public static void setGlobalVariable(ISession iSession,
                                     IGlobalVariable igv)
This method allows addition of a shared Global Variable to a client session.
This method will not actually work if the objects passed in are null, or the iSession is not a valid client identifier.

Parameters:
iSession - the ISession to add the Global Variable to
igv - the new IGlobalVariable object

HATS 7.5.1 (201005110649)