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.HostPublisher.IntegrationObject
Class HPubCommon

java.lang.Object
  extended by com.ibm.HostPublisher.IntegrationObject.HPubCommon
All Implemented Interfaces:
ECLCustomRecoListener, com.ibm.HostPublisher.IntegrationObject.HPubStartListener, Serializable, Runnable, EventListener
Direct Known Subclasses:
HPubDBAccess, HPubHostAccess

public abstract class HPubCommon
extends Object
implements com.ibm.HostPublisher.IntegrationObject.HPubStartListener, Serializable, ECLCustomRecoListener, Runnable

This is the base class of all Integration Objects.

See Also:
Serialized Form

Field Summary
static int BEAN_END_TO_CONNECTION
          This is a first or middle in chain Integration Object
static int BEAN_END_TO_POOL
          This is a last or only in chain Integration Object
static int BEAN_START_FROM_CONNECTION
          This is a middle or last in chain Integration Object
static int BEAN_START_FROM_POOL
          This is a first or only in chain Integration Object
protected static int ERT_EVENT
           
protected static int ERT_NOTHING
           
protected static int ERT_REDIRECT
           
protected static int ERT_THROW
           
 String hPubAccessHandle
           
 String hPubBeanName
          The name of the current Integration Object or EJB Access Bean
 String hPubBeanType
          Represents the type of Integration Object or EJB Access Bean.
 String hPubCompleteErrorPagePath
          Deprecated.  
 Properties hPubConnectionOverrides
          The connection overrides to apply when establishing the connection
 String hPubEndChainName
          The stop state label for the Integration Object
 int hPubEndType
          Indicates whether the Integration Object will be returned to the pool or saved for the next Integration Object in the chain
 Exception hPubErrorException
          If HPubErrorOccurred, returns the exception object that describes the error that occurred
 String hPubErrorMessage
          Returns a string containing the HATS code and message of the error that occurred; valid only if HPubErrorOccurred is non-zero
 int hPubErrorOccurred
          Returns a non-zero value when an error has occurred
 String hPubErrorPage
          Deprecated.  
 String hPubLinkKey
          The name of the key that represents the connection for the Integration Object chain
 boolean hPubSaveConnOnError
          An indicator in the Integration Object that specifies whether the connection should be destroyed if an error is detected while executing the Integration Object
 String hPubStartChainName
          The start state label for the Integration Object
 String hPubStartPoolName
          The connection pool from which the Integration Object obtained the connection from
 int hPubStartType
          Indicates whether the connection for the Integration Object was obtained from a pool or a chain
 String styleSheet
           
 String xmlData
           
 
Constructor Summary
HPubCommon()
           
 
Method Summary
 void doHPTransaction(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          This execution method runs a HATS Integration Object or EJB Access Bean from a servlet or JSP.
protected abstract  void DoTheWork()
           
 String getHPubAccessHandle()
           
 String getHPubBeanName()
          Returns the name of the current Integration Object or EJB Access Bean
 String getHPubBeanType()
          Returns the string representing the type of HATS Integration Object or EJB Access Bean.
 String getHPubConnectionOverrides()
          This method returns the connection overrides used by the IO.
 String getHPubEndChainName()
          Returns the stop state label as defined in when creating the Integration Object.
 int getHPubEndType()
          Indicates whether the Integration Object will be returned to the pool or saved for the next Integration Object in the chain
 Exception getHPubErrorException()
          Returns an exception object that describes the error that occurred; valid only if HPubErrorOccurred is non-zero.
 String getHPubErrorMessage()
          Returns a string containing the HATS code and message of the error that occurred; valid only if HPubErrorOccurred is non-zero.
 int getHPubErrorOccurred()
          Returns a non-zero value when an error has occurred
 String getHPubErrorPage()
          Deprecated. HATS uses JSP 1.1 standard error pages. See Programmer's Guide and Reference.
 String getHPubLinkKey()
          Returns the name of the key that represents the connection for the Integration Object chain.
 boolean getHPubSaveConnOnError()
          Gets whether the connection for this Integration Object should will be destroyed if an error is detected while executing the Integration Object.
 String getHPubStartChainName()
          Returns the name of the start state label as defined in when creating the Integration Object.
 String getHPubStartPoolName()
          Returns name of the connection pool from which the Integration Object acquired the connection
 int getHPubStartType()
          Indicates whether the connection for the Integration Object was obtained from a pool or a chain
 String getHPubStyleSheet()
           
 String getHPubXMLData()
           
 String getHPubXMLProperties()
          Returns an XML formatted string specifying the property names and values for this Integration Object
 String getHPubXMLProperties(String serverStyleSheet)
          Returns the output string after the specified XML stylesheet has been applied.See "Applying XML stylesheet processing to Integration Object output" in the Programmer's Guide for more information.
 boolean isTransformConn()
          This routine determines whether or not the Integration Object is using the default transformation connections defined for the HATS application.
 void processRequest()
          This execution method runs an Integration Object or EJB Access Bean in environments where there is no HttpServletRequest or HttpServletResponse (environments other than a Web module).
 void setHPubAccessHandle(String value)
           
 void setHPubConnectionOverrides(Properties overrides)
          This method sets the connection overrides to apply when establishing the host connection for the Integration Object.
 void setHPubConnectionOverrides(String overrides)
          This method sets the connection overrides to apply when establishing the host connection for the Integration Object.
 void setHPubEndChainName(String stringToBe)
          Sets the name of the end state label.
 void setHPubErrorPage(String stringToBe)
          Deprecated. HATS uses JSP 1.1 standard error pages. See Programmer's Guide and Reference.
 void setHPubLinkKey(String stringToBe)
          Sets the name of the key that represents the connection for the Integration Object chain.
 void setHPubSaveConnOnError(boolean flag)
          Sets whether the connection for this Integration Object should not be destroyed if an error is detected while executing the Integration Object.
 void setHPubStartChainName(String stringToBe)
          Sets the name of the start state label.
 void setHPubStartPoolName(String stringToBe)
          Sets the name of the connection pool from which the Integration Object will acquire the connection.
 void setHPubStyleSheet(String value)
           
 void setHPubXMLData(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.HostPublisher.IntegrationObject.HPubStartListener
hPubStartPerformed
 
Methods inherited from interface com.ibm.eNetwork.ECL.screenreco.event.ECLCustomRecoListener
DoReco
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

BEAN_START_FROM_POOL

public static final int BEAN_START_FROM_POOL
This is a first or only in chain Integration Object

See Also:
Constant Field Values

BEAN_START_FROM_CONNECTION

public static final int BEAN_START_FROM_CONNECTION
This is a middle or last in chain Integration Object

See Also:
Constant Field Values

BEAN_END_TO_POOL

public static final int BEAN_END_TO_POOL
This is a last or only in chain Integration Object

See Also:
Constant Field Values

BEAN_END_TO_CONNECTION

public static final int BEAN_END_TO_CONNECTION
This is a first or middle in chain Integration Object

See Also:
Constant Field Values

hPubStartType

public int hPubStartType
Indicates whether the connection for the Integration Object was obtained from a pool or a chain


hPubEndType

public int hPubEndType
Indicates whether the Integration Object will be returned to the pool or saved for the next Integration Object in the chain


hPubStartPoolName

public String hPubStartPoolName
The connection pool from which the Integration Object obtained the connection from


hPubConnectionOverrides

public Properties hPubConnectionOverrides
The connection overrides to apply when establishing the connection


hPubStartChainName

public String hPubStartChainName
The start state label for the Integration Object


hPubEndChainName

public String hPubEndChainName
The stop state label for the Integration Object


hPubSaveConnOnError

public boolean hPubSaveConnOnError
An indicator in the Integration Object that specifies whether the connection should be destroyed if an error is detected while executing the Integration Object


hPubErrorPage

public String hPubErrorPage
Deprecated. 

hPubCompleteErrorPagePath

public String hPubCompleteErrorPagePath
Deprecated. 

hPubErrorException

public Exception hPubErrorException
If HPubErrorOccurred, returns the exception object that describes the error that occurred


hPubErrorOccurred

public int hPubErrorOccurred
Returns a non-zero value when an error has occurred


hPubErrorMessage

public String hPubErrorMessage
Returns a string containing the HATS code and message of the error that occurred; valid only if HPubErrorOccurred is non-zero


hPubLinkKey

public String hPubLinkKey
The name of the key that represents the connection for the Integration Object chain


hPubBeanName

public String hPubBeanName
The name of the current Integration Object or EJB Access Bean


hPubBeanType

public String hPubBeanType
Represents the type of Integration Object or EJB Access Bean. Can be one of the following:

HOD The bean was created using Host Publisher Host Access or HATS Studio

DB This bean was created using Host Publisher Database Access


hPubAccessHandle

public String hPubAccessHandle

styleSheet

public String styleSheet

xmlData

public String xmlData

ERT_REDIRECT

protected static final int ERT_REDIRECT
See Also:
Constant Field Values

ERT_EVENT

protected static final int ERT_EVENT
See Also:
Constant Field Values

ERT_THROW

protected static final int ERT_THROW
See Also:
Constant Field Values

ERT_NOTHING

protected static final int ERT_NOTHING
See Also:
Constant Field Values
Constructor Detail

HPubCommon

public HPubCommon()
Method Detail

getHPubStartPoolName

public String getHPubStartPoolName()
Returns name of the connection pool from which the Integration Object acquired the connection

Returns:
the name of the connection pool

setHPubStartPoolName

public void setHPubStartPoolName(String stringToBe)
Sets the name of the connection pool from which the Integration Object will acquire the connection. If the processRequest() business method of the Integration Object is being used (for example, when the Integration Object is deployed in an EJB container or as a Web service), the pool name must be qualified with the HATS application name. For example, the pool name should be my_hats_project/main.

Parameters:
stringToBe - The name of the connection pool.

setHPubConnectionOverrides

public void setHPubConnectionOverrides(String overrides)
This method sets the connection overrides to apply when establishing the host connection for the Integration Object. The connection overrides have to be set before calling the processRequest() or doHPTransaction() business methods of the Integration Object establishing the host connection.

This method should be used with clients programs based on HATS EJB access beans or Web Services clients generated to be used with HATS web services.

When the Integration Object doHPTransaction() or processRequest() methods are called, if there are connection overrides associated with the Integration Object, a new connection pool for the Integration Object is created based on the Integration Object's connection pool and the connection overrides. The new pool name can be retrieved using the Integration Object instance method getHPubStartPoolName().

Sample code:

 
     String overrides = "LUName=LU000001,host=ralvms"; 
     ExampleIO.setHPubStartPoolName("my_project/connection");  
     ExampleIO.setHPubConnectionOverrides(overrides); 
     ExampleIO.processRequest();      
 

Parameters:
overrides - The connection overrides to be used by the IO in the format "key1=value1,key2=value2".
See Also:
HPubCommon.setHPubConnectionOverrides(Properties overrides), HPubCommon.getHPubStartPoolName()

setHPubConnectionOverrides

public void setHPubConnectionOverrides(Properties overrides)
This method sets the connection overrides to apply when establishing the host connection for the Integration Object. The connection overrides have to be set before calling the processRequest() or doHPTransaction() business methods of the Integration Object establishing the host connection.

When the Integration Object doHPTransaction() or processRequest() methods are called, if there are connection overrides associated with the Integration Object, a new connection pool for the Integration Object is created based on the Integration Object's connection pool and the connection overrides. The new pool name can be retrieved using the Integration Object instance method getHPubStartPoolName().

Sample code:

 
    java.util.Properties overrides = new java.util.Properties(); 
    overrides.setProperty("LUName", "LU000001"); 
    ExampleIO.setHPubConnectionOverrides(overrides); 
    ExampleIO.doHPTransaction(request,response);     
 

Parameters:
overrides - The connection overrides to be used by the IO.
See Also:
HPubCommon.setHPubConnectionOverrides(String overrides), HPubCommon.getHPubStartPoolName()

getHPubConnectionOverrides

public String getHPubConnectionOverrides()
This method returns the connection overrides used by the IO.

Returns:
The connection overrides in the format "key1=value1, key2=value2" or an empty string.
See Also:
HPubCommon.setHPubConnectionOverrides(String overrides)

getHPubStartChainName

public String getHPubStartChainName()
Returns the name of the start state label as defined in when creating the Integration Object. This value is Null for the first Integration Object in a chain or an Integration Object that is not chained.

Returns:
the name of the start state label

setHPubStartChainName

public void setHPubStartChainName(String stringToBe)
Sets the name of the start state label. This value is Null for the first Integration Object in a chain or an Integration Object that is not chained.

Parameters:
stringToBe - The name of the start state label.

getHPubEndChainName

public String getHPubEndChainName()
Returns the stop state label as defined in when creating the Integration Object. This value is Null for the last Integration Object in a chain or an Integration Object that is not chained.

Returns:
the stop state label

setHPubEndChainName

public void setHPubEndChainName(String stringToBe)
Sets the name of the end state label. This value is Null for the first Integration Object in a chain or an Integration Object that is not chained.

Parameters:
stringToBe - the name of the end state label

getHPubLinkKey

public String getHPubLinkKey()
Returns the name of the key that represents the connection for the Integration Object chain. This value should be obtained from the first Integration Object in a chain after the Integration Object has run in a non-Web container.

Returns:
the name of the key

setHPubLinkKey

public void setHPubLinkKey(String stringToBe)
Sets the name of the key that represents the connection for the Integration Object chain. This value should be set for any chained Integration Objects, other than the first Integration Object in the chain, before they run in a non-Web container.

Parameters:
stringToBe - Sets the name of the key that represents the connection

getHPubBeanName

public String getHPubBeanName()
Returns the name of the current Integration Object or EJB Access Bean

Returns:
the name

getHPubErrorPage

public String getHPubErrorPage()
Deprecated. HATS uses JSP 1.1 standard error pages. See Programmer's Guide and Reference.


setHPubErrorPage

public void setHPubErrorPage(String stringToBe)
Deprecated. HATS uses JSP 1.1 standard error pages. See Programmer's Guide and Reference.


getHPubSaveConnOnError

public boolean getHPubSaveConnOnError()
Gets whether the connection for this Integration Object should will be destroyed if an error is detected while executing the Integration Object.

Returns:
whether the connection will be destoyed

setHPubSaveConnOnError

public void setHPubSaveConnOnError(boolean flag)
Sets whether the connection for this Integration Object should not be destroyed if an error is detected while executing the Integration Object. If true, the connection should be saved so that it can be passed to the HATS entry servlet and a default transformation can be applied. The method should be used in combination with the predefined AdvancedIOErrorPage.jsp. Note that the connection can be transformed only if it was obtained from the default connection pool. This method cannot be used with EJB Access Beans or HATS Web services support.

Parameters:
flag -

getHPubStartType

public int getHPubStartType()
Indicates whether the connection for the Integration Object was obtained from a pool or a chain

Returns:
hPubStartType

getHPubEndType

public int getHPubEndType()
Indicates whether the Integration Object will be returned to the pool or saved for the next Integration Object in the chain

Returns:
hPubEndType

getHPubErrorOccurred

public int getHPubErrorOccurred()
Returns a non-zero value when an error has occurred

Returns:
error value

getHPubErrorMessage

public String getHPubErrorMessage()
Returns a string containing the HATS code and message of the error that occurred; valid only if HPubErrorOccurred is non-zero.

Returns:
a string containing the HATS code and message of the error that occurred

getHPubErrorException

public Exception getHPubErrorException()
Returns an exception object that describes the error that occurred; valid only if HPubErrorOccurred is non-zero. This property is not contained in the io_name_Output_Properties class generated by HATS Web services support because parameters of type java.lang.Exception cannot be serialized over SOAP.

Returns:
an exception object

getHPubBeanType

public String getHPubBeanType()
Returns the string representing the type of HATS Integration Object or EJB Access Bean.

Returns:
the string representing the type of HATS Integration Object or EJB Access Bean. The string can be one of the following:

HOD This bean was created using the HATS Host Terminal.

DB This bean was created using Host Publisher Database Access.


DoTheWork

protected abstract void DoTheWork()

doHPTransaction

public void doHPTransaction(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse resp)
                     throws BeanException
This execution method runs a HATS Integration Object or EJB Access Bean from a servlet or JSP. If you use this method, you can run chained Integration Objects without additional programming to chain Integration Objects.

Parameters:
req - HttpServletRequest object
resp - HttpServletResponase object
Throws:
BeanException

processRequest

public void processRequest()
                    throws BeanException
This execution method runs an Integration Object or EJB Access Bean in environments where there is no HttpServletRequest or HttpServletResponse (environments other than a Web module). To run chained Integration Objects using this method, you have to do additional programming to manage the HPubLinkKey. Please see the Programmer's Guide for more information on Integration Object Chaining

Throws:
BeanException

getHPubXMLProperties

public String getHPubXMLProperties(String serverStyleSheet)
Returns the output string after the specified XML stylesheet has been applied.See "Applying XML stylesheet processing to Integration Object output" in the Programmer's Guide for more information.

Parameters:
serverStyleSheet - XML stylesheet to be applied to the XML formatted Integration Object output.
Returns:
The output string after the specified XML stylesheet has been applied.

getHPubXMLProperties

public String getHPubXMLProperties()
Returns an XML formatted string specifying the property names and values for this Integration Object

Returns:
XML formatted string

isTransformConn

public boolean isTransformConn()
This routine determines whether or not the Integration Object is using the default transformation connections defined for the HATS application.

Returns:
A boolean value indicating whether or not the Integration Object is using the default transformation connections defined for the HATS application.

getHPubAccessHandle

public String getHPubAccessHandle()

setHPubAccessHandle

public void setHPubAccessHandle(String value)

getHPubStyleSheet

public String getHPubStyleSheet()

setHPubStyleSheet

public void setHPubStyleSheet(String value)

getHPubXMLData

public String getHPubXMLData()

setHPubXMLData

public void setHPubXMLData(String value)

HATS 7.5.1 (201005110649)