com.wrq.apptrieve.appconn
Class AppConnSession

java.lang.Object
  extended by com.wrq.apptrieve.appconn.AppConnSession
All Implemented Interfaces:
AppConnAidKey, AppConnChannel, AppConnModel, AppConnTable, AppConnTerm
Direct Known Subclasses:
AppConnRejuvenationSession

public class AppConnSession
extends java.lang.Object
implements AppConnChannel, AppConnModel, AppConnTerm, AppConnTable

AppConnSession is the primary class used to communicate with the Host Integrator Server.


Field Summary
protected  java.util.ResourceBundle doEngBundle
          For internal use.
protected  java.util.ResourceBundle doLocBundle
          For internal use.
protected  RemoteHostChannel remoteChannel
          For internal use.
protected  AppConnServerAgent serverAgent
          For internal use.
protected  java.util.Locale sessionLocale
          For internal use.
 
Fields inherited from interface com.wrq.apptrieve.appconn.AppConnChannel
LOG_ALL_MESSAGES, LOG_ERRORS, LOG_WARNINGS_AND_ERRORS, SessionType3270, SessionType5250, SessionTypeHP, SessionTypeUnknown, SessionTypeVT
 
Fields inherited from interface com.wrq.apptrieve.appconn.AppConnModel
ScrollEnd, ScrollHome, ScrollLineDown, ScrollLineUp, ScrollPageDown, ScrollPageUp, SyncToHost
 
Fields inherited from interface com.wrq.apptrieve.appconn.AppConnAidKey
HP_ACK_Key, HP_BackSpace_Key, HP_BackTab_Key, HP_BEL_Key, HP_Break_Key, HP_BS_Key, HP_CAN_Key, HP_ClearDisplay_Key, HP_ClearLine_Key, HP_ConfigKeys_Key, HP_CR_Key, HP_CTRLA_Key, HP_CTRLB_Key, HP_CTRLBACKSLASH_Key, HP_CTRLC_Key, HP_CTRLCARET_Key, HP_CTRLD_Key, HP_CTRLE_Key, HP_CTRLF_Key, HP_CTRLG_Key, HP_CTRLH_Key, HP_CTRLI_Key, HP_CTRLJ_Key, HP_CTRLK_Key, HP_CTRLL_Key, HP_CTRLLEFTBRACKET_Key, HP_CTRLM_Key, HP_CTRLN_Key, HP_CTRLO_Key, HP_CTRLP_Key, HP_CTRLQ_Key, HP_CTRLR_Key, HP_CTRLRIGHTBRACKET_Key, HP_CTRLS_Key, HP_CTRLSPACE_Key, HP_CTRLT_Key, HP_CTRLU_Key, HP_CTRLUNDERBAR_Key, HP_CTRLV_Key, HP_CTRLW_Key, HP_CTRLX_Key, HP_CTRLY_Key, HP_CTRLZ_Key, HP_DC1_Key, HP_DC2_Key, HP_DC3_Key, HP_DC4_Key, HP_Delete_Key, HP_DeleteChar_Key, HP_DeleteCharWrap_Key, HP_DeleteLine_Key, HP_DLE_Key, HP_Down_Key, HP_EM_Key, HP_ENQ_Key, HP_Enter_Key, HP_EOT_Key, HP_Esc_Key, HP_Escape_Key, HP_ETB_Key, HP_ETX_Key, HP_Extend_Key, HP_F1_Key, HP_F2_Key, HP_F3_Key, HP_F4_Key, HP_F5_Key, HP_F6_Key, HP_F7_Key, HP_F8_Key, HP_FF_Key, HP_FS_Key, HP_GS_Key, HP_HardReset_Key, HP_HomeDown_Key, HP_HomeLeft_Key, HP_HomeRight_Key, HP_HomeUp_Key, HP_HT_Key, HP_InsertChar_Key, HP_InsertCharWrap_Key, HP_InsertLine_Key, HP_Left_Key, HP_LF_Key, HP_Menu_Key, HP_Modes_Key, HP_NAK_Key, HP_NextPage_Key, HP_NUL_Key, HP_PrevPage_Key, HP_Return_Key, HP_Right_Key, HP_RollLeft_Key, HP_RollRight_Key, HP_RS_Key, HP_ScrollDown_Key, HP_ScrollUp_Key, HP_Select_Key, HP_SI_Key, HP_SmartEnter_Key, HP_SO_Key, HP_SoftReset_Key, HP_SOH_Key, HP_Stop_Key, HP_STX_Key, HP_SUB_Key, HP_SYN_Key, HP_System_Key, HP_Tab_Key, HP_Up_Key, HP_US_Key, HP_User_Key, HP_UserCfg_Key, HP_VT_Key, IBM_AltCursor_Key, IBM_Attn_Key, IBM_AU1_Key, IBM_AU10_Key, IBM_AU11_Key, IBM_AU12_Key, IBM_AU13_Key, IBM_AU14_Key, IBM_AU15_Key, IBM_AU16_Key, IBM_AU2_Key, IBM_AU3_Key, IBM_AU4_Key, IBM_AU5_Key, IBM_AU6_Key, IBM_AU7_Key, IBM_AU8_Key, IBM_AU9_Key, IBM_BackSpace_Key, IBM_BackTab_Key, IBM_CentSymbol_Key, IBM_Clear_Key, IBM_ClearPartition_Key, IBM_CursorBlink_Key, IBM_CursorSelect_Key, IBM_Delete_Key, IBM_DeleteChar_Key, IBM_DeleteWord_Key, IBM_DestrBackSpace_Key, IBM_DeviceCancel_Key, IBM_Down_Key, IBM_DownDouble_Key, IBM_Dup_Key, IBM_Duplicate_Key, IBM_EndOfField_Key, IBM_Enter_Key, IBM_EraseEOF_Key, IBM_EraseInput_Key, IBM_ExtGR_Key, IBM_F1_Key, IBM_F10_Key, IBM_F11_Key, IBM_F12_Key, IBM_F13_Key, IBM_F14_Key, IBM_F15_Key, IBM_F16_Key, IBM_F17_Key, IBM_F18_Key, IBM_F19_Key, IBM_F2_Key, IBM_F20_Key, IBM_F21_Key, IBM_F22_Key, IBM_F23_Key, IBM_F24_Key, IBM_F3_Key, IBM_F4_Key, IBM_F5_Key, IBM_F6_Key, IBM_F7_Key, IBM_F8_Key, IBM_F9_Key, IBM_FieldDelim_Key, IBM_FieldExit_Key, IBM_FieldMark_Key, IBM_FieldMinus_Key, IBM_FieldPlus_Key, IBM_Help_Key, IBM_Hex_Key, IBM_Home_Key, IBM_Ident_Key, IBM_Insert_Key, IBM_KeyClick_Key, IBM_Left, IBM_LeftDouble_Key, IBM_NewLine_Key, IBM_NextWord_Key, IBM_NotSymbol_Key, IBM_PA1_Key, IBM_PA2_Key, IBM_PA3_Key, IBM_PageDown_Key, IBM_PageUp_Key, IBM_PanLeft_Key, IBM_PanRight_Key, IBM_PartitionJump_Key, IBM_PF1_Key, IBM_PF10_Key, IBM_PF11_Key, IBM_PF12_Key, IBM_PF13_Key, IBM_PF14_Key, IBM_PF15_Key, IBM_PF16_Key, IBM_PF17_Key, IBM_PF18_Key, IBM_PF19_Key, IBM_PF2_Key, IBM_PF20_Key, IBM_PF21_Key, IBM_PF22_Key, IBM_PF23_Key, IBM_PF24_Key, IBM_PF3_Key, IBM_PF4_Key, IBM_PF5_Key, IBM_PF6_Key, IBM_PF7_Key, IBM_PF8_Key, IBM_PF9_Key, IBM_PlusCR_Key, IBM_Print_Key, IBM_PrintPart_Key, IBM_Reset_Key, IBM_Right_Key, IBM_RightDouble_Key, IBM_RollDown_Key, IBM_RollUp_Key, IBM_Rule_Key, IBM_ScrollDown_Key, IBM_ScrollUp_Key, IBM_SLPAutoEnter_Key, IBM_SOSIGenerate_Key, IBM_SplitVBar_Key, IBM_SysRequest_Key, IBM_Tab_Key, IBM_Test_Key, IBM_Up_Key, IBM_UpDouble_Key, VT_0_Key, VT_1_Key, VT_2_Key, VT_3_Key, VT_4_Key, VT_5_Key, VT_6_Key, VT_7_Key, VT_8_Key, VT_9_Key, VT_ACK_Key, VT_BEL_Key, VT_Break_Key, VT_BS_Key, VT_BSP_Key, VT_CAN_Key, VT_Compose_Key, VT_CR_Key, VT_CTRLA_Key, VT_CTRLB_Key, VT_CTRLBACKSLASH_Key, VT_CTRLC_Key, VT_CTRLCARET_Key, VT_CTRLD_Key, VT_CTRLE_Key, VT_CTRLF_Key, VT_CTRLG_Key, VT_CTRLH_Key, VT_CTRLJ_Key, VT_CTRLK_Key, VT_CTRLL_Key, VT_CTRLM_Key, VT_CTRLN_Key, VT_CTRLO_Key, VT_CTRLP_Key, VT_CTRLQ_Key, VT_CTRLR_Key, VT_CTRLRIGHTBRACKET_Key, VT_CTRLS_Key, VT_CTRLSPACE_Key, VT_CTRLT_Key, VT_CTRLU_Key, VT_CTRLUNDERBAR_Key, VT_CTRLV_Key, VT_CTRLW_Key, VT_CTRLX_Key, VT_CTRLY_Key, VT_CTRLZ_Key, VT_CursD_Key, VT_CursL_Key, VT_CursR_Key, VT_CursU_Key, VT_DC1_Key, VT_DC2_Key, VT_DC3_Key, VT_DC4_Key, VT_Decimal_Key, VT_Del_Key, VT_Disconnect_Key, VT_DLE_Key, VT_EM_Key, VT_ENQ_Key, VT_Enter_Key, VT_EOT_Key, VT_Esc_Key, VT_ETB_Key, VT_ETX_Key, VT_F10_Key, VT_F11_Key, VT_F12_Key, VT_F13_Key, VT_F14_Key, VT_F15_Key, VT_F16_Key, VT_F17_Key, VT_F18_Key, VT_F19_Key, VT_F20_Key, VT_F6_Key, VT_F7_Key, VT_F8_Key, VT_F9_Key, VT_FF_Key, VT_Find_Key, VT_FS_Key, VT_GS_Key, VT_HoldScreen_Key, VT_HoldScreenClear_Key, VT_HoldScreenSet_Key, VT_Ins_Key, VT_KP0_Key, VT_KP1_Key, VT_KP2_Key, VT_KP3_Key, VT_KP4_Key, VT_KP5_Key, VT_KP6_Key, VT_KP7_Key, VT_KP8_Key, VT_KP9_Key, VT_KPComma_Key, VT_KPDot_Key, VT_KPMinus_Key, VT_LF_Key, VT_NAK_Key, VT_NextPage_Key, VT_NextScr_Key, VT_NUL_Key, VT_PF1_Key, VT_PF2_Key, VT_PF3_Key, VT_PF4_Key, VT_PrevPage_Key, VT_PrevScr_Key, VT_PrtD_Key, VT_Remove_Key, VT_Retrn_Key, VT_RS_Key, VT_ScrollDown_Key, VT_ScrollUp_Key, VT_Select_Key, VT_SendNull_Key, VT_SI_Key, VT_SO_Key, VT_SOH_Key, VT_Stop_Key, VT_STX_Key, VT_SUB_Key, VT_SYN_Key, VT_Tab_Key, VT_UDK10_Key, VT_UDK11_Key, VT_UDK12_Key, VT_UDK13_Key, VT_UDK14_Key, VT_UDK15_Key, VT_UDK16_Key, VT_UDK17_Key, VT_UDK18_Key, VT_UDK19_Key, VT_UDK20_Key, VT_UDK6_Key, VT_UDK7_Key, VT_UDK8_Key, VT_UDK9_Key, VT_US_Key, VT_VT_Key, VT_XAb_Key
 
Constructor Summary
AppConnSession()
          Constructor of the AppConnSession class.
 
Method Summary
 void connectToModel(java.lang.String server, java.lang.String modelName, java.lang.String userid, java.lang.String password, java.util.Map modelVariables)
          Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified model.
 void connectToModelViaDomain(java.lang.String directoryServer, java.lang.String domain, java.lang.String modelName, java.lang.String userid, java.lang.String password, java.util.Map modelVariables)
          Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified model.
 void connectToSession(java.lang.String server, java.lang.String session, java.lang.String userid, java.lang.String password, java.util.Map modelVariables)
          Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified session pool.
 void connectToSessionViaDomain(java.lang.String directoryServer, java.lang.String domain, java.lang.String session, java.lang.String userid, java.lang.String password, java.util.Map modelVariables)
          Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified session pool.
 void disconnect()
          Disconnects from a Host Integrator Server Session.
 void disconnect(int reserved)
          Disconnects from a Host Integrator Server Session.
 void enableTerminalAttributes(boolean enable)
          Enables or disables the availability of terminal attributes when retrieving attribute or field data from the Host Integrator server.
 AppConnRecordSet executeSQLStatement(java.lang.String sqlStatement)
          Executes an SQL statement on a table defined in the model.
 AppConnRecordSet executeSQLStatement(java.lang.String sqlStatement, int maxRows)
          Executes an SQL statement on a table defined in the model.
 AppConnRecordSet fetchRecords(int maxRows, java.util.List fieldNames, java.lang.String filterExpression)
          Fetches up to max rows of data from the Host Integrator Server for the current recordset of the current entity.
 java.lang.String getAttributeAtCursor()
          Gets the name of the attribute at the current cursor position.
 java.util.List getAttributeLocations(java.util.List attributeNames)
          Gets a collection of ElementLocation objects for attributes of the current entity.
 AttributeMetaData getAttributeMetaData(java.lang.String entityName, java.lang.String attributeName)
          Gets metadata associated with an attribute.
 AppConnModelRecord getAttributes(java.util.List attributeNames)
          Gets the attributes of the current entity.
 ColumnMetaData getColumnMetaData(java.lang.String tableName, java.lang.String columnName)
          Gets metadata associated with a table column.
 int getConnectionTimeout()
          Gets the connection timeout for a Host Integrator Server session.
 java.lang.String getCurrentEntity()
          Gets the current entity (screen) of the legacy application.
 AppConnModelRecord getCurrentRecord()
          Fetches the current record in the current recordset.
 int getCurrentRecordIndex()
          Gets the index number of the current record in the current recordset.
 java.lang.String getCurrentRecordSetName()
          Gets the name of the current recordset.
 java.util.List getEntityAttributes(java.lang.String entityName)
          Gets the attribute names of an entity in the Host Integrator model.
 java.lang.String getEntityDescription(java.lang.String entityName)
          Gets the description for an entity in the Host Integrator model.
 java.util.List getEntityOperations(java.lang.String entityName)
          Gets the operation names of an entity in the Host Integrator model.
 java.util.List getEntityRecordSets(java.lang.String entityName)
          Gets the names of the recordsets for an entity in the Host Integrator model.
 java.util.List getFieldLocations(java.util.List fieldNames)
          Gets a collection of ElementLocation objects for fields of the current record in the current recordset of the current entity.
 FieldMetaData getFieldMetaData(java.lang.String entityName, java.lang.String recordSetName, java.lang.String fieldName)
          Gets metadata associated with a recordset field.
 java.lang.String getHomeEntityName()
          Gets the name of the home entity for the Host Integrator model.
 int getLastRequestID()
          Gets an integer identifier for the most recent request performed against the current Host Integrator Server session.
 java.util.Locale getLocale()
          Gets the locale for an AppConn session.
 int getLoggingLevel()
          Gets the logging level for the current session of the Host Integrator server.
 int getMajorVersion()
          Gets major version number for the AppConn connector.
 int getMethodTimeout()
          Gets the method timeout for a Host Integrator Server session.
 int getMinorVersion()
          Gets minor version number for the AppConn connector.
 java.util.List getModelEntities()
          Gets the entity names of the Host Integrator model.
 java.lang.String getModelName()
          Gets the name of the Host Integrator model for the current session.
 java.util.List getModelVariableNames()
          Gets the names of all model variables in the Host Integrator model.
 java.util.Map getModelVariables()
          Gets the values of model variables in the Host Integrator model.
 java.lang.String getModelVersionString()
          Gets the version of the model.
 OperationMetaData getOperationMetaData(java.lang.String entityName, java.lang.String operationName)
          Gets metadata associated with an operation.
 java.util.List getPatternLocations(java.util.List patternNames)
          Gets a collection of ElementLocation objects for patterns of the current entity.
 ProcedureMetaData getProcedureMetaData(java.lang.String tableName, java.lang.String procedureName)
          Gets metadata associated with a table procedure.
 java.util.List getRecordSetLocations(java.util.List recordSetNames)
          Gets a collection of ElementLocation objects for recordSets of the current entity.
 RecordSetMetaData getRecordSetMetaData(java.lang.String entityName, java.lang.String recordSetName)
          Gets metadata associated with a recordset.
 java.lang.String getServerName()
          Gets the name of the Host Integrator Server for the current session.
 int getSessionID()
          Returns an integer representing the session ID returned during the last connection attempt to the Verastream server.
 int getSessionType()
          Gets the terminal emulation type of the host session that is supported by the model specified in the connect call for this session.
 java.lang.String getStringAtCursor(int length)
          Gets a string of the given length from the current entity on the Host Integrator server starting at the current cursor position.
 java.lang.String getStringAtOffset(int offset, int length)
          Gets a string of the given length from the current entity on the Host Integrator server starting at an offset.
 java.lang.String getStringAtRowColumn(int topRow, int leftColumn, int numRows, int numColumns)
          Gets a string from a rectangular region of the current entity on the Host Integrator server starting at a given row and column.
 java.util.List getTableColumns(java.lang.String tableName)
          Gets the column names of a table in the Host Integrator model.
 java.lang.String getTableDescription(java.lang.String tableName)
          Gets the description for a table in the Host Integrator model.
 java.util.List getTableNames()
          Gets the table names in the Host Integrator model.
 java.util.List getTableProcedures(java.lang.String tableName)
          Gets the procedures names for a table in the Host Integrator model.
 TerminalField getTerminalFieldAtCursor()
          Gets a TerminalField object that gives information about the terminal field at the current cursor position on the Host Integrator server.
 VariableMetaData getVariableMetaData(java.lang.String variableName)
          Gets metadata associated with a variable.
 java.lang.String getVersionString()
          Gets version string for the AppConn connector.
 void insertRecord(java.util.Map record)
          Performs the insert operation for the current recordset.
 void insertRecords(java.util.List records)
          Performs the insert operation for the current recordset multiple times.
 void insertStringAtCursor(java.lang.String string)
          Inserts a string into the current entity on the Host Integrator server starting at the current cursor position.
 void insertStringAtOffset(java.lang.String string, int offset)
          Inserts a string into the current entity on the Host Integrator server starting at an offset.
 void insertStringAtRowColumn(java.lang.String string, int rowNum, int columnNum)
          Inserts a string into the current entity on the Host Integrator server starting at the given row and column.
 boolean isConnected()
          Determines whether the Host Integrator Server session is connected.
 boolean isConnectionSecure()
          Determines whether the Host Integrator Server session is using a secure connection.
 boolean isMetaDataOnly()
          Determines whether the Host Integrator Server session is configured to only return model meta-data for this connection.
protected  java.lang.String localizeError(java.util.ResourceBundle rb, java.lang.String key, java.lang.Object[] args)
          For internal use only.
 void moveCurrentRecordIndex(int movement)
          Moves the current record index to a new position in the current recordset.
 AppConnModelRecord nextRecord(java.lang.String filterExpression)
          Finds and return a record in the current recordset using a filter expression.
 void performAidKey(int key)
          Enters an aid key (for example, a Program Function key) into the current Host Integrator server session.
 void performEntityOperation(java.lang.String operationName)
          Performs an operation on the current entity.
 AppConnRecordSet performTableProcedure(java.lang.String tableName, java.lang.String procedureName, java.util.Map dataInputValues, java.util.Map filterValues, boolean filterIsCaseSensitive, java.util.List outputColumnNames, int maxRows)
          Performs a procedure on a table defined in the model.
 java.lang.String processString(java.lang.String inStr)
          Calls the ProcessString event handler on the server.
 void requireSecureConnection(boolean require)
          Requires a secure channel on the next connection to a Host Integrator Server.
 void resumeConnection(java.lang.String connectionToken)
          Resumes the execution of a currently suspended Host Integrator server session.
 void selectCurrentRecord()
          Performs the selection operation for the current recordset.
 boolean selectRecordByFilter(java.lang.String filterExpression)
          Finds a record in the current recordset using a filter expression and perform its selection operation.
 boolean selectRecordByIndex(int index)
          Performs its selection operation on a record in the current recordset.
 void setAttributes(java.util.Map attributes)
          Sets the attributes in the current entity.
 void setAttributesDelayed(java.util.Map attributes, java.lang.String entityName)
          Sets the attributes of an entity.
 void setConnectionTimeout(int timeout)
          Sets the connection timeout for a Host Integrator Server session.
 void setCurrentEntity(java.lang.String entityName)
          Sets the current entity.
 boolean setCurrentRecordIndex(int index)
          Changes the index number of the current record in the current recordset.
 void setCurrentRecordSetByName(java.lang.String recordSetName)
          Sets the current recordset by name.
 void setLocale(java.util.Locale locale)
          Sets the locale for an AppConn session.
 void setLoggingLevel(int level)
          Sets the logging level for the current session of the Host Integrator server.
 void setMetaDataOnly(boolean enable)
          Elect to make a metadata-only connection.
 void setMethodTimeout(int timeout)
          Sets the method timeout for a Host Integrator Server session.
 void setModelVariables(java.util.Map variables)
          Sets the values of variables in the Host Integrator model.
 java.lang.String suspendConnection(int timeout)
          Suspends the execution of a currently running Host Integrator Server session.
 void updateCurrentRecord(java.util.Map record)
          Changes the values of the current record in the current recordset.
 boolean updateRecordByFilter(java.util.Map record, java.lang.String filterExpression)
          Changes the values of a record in the current recordset.
 boolean updateRecordByIndex(java.util.Map record, int index)
          Changes the values of a record in the current recordset.
 int updateRecords(java.util.Map record, java.lang.String filterExpression)
          Changes the values of records in the current recordset.
 void waitForCondition(int timeout, java.lang.String expression, java.lang.String entityName)
          Waits for an expression to become true for an entity on the Host Integrator server.
 void waitForCursor(int rowNum, int columnNum, int timeout)
          Waits for the presence of the terminal cursor at a particular terminal screen offset.
 void waitForEntityChange(java.lang.String entityName, int timeout)
          Waits for the recognition of a new entity that is not 'entityName'.
 void waitForString(java.lang.String string, int rowNum, int columnNum, int timeout)
          Waits for the presence of a string starting at a particular terminal screen row and column.
 void waitForStringRelCursor(java.lang.String string, int rowOffset, int columnOffset, int timeout)
          Waits for the presence of a string relative to the current terminal screen cursor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

remoteChannel

protected RemoteHostChannel remoteChannel
For internal use.


serverAgent

protected AppConnServerAgent serverAgent
For internal use.


sessionLocale

protected java.util.Locale sessionLocale
For internal use.


doEngBundle

protected java.util.ResourceBundle doEngBundle
For internal use.


doLocBundle

protected java.util.ResourceBundle doLocBundle
For internal use.

Constructor Detail

AppConnSession

public AppConnSession()
Constructor of the AppConnSession class.

Method Detail

connectToModel

public void connectToModel(java.lang.String server,
                           java.lang.String modelName,
                           java.lang.String userid,
                           java.lang.String password,
                           java.util.Map modelVariables)
                    throws AppConnException,
                           ApptrieveException
Description copied from interface: AppConnChannel

Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified model.

Reasons for failure include:

  1. There are no Host Integrator servers running.
  2. Invalid server name or IP address.
  3. Invalid model name.
  4. Invalid userID and/or password.
  5. Already connected to a Host Integrator server.

The parameters userID and password are used by Host Integrator Server if the security option is ON.

Specified by:
connectToModel in interface AppConnChannel
Parameters:
server - java.lang.String - Name of the Host Integrator Server (DNS Name or IP Address)
modelName - java.lang.String - Name of a Host Integrator model
userid - java.lang.String - User ID for authorization on the Host Integrator Server
password - java.lang.String - Password for authorization on the Host Integrator Server
modelVariables - java.util.Map - Model variables to set on connection (can be null)
Throws:
AppConnException - if there is a parameter error
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.suspendConnection(int), AppConnChannel.resumeConnection(java.lang.String), AppConnChannel.disconnect()

connectToModelViaDomain

public void connectToModelViaDomain(java.lang.String directoryServer,
                                    java.lang.String domain,
                                    java.lang.String modelName,
                                    java.lang.String userid,
                                    java.lang.String password,
                                    java.util.Map modelVariables)
                             throws AppConnException,
                                    ApptrieveException
Description copied from interface: AppConnChannel

Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified model. The connection is made using the specified AADS Server and Host Integrator Domain.

Reasons for failure include:

    Can’t locate Host Integrator Domain Server.
  1. Invalid model name.
  2. Invalid userID and/or password.
  3. Already connected to a Host Integrator session.

The parameters userID and password are used by Host Integrator Server if the security option is ON.

Specified by:
connectToModelViaDomain in interface AppConnChannel
Parameters:
directoryServer - java.lang.String - Name of the Host Integrator authentication and authorization directory server (AADS)
domain - java.lang.String - Name of the Host Integrator domain to connect to
modelName - java.lang.String - Name of a Host Integrator Model
userid - java.lang.String - User ID for authorization on the Host Integrator Server
password - java.lang.String - Password for authorization on the Host Integrator Server
modelVariables - java.util.Map - model variables to set on connection (can be null)
Throws:
AppConnException - if there is a parameter error
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.connectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.suspendConnection(int), AppConnChannel.resumeConnection(java.lang.String), AppConnChannel.disconnect()

connectToSession

public void connectToSession(java.lang.String server,
                             java.lang.String session,
                             java.lang.String userid,
                             java.lang.String password,
                             java.util.Map modelVariables)
                      throws AppConnException,
                             ApptrieveException
Description copied from interface: AppConnChannel

Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified session pool.

Reasons for failure include:

  1. Host Integrator server is not running.
  2. Invalid server name or IP address.
  3. Invalid session name.
  4. Invalid userID and/or password.

The parameters userID and password are used by Host Integrator Server if the security option is enabled.

Specified by:
connectToSession in interface AppConnChannel
Parameters:
server - java.lang.String - Name of the Host Integrator Server (DNS Name or IP Address)
session - java.lang.String - Name of Host Integrator session pool
userid - java.lang.String - User ID for authorization on the Host Integrator Server
password - java.lang.String - Password for authorization on the Host Integrator Server
modelVariables - java.util.Map - model variables to set on connection (can be null)
Throws:
AppConnException - if there is a parameter error
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.connectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.suspendConnection(int), AppConnChannel.resumeConnection(java.lang.String), AppConnChannel.disconnect()

connectToSessionViaDomain

public void connectToSessionViaDomain(java.lang.String directoryServer,
                                      java.lang.String domain,
                                      java.lang.String session,
                                      java.lang.String userid,
                                      java.lang.String password,
                                      java.util.Map modelVariables)
                               throws AppConnException,
                                      ApptrieveException
Description copied from interface: AppConnChannel

Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified session pool. The connection is made using the specified AADS Server and Host Integrator Domain.

Reasons for failure include:

  1. Can't locate Host Integrator AADS Server.
  2. Can’t locate Host Integrator Domain Server.
  3. Invalid session name.
  4. Invalid userID and/or password.

The parameters userID and password are used by Host Integrator Server if the security option is on.

Specified by:
connectToSessionViaDomain in interface AppConnChannel
Parameters:
directoryServer - java.lang.String - Name of the Host Integrator authentication and authorization directory server (AADS)
domain - java.lang.String - Name of the Host Integrator domain to connect to
session - java.lang.String - Name of a Host Integrator session pool
userid - java.lang.String - User ID for authorization on the Host Integrator Server
password - java.lang.String - Password for authorization on the Host Integrator Server
modelVariables - java.util.Map - Model variables to set on connection (can be null)
Throws:
AppConnException - if there is a parameter error
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.connectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.suspendConnection(int), AppConnChannel.resumeConnection(java.lang.String), AppConnChannel.disconnect()

disconnect

public void disconnect()
Description copied from interface: AppConnChannel

Disconnects from a Host Integrator Server Session.

Reasons for failure include:

  1. Server session has not been established.

Specified by:
disconnect in interface AppConnChannel
See Also:
AppConnChannel.connectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.suspendConnection(int), AppConnChannel.resumeConnection(java.lang.String)

disconnect

public void disconnect(int reserved)
Description copied from interface: AppConnChannel

Disconnects from a Host Integrator Server Session.

Reasons for failure include:

  1. Server session has not been established.

Specified by:
disconnect in interface AppConnChannel
Parameters:
reserved - int - reserved parameter, should always be set to zero
See Also:
AppConnChannel.connectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.suspendConnection(int), AppConnChannel.resumeConnection(java.lang.String)

getLastRequestID

public int getLastRequestID()
Description copied from interface: AppConnChannel

Gets an integer identifier for the most recent request performed against the current Host Integrator Server session.

If a server request has not yet been performed in the current session, this method returns 0.

Specified by:
getLastRequestID in interface AppConnChannel
Returns:
int - the ID of the most recent request to the Host Integrator server

getLocale

public java.util.Locale getLocale()
Description copied from interface: AppConnChannel
Gets the locale for an AppConn session.

Specified by:
getLocale in interface AppConnChannel
Returns:
Locale - the current local for the AppConn session.
See Also:
AppConnChannel.setLocale(java.util.Locale)

getLoggingLevel

public int getLoggingLevel()
                    throws ApptrieveException
Description copied from interface: AppConnChannel

Gets the logging level for the current session of the Host Integrator server.

Valid logging levels are:

Specified by:
getLoggingLevel in interface AppConnChannel
Returns:
int - the current logging level
Throws:
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.setLoggingLevel(int)

getMajorVersion

public int getMajorVersion()
Description copied from interface: AppConnChannel

Gets major version number for the AppConn connector.

Specified by:
getMajorVersion in interface AppConnChannel
Returns:
int - the major version number

getMethodTimeout

public int getMethodTimeout()
Description copied from interface: AppConnChannel

Gets the method timeout for a Host Integrator Server session.

Specified by:
getMethodTimeout in interface AppConnChannel
Returns:
int - the current timeout in milliseconds
See Also:
AppConnChannel.setMethodTimeout(int)

getConnectionTimeout

public int getConnectionTimeout()
Description copied from interface: AppConnChannel

Gets the connection timeout for a Host Integrator Server session.

Specified by:
getConnectionTimeout in interface AppConnChannel
Returns:
int - the current timeout in seconds
See Also:
AppConnChannel.setConnectionTimeout(int)

getMinorVersion

public int getMinorVersion()
Description copied from interface: AppConnChannel

Gets minor version number for the AppConn connector.

Specified by:
getMinorVersion in interface AppConnChannel
Returns:
int - the minor version number

getModelName

public java.lang.String getModelName()
Description copied from interface: AppConnChannel
Gets the name of the Host Integrator model for the current session.

If a session is not active, this method returns null.

Specified by:
getModelName in interface AppConnChannel
Returns:
java.lang.String - the name of the current Host Integrator model

getServerName

public java.lang.String getServerName()
Description copied from interface: AppConnChannel
Gets the name of the Host Integrator Server for the current session.

If a session is not active, this method returns null.

Specified by:
getServerName in interface AppConnChannel
Returns:
java.lang.String - the name if the Host Integrator server

getSessionID

public int getSessionID()
Description copied from interface: AppConnChannel
Returns an integer representing the session ID returned during the last connection attempt to the Verastream server.

Specified by:
getSessionID in interface AppConnChannel
Returns:
session ID or -1 if no connection has been made.

getVersionString

public java.lang.String getVersionString()
Description copied from interface: AppConnChannel
Gets version string for the AppConn connector. This string is of the form "majorVersion.minorVersion".

Specified by:
getVersionString in interface AppConnChannel
Returns:
String - the version string

isConnected

public boolean isConnected()
Description copied from interface: AppConnChannel
Determines whether the Host Integrator Server session is connected.

The return value is true if AppConnSession believes it is currently connected to a Host Integrator server session. This method does not actually perform a server operation to determine whether connection is present. It is possible for the connection to have been lost without the connector detecting it. In this case isConnected() will return true, even though a connection is not present.

Specified by:
isConnected in interface AppConnChannel
Returns:
boolean - true if connected
See Also:
AppConnChannel.connectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map), AppConnChannel.suspendConnection(int), AppConnChannel.resumeConnection(java.lang.String), AppConnChannel.disconnect()

isConnectionSecure

public boolean isConnectionSecure()
Description copied from interface: AppConnChannel

Determines whether the Host Integrator Server session is using a secure connection.

Specified by:
isConnectionSecure in interface AppConnChannel
Returns:
boolean - true if the connection is secure, false otherwise

requireSecureConnection

public void requireSecureConnection(boolean require)
Description copied from interface: AppConnChannel

Requires a secure channel on the next connection to a Host Integrator Server. This method has no effect on the current Host Integrator session if one is already established. If the setting is false, then AppConnChannel does not require a secure connection. In this case, the server security setting takes precedence. If the setting is true, AppConnChannel will force a secure connection, even though the server setting is not set to require a secure channel.

Note: this call affects only subsequent connections to a Host Integrator Server.

Specified by:
requireSecureConnection in interface AppConnChannel
Parameters:
require - boolean - set to true to require a secure connection, false otherwise

resumeConnection

public void resumeConnection(java.lang.String connectionToken)
                      throws ApptrieveException
Description copied from interface: AppConnChannel

Resumes the execution of a currently suspended Host Integrator server session. If the requested session is already running, this method does nothing.

Reasons for failure include:

  1. Server session has not been established.
  2. Server session is no longer present.

Specified by:
resumeConnection in interface AppConnChannel
Parameters:
connectionToken - String - the token received from the suspendConnection method
Throws:
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.suspendConnection(int)

setLocale

public void setLocale(java.util.Locale locale)
               throws AppConnException,
                      java.util.MissingResourceException
Description copied from interface: AppConnChannel

Sets the locale for an AppConn session.

Specified by:
setLocale in interface AppConnChannel
Parameters:
locale - Locale - the Locale to use for the AppConn session.
Throws:
java.util.MissingResourceException - if the resource file for the locale cannot be found
AppConnException
See Also:
AppConnChannel.getLocale()

setLoggingLevel

public void setLoggingLevel(int level)
                     throws ApptrieveException,
                            AppConnException
Description copied from interface: AppConnChannel

Sets the logging level for the current session of the Host Integrator server.

This overrides the global logging level for that server and lasts until changed or until disconnection. This is intended primarily for debugging, allowing a larger class of messages to be logged by a single session without required the global logging level to be changed for the Host Integrator server. This method cannot set the logging level to one that is lower than the server's logging level configuration.

Valid logging levels are:

Specified by:
setLoggingLevel in interface AppConnChannel
Parameters:
level - - the logging level to use for the AppConn session.
Throws:
AppConnException - if there is a parameter error
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.getLoggingLevel()

setMethodTimeout

public void setMethodTimeout(int timeout)
                      throws ApptrieveException
Description copied from interface: AppConnChannel

Sets the method timeout for a Host Integrator Server session.

Reasons for failure include:

  1. Negative timeout value.

Specified by:
setMethodTimeout in interface AppConnChannel
Parameters:
timeout - int - The timeout period in milliseconds
Throws:
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.getMethodTimeout()

setConnectionTimeout

public void setConnectionTimeout(int timeout)
Description copied from interface: AppConnChannel

Sets the connection timeout for a Host Integrator Server session.

This method is useful, for example, if the server is temporarily unable to allow any more sessions, or if the domain load has been reached. Connection attempt information, including the number of connection attempts and the time of those attempts, is written to the log.

The default value is 30 seconds.

Specified by:
setConnectionTimeout in interface AppConnChannel
Parameters:
timeout - int - The timeout period in seconds
See Also:
AppConnChannel.getConnectionTimeout()

suspendConnection

public java.lang.String suspendConnection(int timeout)
                                   throws ApptrieveException
Description copied from interface: AppConnChannel

Suspends the execution of a currently running Host Integrator Server session. On successful suspension, the methods returns a token to be used when resuming the session. If the current session is already suspended, this method does nothing. The suspended session automatically terminates if it is not resumed before the specified timeout period elapses.

Reasons for failure include:

  1. Server session has not been established.
  2. Current server session cannot be suspended.

Specified by:
suspendConnection in interface AppConnChannel
Parameters:
timeout - int - the timeout value to use for the suspended session in minutes. This value must greater than zero.
Returns:
String - the String that contains the connection token for this session. This is used in resumeSession method to re-establish the connection.
Throws:
ApptrieveException - if a Host Integrator server error occurs
See Also:
AppConnChannel.resumeConnection(java.lang.String)

setMetaDataOnly

public void setMetaDataOnly(boolean enable)
                     throws ChannelException
Description copied from interface: AppConnChannel
Elect to make a metadata-only connection. The connection can be used to obtain information about the model, such as the names of entities and procedures, but it cannot be used to make a connection to the host. A connection made after setting this value to true will not be counted against session or session pool limits on the session server.

This method can only be invoked while not connected.

Specified by:
setMetaDataOnly in interface AppConnChannel
Parameters:
enable - indicating that this will be as a meta-data only session.
Throws:
ChannelException - If the session is already connected.
See Also:
AppConnChannel.isMetaDataOnly(), MetaDataOnlyException

isMetaDataOnly

public boolean isMetaDataOnly()
Description copied from interface: AppConnChannel
Determines whether the Host Integrator Server session is configured to only return model meta-data for this connection.

Specified by:
isMetaDataOnly in interface AppConnChannel
Returns:
true if this is a meta-data only connection.
See Also:
AppConnChannel.setMetaDataOnly(boolean), MetaDataOnlyException

getModelVersionString

public java.lang.String getModelVersionString()
Description copied from interface: AppConnChannel
Gets the version of the model. The string returned uniquely identifies the version of the model deployed to the VHI server.

Specified by:
getModelVersionString in interface AppConnChannel
Returns:
String - the version string

getSessionType

public int getSessionType()
Description copied from interface: AppConnChannel
Gets the terminal emulation type of the host session that is supported by the model specified in the connect call for this session.

Return values are:

Specified by:
getSessionType in interface AppConnChannel
Returns:
A constant representing the terminal type of the host session.

getHomeEntityName

public java.lang.String getHomeEntityName()
Description copied from interface: AppConnModel
Gets the name of the home entity for the Host Integrator model.

Specified by:
getHomeEntityName in interface AppConnModel
Returns:
java.lang.String - The name of the home entity. For rejuvenation sessions employing models without entities, this method will return the string "<None>"

waitForEntityChange

public void waitForEntityChange(java.lang.String entityName,
                                int timeout)
                         throws ApptrieveException
Description copied from interface: AppConnModel

Waits for the recognition of a new entity that is not 'entityName'.

If entityName is null or empty, the method returns upon recognition of any new entity. Exception occurs if timeout period elapses before the Host Integrator Server recognizes a new entity.

Specified by:
waitForEntityChange in interface AppConnModel
Parameters:
entityName - java.lang.String - the name of the entity that cannot satisfy the entity change condition, typically the entity that was current when the method is called.
timeout - int - the timeout period in seconds
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.performAidKey(int)

getPatternLocations

public java.util.List getPatternLocations(java.util.List patternNames)
                                   throws ApptrieveException
Description copied from interface: AppConnModel

Gets a collection of ElementLocation objects for patterns of the current entity. If patternNames is null, getPatternLocations will return ElementLocation objects for all patterns of the entity.

Specified by:
getPatternLocations in interface AppConnModel
Parameters:
patternNames - java.util.List - List of pattern names to use in getting locations
Returns:
java.util.List - a List of ElementLocation objects, one for each pattern
Throws:
ApptrieveException - - if a Host Integrator server error occurs

getAttributeLocations

public java.util.List getAttributeLocations(java.util.List attributeNames)
                                     throws ApptrieveException
Description copied from interface: AppConnModel

Gets a collection of ElementLocation objects for attributes of the current entity. If attributeNames is null, getAttributeLocations will return ElementLocation objects for all attributes of the entity.

Specified by:
getAttributeLocations in interface AppConnModel
Parameters:
attributeNames - java.util.List - List of attribute names to use in getting locations
Returns:
java.util.List - a List of ElementLocation objects, one for each attribute
Throws:
ApptrieveException - - if a Host Integrator server error occurs

getRecordSetLocations

public java.util.List getRecordSetLocations(java.util.List recordSetNames)
                                     throws ApptrieveException
Description copied from interface: AppConnModel

Gets a collection of ElementLocation objects for recordSets of the current entity. If recordSetNames is null, getRecordSetLocations will return ElementLocation objects for all recordSets of the entity.

Specified by:
getRecordSetLocations in interface AppConnModel
Parameters:
recordSetNames - java.util.List - List of recordset names to use in getting locations
Returns:
java.util.List - a List of ElementLocation objects, one for each recordset
Throws:
ApptrieveException - - if a Host Integrator server error occurs

getFieldLocations

public java.util.List getFieldLocations(java.util.List fieldNames)
                                 throws ApptrieveException
Description copied from interface: AppConnModel

Gets a collection of ElementLocation objects for fields of the current record in the current recordset of the current entity. If fieldNames is null, getFieldLocations will return ElementLocation objects for all fields of the current record in the current recordset.

Field objects are always considered to be "linear". The ElementLocation object regionType will always be returned as REGION_TYPE_LINEAR.

This method is guaranteed to work correctly only when a record in the recordset is selected. If no record is selected:

Specified by:
getFieldLocations in interface AppConnModel
Parameters:
fieldNames - java.util.List - List of field names to use in getting locations
Returns:
java.util.List - a List of ElementLocation objects, one for each field
Throws:
ApptrieveException - - if a Host Integrator server error occurs

getAttributeAtCursor

public java.lang.String getAttributeAtCursor()
                                      throws ApptrieveException
Description copied from interface: AppConnModel

Gets the name of the attribute at the current cursor position. Returns an empty string if the cursor is not currently within one of the defined entity attributes.

Specified by:
getAttributeAtCursor in interface AppConnModel
Returns:
java.lang.String - the attribute name
Throws:
ApptrieveException - - if a Host Integrator server error occurs

getTerminalFieldAtCursor

public TerminalField getTerminalFieldAtCursor()
                                       throws ApptrieveException
Description copied from interface: AppConnTerm

Gets a TerminalField object that gives information about the terminal field at the current cursor position on the Host Integrator server.

Reasons for failure include:

  1. Server session has not been established.

Specified by:
getTerminalFieldAtCursor in interface AppConnTerm
Returns:
com.wrq.apptrieve.appconn.TerminalField - the terminal field information
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModelRecord.getTerminalAttributes(java.lang.String)

fetchRecords

public AppConnRecordSet fetchRecords(int maxRows,
                                     java.util.List fieldNames,
                                     java.lang.String filterExpression)
                              throws ApptrieveException
Description copied from interface: AppConnModel
Fetches up to max rows of data from the Host Integrator Server for the current recordset of the current entity. If the number of rows to fetch is specified as 0 then the number of rows that will be returned is unlimited. The set of records returned begins with the first record following the current record. If the current record is before the first record in the recordset, searching starts with the first record.

For fetchRecords, the current record is the last record included in returned set of records.

If attributeNames is null, fetchRecords will return all fields for each record.

Specified by:
fetchRecords in interface AppConnModel
Parameters:
maxRows - int - The maximum number of rows that will be fetch
fieldNames - java.util.List - List of the field names to fetch from the entity
filterExpression - java.lang.String - An expression that qualifies the records to fetch
Returns:
com.wrq.apptrieve.appconn.AppConnRecordSet - the resulting records fetched from the Host Integrator server. If no records match the filterExpression, the method returns an AppConnRecordSet object containing no records.
Throws:
ApptrieveException - - if a Host Integrator server error occurs

getCurrentRecord

public AppConnModelRecord getCurrentRecord()
                                    throws ApptrieveException
Description copied from interface: AppConnModel

Fetches the current record in the current recordset.

Specified by:
getCurrentRecord in interface AppConnModel
Returns:
AppConnModelRecord - the current record. If there is no current record, the method returns an AppConnModelRecord object that has no data values and has the index number set to -1.
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.nextRecord(java.lang.String), AppConnModel.setCurrentRecordIndex(int), AppConnModel.getCurrentRecordIndex()

nextRecord

public AppConnModelRecord nextRecord(java.lang.String filterExpression)
                              throws ApptrieveException
Description copied from interface: AppConnModel
Finds and return a record in the current recordset using a filter expression. See AppConnModel for filter expression syntax.

Searching starts with the record following the current record. If the current record is before the first record in the recordset, searching starts with the first record.

Specified by:
nextRecord in interface AppConnModel
Parameters:
filterExpression - java.lang.String - An expression that qualifies the record to find. (null matches any record)
Returns:
AppConnModelRecord - the first record that matches the filterExpression. If no record matches the filterExpression, the method returns an AppConnModelRecord object that has no data values and has the index number set to -1.
Throws:
ApptrieveException - - if a Host Integrator server error occurs

getAttributeMetaData

public AttributeMetaData getAttributeMetaData(java.lang.String entityName,
                                              java.lang.String attributeName)
                                       throws AppConnException,
                                              ApptrieveException
Description copied from interface: AppConnModel

Gets metadata associated with an attribute.

Specified by:
getAttributeMetaData in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
attributeName - java.lang.String - Name of the attribute of the entity in the Host Integrator model
Returns:
com.wrq.apptrieve.appconn.AttributeMetaData - the metadata object for the entity attribute
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getEntityAttributes

public java.util.List getEntityAttributes(java.lang.String entityName)
                                   throws AppConnException,
                                          ApptrieveException
Description copied from interface: AppConnModel

Gets the attribute names of an entity in the Host Integrator model.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid entity name.

Specified by:
getEntityAttributes in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
Returns:
java.util.List - a List of Strings, one for each attribute in the specified entity
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getModelEntities()

getEntityDescription

public java.lang.String getEntityDescription(java.lang.String entityName)
                                      throws AppConnException,
                                             ApptrieveException
Description copied from interface: AppConnModel

Gets the description for an entity in the Host Integrator model.

Specified by:
getEntityDescription in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
Returns:
java.lang.String - The description string for the entity
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getEntityOperations

public java.util.List getEntityOperations(java.lang.String entityName)
                                   throws AppConnException,
                                          ApptrieveException
Description copied from interface: AppConnModel

Gets the operation names of an entity in the Host Integrator model.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid entity name.

Specified by:
getEntityOperations in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
Returns:
java.util.List - a List of Strings, one for each operation
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getModelEntities()

getEntityRecordSets

public java.util.List getEntityRecordSets(java.lang.String entityName)
                                   throws AppConnException,
                                          ApptrieveException
Description copied from interface: AppConnModel

Gets the names of the recordsets for an entity in the Host Integrator model.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid entity name.

Specified by:
getEntityRecordSets in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
Returns:
java.util.List - a List of Strings, one for each recordset
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getModelEntities()

getFieldMetaData

public FieldMetaData getFieldMetaData(java.lang.String entityName,
                                      java.lang.String recordSetName,
                                      java.lang.String fieldName)
                               throws AppConnException,
                                      ApptrieveException
Description copied from interface: AppConnModel

Gets metadata associated with a recordset field.

Specified by:
getFieldMetaData in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
recordSetName - java.lang.String - Name of the recordset of the entity in the Host Integrator model
fieldName - java.lang.String - Name of the field of the recordset in the Host Integrator model
Returns:
com.wrq.apptrieve.appconn.FieldMetaData - a metadata object for the specified field
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getModelEntities

public java.util.List getModelEntities()
                                throws ApptrieveException
Description copied from interface: AppConnModel
Gets the entity names of the Host Integrator model.

Reasons for failure include:

  1. Server session has not been established.

Specified by:
getModelEntities in interface AppConnModel
Returns:
java.util.List - a List of Strings, one for each entity in the model
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getCurrentEntity()

getModelVariables

public java.util.Map getModelVariables()
                                throws ApptrieveException
Description copied from interface: AppConnModel

Gets the values of model variables in the Host Integrator model.

Reasons for failure include:

  1. Server session has not been established.

Specified by:
getModelVariables in interface AppConnModel
Returns:
java.util.Map - a Map of model variable name/value pairs
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.setModelVariables(java.util.Map), AppConnModel.getModelVariableNames()

getOperationMetaData

public OperationMetaData getOperationMetaData(java.lang.String entityName,
                                              java.lang.String operationName)
                                       throws AppConnException,
                                              ApptrieveException
Description copied from interface: AppConnModel

Gets metadata associated with an operation.

Specified by:
getOperationMetaData in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
operationName - java.lang.String - Name of the attribute of the entity in the Host Integrator model
Returns:
com.wrq.apptrieve.appconn.OperationMetaData - a metadata object for the specified operation
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getRecordSetMetaData

public RecordSetMetaData getRecordSetMetaData(java.lang.String entityName,
                                              java.lang.String recordSetName)
                                       throws AppConnException,
                                              ApptrieveException
Description copied from interface: AppConnModel

Gets metadata associated with a recordset.

Specified by:
getRecordSetMetaData in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
recordSetName - java.lang.String - Name of the recordset of the entity in the Host Integrator model
Returns:
com.wrq.apptrieve.appconn.RecordSetMetaData - a metadata object for the specified recordset
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getVariableMetaData

public VariableMetaData getVariableMetaData(java.lang.String variableName)
                                     throws AppConnException,
                                            ApptrieveException
Description copied from interface: AppConnModel

Gets metadata associated with a variable.

Specified by:
getVariableMetaData in interface AppConnModel
Parameters:
variableName - java.lang.String - Name of a variable in the Host Integrator model
Returns:
com.wrq.apptrieve.appconn.VariableMetaData - a metadata object for the specified model variable
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getModelVariableNames

public java.util.List getModelVariableNames()
                                     throws ApptrieveException
Description copied from interface: AppConnModel

Gets the names of all model variables in the Host Integrator model.

Reasons for failure include:

  1. Server session has not been established.

Specified by:
getModelVariableNames in interface AppConnModel
Returns:
java.util.List - a List of model variable names
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getModelVariables(), AppConnModel.setModelVariables(java.util.Map)

processString

public java.lang.String processString(java.lang.String inStr)
                               throws ApptrieveException
Description copied from interface: AppConnModel

Calls the ProcessString event handler on the server.

Specified by:
processString in interface AppConnModel
Parameters:
inStr - - String input to the ProcessString event
Returns:
String - the processed String
Throws:
ApptrieveException - - if a Host Integrator server error occurs

enableTerminalAttributes

public void enableTerminalAttributes(boolean enable)
Description copied from interface: AppConnModel

Enables or disables the availability of terminal attributes when retrieving attribute or field data from the Host Integrator server. This method applies to subsequent getAttributes or fetchRecord method calls. Attributes are only retrieved if they are enabled at run-time with this method call and enabled in the model file for the entity or recordset.

Specified by:
enableTerminalAttributes in interface AppConnModel
Parameters:
enable - boolean - Set to true to enable terminal attribute retrieval

getAttributes

public AppConnModelRecord getAttributes(java.util.List attributeNames)
                                 throws ApptrieveException
Description copied from interface: AppConnModel

Gets the attributes of the current entity. If attributeNames is null, getAttributes will return all attributes of the entity.

Specified by:
getAttributes in interface AppConnModel
Parameters:
attributeNames - java.util.List - List of attribute names to get from the entity
Returns:
com.wrq.apptrieve.appconn.AppConnModelRecord - the attributes of the entity
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.setAttributes(java.util.Map), AppConnModel.setAttributesDelayed(java.util.Map, java.lang.String)

getCurrentEntity

public java.lang.String getCurrentEntity()
                                  throws ApptrieveException
Description copied from interface: AppConnModel

Gets the current entity (screen) of the legacy application.

Reasons for failure include:

  1. Server session has not been established.

Specified by:
getCurrentEntity in interface AppConnModel
Returns:
java.lang.String
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.setCurrentEntity(java.lang.String)

getCurrentRecordIndex

public int getCurrentRecordIndex()
                          throws ApptrieveException
Description copied from interface: AppConnModel
Gets the index number of the current record in the current recordset.

Specified by:
getCurrentRecordIndex in interface AppConnModel
Returns:
int - the index of the current record
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.setCurrentRecordIndex(int), AppConnModel.getCurrentRecord()

getCurrentRecordSetName

public java.lang.String getCurrentRecordSetName()
                                         throws ApptrieveException
Description copied from interface: AppConnModel
Gets the name of the current recordset.

Specified by:
getCurrentRecordSetName in interface AppConnModel
Returns:
String - the name of the current recordset
Throws:
ApptrieveException - - if there is no current recordset for

insertRecord

public void insertRecord(java.util.Map record)
                  throws AppConnException,
                         ApptrieveException
Description copied from interface: AppConnModel

Performs the insert operation for the current recordset.

Specified by:
insertRecord in interface AppConnModel
Parameters:
record - java.util.Map - A map containing name-value pairs for the record elements to insert
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

insertRecords

public void insertRecords(java.util.List records)
                   throws AppConnException,
                          ApptrieveException
Description copied from interface: AppConnModel

Performs the insert operation for the current recordset multiple times.

This method sends the complete list of records to insert to the server at one time, making insertion of multiple records more efficient than the insertRecord method.

Specified by:
insertRecords in interface AppConnModel
Parameters:
records - - a List of java.util.Map objects, one for record to insert into the entity. Each map object contains a set of name-value pairs for the record elements
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.insertRecord(java.util.Map)

moveCurrentRecordIndex

public void moveCurrentRecordIndex(int movement)
                            throws ApptrieveException
Description copied from interface: AppConnModel

Moves the current record index to a new position in the current recordset.

The movementCode can be one of the following AppConnModel fields:

Specified by:
moveCurrentRecordIndex in interface AppConnModel
Parameters:
movement - int - The type of movement to perform
Throws:
ApptrieveException - - if a Host Integrator server error occurs

performEntityOperation

public void performEntityOperation(java.lang.String operationName)
                            throws AppConnException,
                                   ApptrieveException
Description copied from interface: AppConnModel

Performs an operation on the current entity.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid operation.

Specified by:
performEntityOperation in interface AppConnModel
Parameters:
operationName - java.lang.String - The operation name
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.setCurrentEntity(java.lang.String), AppConnModel.getCurrentEntity(), AppConnModel.getEntityOperations(java.lang.String)

selectCurrentRecord

public void selectCurrentRecord()
                         throws ApptrieveException
Description copied from interface: AppConnModel

Performs the selection operation for the current recordset.

Specified by:
selectCurrentRecord in interface AppConnModel
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.nextRecord(java.lang.String), AppConnModel.setCurrentRecordIndex(int), AppConnModel.selectRecordByFilter(java.lang.String), AppConnModel.selectRecordByIndex(int)

selectRecordByFilter

public boolean selectRecordByFilter(java.lang.String filterExpression)
                             throws ApptrieveException
Description copied from interface: AppConnModel

Finds a record in the current recordset using a filter expression and perform its selection operation. See AppConnModel for filter expression syntax.

Searching starts with the record following the current record. If the current record is before the first record in the recordset, searching starts with the first record.

Specified by:
selectRecordByFilter in interface AppConnModel
Parameters:
filterExpression - java.lang.String - An expression that qualifies the record to find. (null matches any record)
Returns:
boolean - true if the selection succeeds, false if the method fails to find a record to select
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.selectCurrentRecord(), AppConnModel.selectRecordByIndex(int)

selectRecordByIndex

public boolean selectRecordByIndex(int index)
                            throws ApptrieveException
Description copied from interface: AppConnModel

Performs its selection operation on a record in the current recordset. The record to select is selected by the provided index number.

Specified by:
selectRecordByIndex in interface AppConnModel
Parameters:
index - int - The index of the record to select
Returns:
boolean - true if the selection succeeds, false if a record is not found to select
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.selectCurrentRecord(), AppConnModel.selectRecordByFilter(java.lang.String)

setAttributes

public void setAttributes(java.util.Map attributes)
                   throws ApptrieveException
Description copied from interface: AppConnModel
Sets the attributes in the current entity. The map will contain attributes (name/value pairs) that are to be inserted in the entity.

The map does not need to contain all of the attributes for the entity, but should contain all of the required attributes for the entity.

Specified by:
setAttributes in interface AppConnModel
Parameters:
attributes - java.util.Map - A map containing attributes (name/value pairs)
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.setAttributesDelayed(java.util.Map, java.lang.String), AppConnModel.getAttributes(java.util.List)

setAttributesDelayed

public void setAttributesDelayed(java.util.Map attributes,
                                 java.lang.String entityName)
                          throws AppConnException,
                                 ApptrieveException
Description copied from interface: AppConnModel

Sets the attributes of an entity.

The map contains attributes (name/value pairs) that are to be set in the entity. The map does not need to contain all of the attributes for the entity, but should contain all of the required attributes for the entity. If the entity is not specified then the current entity is used.

Specified by:
setAttributesDelayed in interface AppConnModel
Parameters:
attributes - java.util.Map - A map containing attributes (name/value pairs)
entityName - java.lang.String - Name of the entity in the Host Integrator model
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.setCurrentEntity(java.lang.String), AppConnModel.getCurrentEntity(), AppConnModel.fetchRecords(int, java.util.List, java.lang.String), AppConnModel.setAttributes(java.util.Map)

setCurrentEntity

public void setCurrentEntity(java.lang.String entityName)
                      throws AppConnException,
                             ApptrieveException
Description copied from interface: AppConnModel

Sets the current entity.

The legacy application will traverse to the screen that corresponds to that entity.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid entity name.
  3. No traversal path to entity.

Specified by:
setCurrentEntity in interface AppConnModel
Parameters:
entityName - java.lang.String - Name of the entity in the Host Integrator model
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getCurrentEntity()

setCurrentRecordIndex

public boolean setCurrentRecordIndex(int index)
                              throws ApptrieveException
Description copied from interface: AppConnModel

Changes the index number of the current record in the current recordset.

To force the current record to be the current host record, use the AppConnModel field AppConnModel.SyncToHost, which has a value of -1, as the index parameter.

Specified by:
setCurrentRecordIndex in interface AppConnModel
Parameters:
index - int - The index of the record to make current
Returns:
boolean - true if the current record was changed to the corresponding to index, false if not
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getCurrentRecordIndex(), AppConnModel.getCurrentRecord()

setCurrentRecordSetByName

public void setCurrentRecordSetByName(java.lang.String recordSetName)
                               throws AppConnException,
                                      ApptrieveException
Description copied from interface: AppConnModel

Sets the current recordset by name. This is only needed if there is more than one recordset for the current entity.

Specified by:
setCurrentRecordSetByName in interface AppConnModel
Parameters:
recordSetName - java.lang.String - The name of the recordset to make current
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getCurrentRecordSetName()

setModelVariables

public void setModelVariables(java.util.Map variables)
                       throws ApptrieveException
Description copied from interface: AppConnModel

Sets the values of variables in the Host Integrator model.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid variable name.

Specified by:
setModelVariables in interface AppConnModel
Parameters:
variables - java.util.Map - A collection of name/value pairs for the variables
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.getModelVariables(), AppConnModel.getModelVariableNames()

waitForCondition

public void waitForCondition(int timeout,
                             java.lang.String expression,
                             java.lang.String entityName)
                      throws ApptrieveException
Description copied from interface: AppConnModel

Waits for an expression to become true for an entity on the Host Integrator server.

If the expression is empty or null, this method waits until the Host Integrator server has recognized the entity specified in the entityName parameter. If the entityName parameter is empty or null, the method waits until the expression is true for the current entity. An exception occurs if timeout period elapses before the expression becomes true.

Specified by:
waitForCondition in interface AppConnModel
Parameters:
timeout - int - the timeout period in seconds
expression - java.lang.String - the expression to wait for
entityName - java.lang.String - the name of the entity to use as the context for the expression.
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.performAidKey(int)

updateCurrentRecord

public void updateCurrentRecord(java.util.Map record)
                         throws AppConnException,
                                ApptrieveException
Description copied from interface: AppConnModel

Changes the values of the current record in the current recordset.

Specified by:
updateCurrentRecord in interface AppConnModel
Parameters:
record - java.util.Map - A map containing name-value pairs for the record elements to change
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.updateRecordByFilter(java.util.Map, java.lang.String), AppConnModel.updateRecordByIndex(java.util.Map, int), AppConnModel.updateRecords(java.util.Map, java.lang.String)

updateRecordByFilter

public boolean updateRecordByFilter(java.util.Map record,
                                    java.lang.String filterExpression)
                             throws AppConnException,
                                    ApptrieveException
Description copied from interface: AppConnModel

Changes the values of a record in the current recordset. The record to change is the first one after the current record that satisfies the filter expression. See AppConnModel for filter expression syntax.

Specified by:
updateRecordByFilter in interface AppConnModel
Parameters:
record - java.util.Map - A map containing name-value pairs for the record elements to change
filterExpression - java.lang.String - An expression that qualifies the record to update. (null matches any record)
Returns:
boolean - true if a record was found to update and the Host Integrator server performed the record update, otherwise false
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.updateCurrentRecord(java.util.Map), AppConnModel.updateRecordByIndex(java.util.Map, int), AppConnModel.updateRecords(java.util.Map, java.lang.String)

updateRecordByIndex

public boolean updateRecordByIndex(java.util.Map record,
                                   int index)
                            throws AppConnException,
                                   ApptrieveException
Description copied from interface: AppConnModel

Changes the values of a record in the current recordset. The record to change is selected by the provided index number.

Specified by:
updateRecordByIndex in interface AppConnModel
Parameters:
record - java.util.Map - A map containing name-value pairs for the record elements to change
index - int - The index of the record to update
Returns:
boolean - true if the Host Integrator server performed the record update, false otherwise
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.updateCurrentRecord(java.util.Map), AppConnModel.updateRecordByFilter(java.util.Map, java.lang.String), AppConnModel.updateRecords(java.util.Map, java.lang.String)

updateRecords

public int updateRecords(java.util.Map record,
                         java.lang.String filterExpression)
                  throws AppConnException,
                         ApptrieveException
Description copied from interface: AppConnModel

Changes the values of records in the current recordset.

The records to change those after the current record that satisfy the filter expression. All same set of changes are applied to all records that satisfy the filterExpression. See AppConnModel for filter expression syntax.

To apply changes to all records in a recordset that match the filter, the current record must be before the first record of the recordset. This is the case upon navigating to the model entity that contains the recordset. If other methods have be executed that change the current record index, reposition to before the first record using setCurrentRecordIndex(), moveCurrentRecordIndex() or by navigating away from the current entity and then back again.

Specified by:
updateRecords in interface AppConnModel
Parameters:
record - java.util.Map - A map containing name-value pairs for the record elements to change
filterExpression - java.lang.String - An expression that qualifies the records to update. (null matches all records)
Returns:
int - the number of records for which the Host Integrator server performed a record update.
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnModel.updateCurrentRecord(java.util.Map), AppConnModel.updateRecordByFilter(java.util.Map, java.lang.String), AppConnModel.updateRecordByIndex(java.util.Map, int)

performTableProcedure

public AppConnRecordSet performTableProcedure(java.lang.String tableName,
                                              java.lang.String procedureName,
                                              java.util.Map dataInputValues,
                                              java.util.Map filterValues,
                                              boolean filterIsCaseSensitive,
                                              java.util.List outputColumnNames,
                                              int maxRows)
                                       throws AppConnException,
                                              ApptrieveException
Description copied from interface: AppConnTable
Performs a procedure on a table defined in the model.

Specified by:
performTableProcedure in interface AppConnTable
Parameters:
tableName - java.lang.String - Name of the table on which to perform the procedure
procedureName - java.lang.String - Name of the table procedure to perform
dataInputValues - java.util.Map - Set of data input column name-value pairs to use
filterValues - java.util.Map - Set of filter column name-value pairs to use
filterIsCaseSensitive - boolean - set to true to make the filter comparison case sensitive, false for case insensitive.
outputColumnNames - java.util.List - List of the table's column names to return as output
maxRows - int - The maximum number of rows that will be returned
Returns:
com.wrq.apptrieve.appconn.AppConnRecordSet - the result of performing the table procedure. If no data are retrieved as the result of performing the table procedure, the method returns an AppConnRecordSet object containing no records.
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

executeSQLStatement

public AppConnRecordSet executeSQLStatement(java.lang.String sqlStatement,
                                            int maxRows)
                                     throws AppConnException,
                                            ApptrieveException
Description copied from interface: AppConnTable
Executes an SQL statement on a table defined in the model.

Specified by:
executeSQLStatement in interface AppConnTable
Parameters:
sqlStatement - java.lang.String - The SQL statement to execute
maxRows - Maximum number of rows to return, or zero to return all rows.
Returns:
com.wrq.apptrieve.appconn.AppConnRecordSet - the results of the query execution. If no data are retrieved as the result of executing the SQL statement, the method returns an AppConnRecordSet object containing no records.
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

executeSQLStatement

public AppConnRecordSet executeSQLStatement(java.lang.String sqlStatement)
                                     throws AppConnException,
                                            ApptrieveException
Description copied from interface: AppConnTable
Executes an SQL statement on a table defined in the model.

Specified by:
executeSQLStatement in interface AppConnTable
Parameters:
sqlStatement - java.lang.String - The SQL statement to execute
Returns:
com.wrq.apptrieve.appconn.AppConnRecordSet - the results of the query execution. If no data are retrieved as the result of executing the SQL statement, the method returns an AppConnRecordSet object containing no records.
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getColumnMetaData

public ColumnMetaData getColumnMetaData(java.lang.String tableName,
                                        java.lang.String columnName)
                                 throws AppConnException,
                                        ApptrieveException
Description copied from interface: AppConnTable
Gets metadata associated with a table column.

Specified by:
getColumnMetaData in interface AppConnTable
Parameters:
tableName - java.lang.String - Name of the table in the Host Integrator model
columnName - java.lang.String - Name of the column of the table in the Host Integrator model
Returns:
com.wrq.apptrieve.ColumnMetaData - Column metadata object
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getProcedureMetaData

public ProcedureMetaData getProcedureMetaData(java.lang.String tableName,
                                              java.lang.String procedureName)
                                       throws AppConnException,
                                              ApptrieveException
Description copied from interface: AppConnTable
Gets metadata associated with a table procedure.

Specified by:
getProcedureMetaData in interface AppConnTable
Parameters:
tableName - java.lang.String - Name of the table in the Host Integrator model
procedureName - java.lang.String - Name of the procedure of the table in the Host Integrator model
Returns:
com.wrq.apptrieve.ProcedureMetaData - Procedure metadata object
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getTableColumns

public java.util.List getTableColumns(java.lang.String tableName)
                               throws AppConnException,
                                      ApptrieveException
Description copied from interface: AppConnTable
Gets the column names of a table in the Host Integrator model.

Specified by:
getTableColumns in interface AppConnTable
Parameters:
tableName - java.lang.String - Name of the table in the Host Integrator model
Returns:
java.util.List - Column names for the table (Strings)
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getTableDescription

public java.lang.String getTableDescription(java.lang.String tableName)
                                     throws AppConnException,
                                            ApptrieveException
Description copied from interface: AppConnTable
Gets the description for a table in the Host Integrator model.

Specified by:
getTableDescription in interface AppConnTable
Parameters:
tableName - java.lang.String - Name of the table in the Host Integrator model
Returns:
java.lang.String - The description for the table
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getTableNames

public java.util.List getTableNames()
                             throws ApptrieveException
Description copied from interface: AppConnTable
Gets the table names in the Host Integrator model.

Specified by:
getTableNames in interface AppConnTable
Returns:
java.util.List - a List of Strings, one for each table name of the model
Throws:
ApptrieveException - - if a Host Integrator server error occurs

getTableProcedures

public java.util.List getTableProcedures(java.lang.String tableName)
                                  throws AppConnException,
                                         ApptrieveException
Description copied from interface: AppConnTable
Gets the procedures names for a table in the Host Integrator model.

Specified by:
getTableProcedures in interface AppConnTable
Parameters:
tableName - java.lang.String - Name of the table in the Host Integrator model
Returns:
java.util.List - a List of Strings, one for each procedure name of the specified table
Throws:
AppConnException - - if there is a parameter error
ApptrieveException - - if a Host Integrator server error occurs

getStringAtCursor

public java.lang.String getStringAtCursor(int length)
                                   throws ApptrieveException
Description copied from interface: AppConnTerm

Gets a string of the given length from the current entity on the Host Integrator server starting at the current cursor position.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid length.

Specified by:
getStringAtCursor in interface AppConnTerm
Parameters:
length - int - The length of the string on the entity (i.e. screen)
Returns:
java.lang.String - the display string
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.getStringAtRowColumn(int, int, int, int), AppConnTerm.getStringAtOffset(int, int), AppConnTerm.insertStringAtCursor(java.lang.String), AppConnTerm.insertStringAtOffset(java.lang.String, int), AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)

getStringAtOffset

public java.lang.String getStringAtOffset(int offset,
                                          int length)
                                   throws ApptrieveException
Description copied from interface: AppConnTerm

Gets a string of the given length from the current entity on the Host Integrator server starting at an offset.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid offset.
  3. Invalid length.

Specified by:
getStringAtOffset in interface AppConnTerm
Parameters:
offset - int - The offset from the start of the screen buffer
length - int - The length of the string on the entity (i.e. screen)
Returns:
java.lang.String - the display string
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.getStringAtRowColumn(int, int, int, int), AppConnTerm.insertStringAtOffset(java.lang.String, int), AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)

getStringAtRowColumn

public java.lang.String getStringAtRowColumn(int topRow,
                                             int leftColumn,
                                             int numRows,
                                             int numColumns)
                                      throws ApptrieveException
Description copied from interface: AppConnTerm

Gets a string from a rectangular region of the current entity on the Host Integrator server starting at a given row and column.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid row.
  3. Invalid column.
  4. Invalid number of rows.
  5. Invalid number of columns.

Specified by:
getStringAtRowColumn in interface AppConnTerm
Parameters:
topRow - int - The starting row on the entity (i.e. screen)
leftColumn - int - The starting column on the entity (i.e. screen)
numRows - int - the number of rows to get relative to the starting row
numColumns - int - the number of columns to get relative to the starting column
Returns:
java.lang.String - the display string
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.getStringAtOffset(int, int), AppConnTerm.insertStringAtOffset(java.lang.String, int), AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)

insertStringAtCursor

public void insertStringAtCursor(java.lang.String string)
                          throws ApptrieveException
Description copied from interface: AppConnTerm

Inserts a string into the current entity on the Host Integrator server starting at the current cursor position.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid string.

Specified by:
insertStringAtCursor in interface AppConnTerm
Parameters:
string - java.lang.String - The string to insert
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.getStringAtOffset(int, int), AppConnTerm.getStringAtRowColumn(int, int, int, int), AppConnTerm.insertStringAtOffset(java.lang.String, int), AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)

insertStringAtOffset

public void insertStringAtOffset(java.lang.String string,
                                 int offset)
                          throws ApptrieveException
Description copied from interface: AppConnTerm

Inserts a string into the current entity on the Host Integrator server starting at an offset.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid string.
  3. Invalid offset.

Specified by:
insertStringAtOffset in interface AppConnTerm
Parameters:
string - java.lang.String - The string
offset - int - The offset from the start of the screen buffer
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.getStringAtOffset(int, int), AppConnTerm.getStringAtRowColumn(int, int, int, int), AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)

insertStringAtRowColumn

public void insertStringAtRowColumn(java.lang.String string,
                                    int rowNum,
                                    int columnNum)
                             throws ApptrieveException
Description copied from interface: AppConnTerm

Inserts a string into the current entity on the Host Integrator server starting at the given row and column.

Reasons for failure include:

  1. Server session has not been established.
  2. Invalid string.
  3. Invalid row.
  4. Invalid column.

Specified by:
insertStringAtRowColumn in interface AppConnTerm
Parameters:
string - java.lang.String - The string to insert
rowNum - int - The row number of the starting location for insertion on the entity (i.e. screen)
columnNum - int - The column number of the starting location for insertion on the entity (i.e. screen)
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.getStringAtOffset(int, int), AppConnTerm.getStringAtRowColumn(int, int, int, int), AppConnTerm.insertStringAtOffset(java.lang.String, int)

performAidKey

public void performAidKey(int key)
                   throws ApptrieveException
Description copied from interface: AppConnTerm

Enters an aid key (for example, a Program Function key) into the current Host Integrator server session.

The key is one of the terminal key constants defined in the com.wrq.apptrieve.appconn.AppConnTerm class.

Specified by:
performAidKey in interface AppConnTerm
Parameters:
key - int - The aid key AppConnTerm constant
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.waitForCursor(int, int, int), AppConnModel.waitForEntityChange(java.lang.String, int), AppConnTerm.waitForString(java.lang.String, int, int, int), AppConnTerm.waitForStringRelCursor(java.lang.String, int, int, int)

waitForCursor

public void waitForCursor(int rowNum,
                          int columnNum,
                          int timeout)
                   throws ApptrieveException
Description copied from interface: AppConnTerm

Waits for the presence of the terminal cursor at a particular terminal screen offset.

Exception occurs if timeout period elapses before the cursor is at the offset.

Specified by:
waitForCursor in interface AppConnTerm
Parameters:
rowNum - int - the screen row number for the cursor
columnNum - int - the screen column number for the cursor
timeout - int - the timeout period in seconds
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.performAidKey(int), AppConnModel.waitForEntityChange(java.lang.String, int), AppConnTerm.waitForString(java.lang.String, int, int, int), AppConnTerm.waitForStringRelCursor(java.lang.String, int, int, int)

waitForString

public void waitForString(java.lang.String string,
                          int rowNum,
                          int columnNum,
                          int timeout)
                   throws ApptrieveException
Description copied from interface: AppConnTerm

Waits for the presence of a string starting at a particular terminal screen row and column.

Exception occurs if timeout period elapses before the string appears at the row and column.

Specified by:
waitForString in interface AppConnTerm
Parameters:
string - java.lang.String - the string to wait for
rowNum - int - the screen row starting number for the string (-1 matches any row)
columnNum - int - the screen column starting number for the string (-1 matches any column)
timeout - int - the timeout period in seconds
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.performAidKey(int), AppConnTerm.waitForCursor(int, int, int), AppConnModel.waitForEntityChange(java.lang.String, int), AppConnTerm.waitForStringRelCursor(java.lang.String, int, int, int)

waitForStringRelCursor

public void waitForStringRelCursor(java.lang.String string,
                                   int rowOffset,
                                   int columnOffset,
                                   int timeout)
                            throws ApptrieveException
Description copied from interface: AppConnTerm

Waits for the presence of a string relative to the current terminal screen cursor.

Exception occurs if timeout period elapses before the string appears at the offset.

Specified by:
waitForStringRelCursor in interface AppConnTerm
Parameters:
string - java.lang.String - the string to wait for
rowOffset - int - the starting screen location for the string relative to current cursor row
columnOffset - int - the starting screen column location for the string relative to current cursor column
timeout - int - the timeout period in seconds
Throws:
ApptrieveException - - if a Host Integrator server error occurs
See Also:
AppConnTerm.performAidKey(int), AppConnTerm.waitForCursor(int, int, int), AppConnModel.waitForEntityChange(java.lang.String, int), AppConnTerm.waitForString(java.lang.String, int, int, int)

localizeError

protected java.lang.String localizeError(java.util.ResourceBundle rb,
                                         java.lang.String key,
                                         java.lang.Object[] args)
For internal use only.

Parameters:
rb - resource bundle
key - key
args - args
Returns:
error message