|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wrq.apptrieve.appconn.AppConnSession
public class AppConnSession
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 |
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 |
---|
protected RemoteHostChannel remoteChannel
protected AppConnServerAgent serverAgent
protected java.util.Locale sessionLocale
protected java.util.ResourceBundle doEngBundle
protected java.util.ResourceBundle doLocBundle
Constructor Detail |
---|
public AppConnSession()
Method Detail |
---|
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
AppConnChannel
Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified model.
Reasons for failure include:
The parameters userID and password are used by Host Integrator Server if the security option is ON.
connectToModel
in interface AppConnChannel
server
- java.lang.String - Name of the Host Integrator Server (DNS Name or IP Address)modelName
- java.lang.String - Name of a Host Integrator modeluserid
- java.lang.String - User ID for authorization on the Host Integrator Serverpassword
- java.lang.String - Password for authorization on the Host Integrator ServermodelVariables
- java.util.Map - Model variables to set on connection (can be null)
AppConnException
- if there is a parameter error
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.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()
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
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:
The parameters userID and password are used by Host Integrator Server if the security option is ON.
connectToModelViaDomain
in interface AppConnChannel
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 tomodelName
- java.lang.String - Name of a Host Integrator Modeluserid
- java.lang.String - User ID for authorization on the Host Integrator Serverpassword
- java.lang.String - Password for authorization on the Host Integrator ServermodelVariables
- java.util.Map - model variables to set on connection (can be null)
AppConnException
- if there is a parameter error
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.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()
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
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:
The parameters userID and password are used by Host Integrator Server if the security option is enabled.
connectToSession
in interface AppConnChannel
server
- java.lang.String - Name of the Host Integrator Server (DNS Name or IP Address)session
- java.lang.String - Name of Host Integrator session pooluserid
- java.lang.String - User ID for authorization on the Host Integrator Serverpassword
- java.lang.String - Password for authorization on the Host Integrator ServermodelVariables
- java.util.Map - model variables to set on connection (can be null)
AppConnException
- if there is a parameter error
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.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()
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
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:
The parameters userID and password are used by Host Integrator Server if the security option is on.
connectToSessionViaDomain
in interface AppConnChannel
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 tosession
- java.lang.String - Name of a Host Integrator session pooluserid
- java.lang.String - User ID for authorization on the Host Integrator Serverpassword
- java.lang.String - Password for authorization on the Host Integrator ServermodelVariables
- java.util.Map - Model variables to set on connection (can be null)
AppConnException
- if there is a parameter error
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.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()
public void disconnect()
AppConnChannel
Disconnects from a Host Integrator Server Session.
Reasons for failure include:
disconnect
in interface AppConnChannel
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)
public void disconnect(int reserved)
AppConnChannel
Disconnects from a Host Integrator Server Session.
Reasons for failure include:
disconnect
in interface AppConnChannel
reserved
- int - reserved parameter, should always be set to zeroAppConnChannel.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)
public int getLastRequestID()
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.
getLastRequestID
in interface AppConnChannel
public java.util.Locale getLocale()
AppConnChannel
getLocale
in interface AppConnChannel
AppConnChannel.setLocale(java.util.Locale)
public int getLoggingLevel() throws ApptrieveException
AppConnChannel
Gets the logging level for the current session of the Host Integrator server.
Valid logging levels are:
getLoggingLevel
in interface AppConnChannel
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.setLoggingLevel(int)
public int getMajorVersion()
AppConnChannel
Gets major version number for the AppConn connector.
getMajorVersion
in interface AppConnChannel
public int getMethodTimeout()
AppConnChannel
Gets the method timeout for a Host Integrator Server session.
getMethodTimeout
in interface AppConnChannel
AppConnChannel.setMethodTimeout(int)
public int getConnectionTimeout()
AppConnChannel
Gets the connection timeout for a Host Integrator Server session.
getConnectionTimeout
in interface AppConnChannel
AppConnChannel.setConnectionTimeout(int)
public int getMinorVersion()
AppConnChannel
Gets minor version number for the AppConn connector.
getMinorVersion
in interface AppConnChannel
public java.lang.String getModelName()
AppConnChannel
If a session is not active, this method returns null.
getModelName
in interface AppConnChannel
public java.lang.String getServerName()
AppConnChannel
If a session is not active, this method returns null.
getServerName
in interface AppConnChannel
public int getSessionID()
AppConnChannel
getSessionID
in interface AppConnChannel
public java.lang.String getVersionString()
AppConnChannel
getVersionString
in interface AppConnChannel
public boolean isConnected()
AppConnChannel
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.
isConnected
in interface AppConnChannel
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()
public boolean isConnectionSecure()
AppConnChannel
Determines whether the Host Integrator Server session is using a secure connection.
isConnectionSecure
in interface AppConnChannel
public void requireSecureConnection(boolean require)
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.
requireSecureConnection
in interface AppConnChannel
require
- boolean - set to true to require a secure connection,
false otherwisepublic void resumeConnection(java.lang.String connectionToken) throws ApptrieveException
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:
resumeConnection
in interface AppConnChannel
connectionToken
- String - the token received from the suspendConnection method
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.suspendConnection(int)
public void setLocale(java.util.Locale locale) throws AppConnException, java.util.MissingResourceException
AppConnChannel
Sets the locale for an AppConn session.
setLocale
in interface AppConnChannel
locale
- Locale - the Locale to use for the AppConn session.
java.util.MissingResourceException
- if the resource file for the locale cannot be found
AppConnException
AppConnChannel.getLocale()
public void setLoggingLevel(int level) throws ApptrieveException, AppConnException
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:
setLoggingLevel
in interface AppConnChannel
level
- - the logging level to use for the AppConn session.
AppConnException
- if there is a parameter error
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.getLoggingLevel()
public void setMethodTimeout(int timeout) throws ApptrieveException
AppConnChannel
Sets the method timeout for a Host Integrator Server session.
Reasons for failure include:
setMethodTimeout
in interface AppConnChannel
timeout
- int - The timeout period in milliseconds
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.getMethodTimeout()
public void setConnectionTimeout(int timeout)
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.
setConnectionTimeout
in interface AppConnChannel
timeout
- int - The timeout period in secondsAppConnChannel.getConnectionTimeout()
public java.lang.String suspendConnection(int timeout) throws ApptrieveException
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:
suspendConnection
in interface AppConnChannel
timeout
- int - the timeout value to use for the suspended session in minutes. This value must greater than zero.
ApptrieveException
- if a Host Integrator server error occursAppConnChannel.resumeConnection(java.lang.String)
public void setMetaDataOnly(boolean enable) throws ChannelException
AppConnChannel
true
will not be counted against session or session pool
limits on the session server.
This method can only be invoked while not connected.
setMetaDataOnly
in interface AppConnChannel
enable
- indicating that this will be as a meta-data only session.
ChannelException
- If the session is already connected.AppConnChannel.isMetaDataOnly()
,
MetaDataOnlyException
public boolean isMetaDataOnly()
AppConnChannel
isMetaDataOnly
in interface AppConnChannel
AppConnChannel.setMetaDataOnly(boolean)
,
MetaDataOnlyException
public java.lang.String getModelVersionString()
AppConnChannel
getModelVersionString
in interface AppConnChannel
public int getSessionType()
AppConnChannel
Return values are:
AppConnChannel.SessionType3270
AppConnChannel.SessionType5250
AppConnChannel.SessionTypeHP
AppConnChannel.SessionTypeVT
AppConnChannel.SessionTypeUnknown
This value will be returned if the client is not connected to the server.
getSessionType
in interface AppConnChannel
public java.lang.String getHomeEntityName()
AppConnModel
getHomeEntityName
in interface AppConnModel
public void waitForEntityChange(java.lang.String entityName, int timeout) throws ApptrieveException
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.
waitForEntityChange
in interface AppConnModel
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
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.performAidKey(int)
public java.util.List getPatternLocations(java.util.List patternNames) throws ApptrieveException
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.
getPatternLocations
in interface AppConnModel
patternNames
- java.util.List - List of pattern names to
use in getting locations
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getAttributeLocations(java.util.List attributeNames) throws ApptrieveException
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.
getAttributeLocations
in interface AppConnModel
attributeNames
- java.util.List - List of attribute names to
use in getting locations
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getRecordSetLocations(java.util.List recordSetNames) throws ApptrieveException
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.
getRecordSetLocations
in interface AppConnModel
recordSetNames
- java.util.List - List of recordset names to
use in getting locations
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getFieldLocations(java.util.List fieldNames) throws ApptrieveException
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:
getFieldLocations
in interface AppConnModel
fieldNames
- java.util.List - List of field names to
use in getting locations
ApptrieveException
- - if a Host Integrator server error occurspublic java.lang.String getAttributeAtCursor() throws ApptrieveException
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.
getAttributeAtCursor
in interface AppConnModel
ApptrieveException
- - if a Host Integrator server error occurspublic TerminalField getTerminalFieldAtCursor() throws ApptrieveException
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:
getTerminalFieldAtCursor
in interface AppConnTerm
ApptrieveException
- - if a Host Integrator server error occursAppConnModelRecord.getTerminalAttributes(java.lang.String)
public AppConnRecordSet fetchRecords(int maxRows, java.util.List fieldNames, java.lang.String filterExpression) throws ApptrieveException
AppConnModel
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.
fetchRecords
in interface AppConnModel
maxRows
- int - The maximum number of rows that will be fetchfieldNames
- java.util.List - List of the field names to fetch from the entityfilterExpression
- java.lang.String - An expression that qualifies the records to fetch
ApptrieveException
- - if a Host Integrator server error occurspublic AppConnModelRecord getCurrentRecord() throws ApptrieveException
AppConnModel
Fetches the current record in the current recordset.
getCurrentRecord
in interface AppConnModel
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.nextRecord(java.lang.String)
,
AppConnModel.setCurrentRecordIndex(int)
,
AppConnModel.getCurrentRecordIndex()
public AppConnModelRecord nextRecord(java.lang.String filterExpression) throws ApptrieveException
AppConnModel
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.
nextRecord
in interface AppConnModel
filterExpression
- java.lang.String - An expression that qualifies the record
to find. (null matches any record)
ApptrieveException
- - if a Host Integrator server error occurspublic AttributeMetaData getAttributeMetaData(java.lang.String entityName, java.lang.String attributeName) throws AppConnException, ApptrieveException
AppConnModel
Gets metadata associated with an attribute.
getAttributeMetaData
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator modelattributeName
- java.lang.String - Name of the attribute of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getEntityAttributes(java.lang.String entityName) throws AppConnException, ApptrieveException
AppConnModel
Gets the attribute names of an entity in the Host Integrator model.
Reasons for failure include:
getEntityAttributes
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getModelEntities()
public java.lang.String getEntityDescription(java.lang.String entityName) throws AppConnException, ApptrieveException
AppConnModel
Gets the description for an entity in the Host Integrator model.
getEntityDescription
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getEntityOperations(java.lang.String entityName) throws AppConnException, ApptrieveException
AppConnModel
Gets the operation names of an entity in the Host Integrator model.
Reasons for failure include:
getEntityOperations
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getModelEntities()
public java.util.List getEntityRecordSets(java.lang.String entityName) throws AppConnException, ApptrieveException
AppConnModel
Gets the names of the recordsets for an entity in the Host Integrator model.
Reasons for failure include:
getEntityRecordSets
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getModelEntities()
public FieldMetaData getFieldMetaData(java.lang.String entityName, java.lang.String recordSetName, java.lang.String fieldName) throws AppConnException, ApptrieveException
AppConnModel
Gets metadata associated with a recordset field.
getFieldMetaData
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator modelrecordSetName
- java.lang.String - Name of the recordset of the entity in the Host Integrator modelfieldName
- java.lang.String - Name of the field of the recordset in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getModelEntities() throws ApptrieveException
AppConnModel
Reasons for failure include:
getModelEntities
in interface AppConnModel
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getCurrentEntity()
public java.util.Map getModelVariables() throws ApptrieveException
AppConnModel
Gets the values of model variables in the Host Integrator model.
Reasons for failure include:
getModelVariables
in interface AppConnModel
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.setModelVariables(java.util.Map)
,
AppConnModel.getModelVariableNames()
public OperationMetaData getOperationMetaData(java.lang.String entityName, java.lang.String operationName) throws AppConnException, ApptrieveException
AppConnModel
Gets metadata associated with an operation.
getOperationMetaData
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator modeloperationName
- java.lang.String - Name of the attribute of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic RecordSetMetaData getRecordSetMetaData(java.lang.String entityName, java.lang.String recordSetName) throws AppConnException, ApptrieveException
AppConnModel
Gets metadata associated with a recordset.
getRecordSetMetaData
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator modelrecordSetName
- java.lang.String - Name of the recordset of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic VariableMetaData getVariableMetaData(java.lang.String variableName) throws AppConnException, ApptrieveException
AppConnModel
Gets metadata associated with a variable.
getVariableMetaData
in interface AppConnModel
variableName
- java.lang.String - Name of a variable in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getModelVariableNames() throws ApptrieveException
AppConnModel
Gets the names of all model variables in the Host Integrator model.
Reasons for failure include:
getModelVariableNames
in interface AppConnModel
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getModelVariables()
,
AppConnModel.setModelVariables(java.util.Map)
public java.lang.String processString(java.lang.String inStr) throws ApptrieveException
AppConnModel
Calls the ProcessString event handler on the server.
processString
in interface AppConnModel
inStr
- - String input to the ProcessString event
ApptrieveException
- - if a Host Integrator server error occurspublic void enableTerminalAttributes(boolean enable)
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.
enableTerminalAttributes
in interface AppConnModel
enable
- boolean - Set to true to enable terminal attribute retrievalpublic AppConnModelRecord getAttributes(java.util.List attributeNames) throws ApptrieveException
AppConnModel
Gets the attributes of the current entity. If attributeNames is null, getAttributes will return all attributes of the entity.
getAttributes
in interface AppConnModel
attributeNames
- java.util.List - List of attribute names to
get from the entity
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.setAttributes(java.util.Map)
,
AppConnModel.setAttributesDelayed(java.util.Map, java.lang.String)
public java.lang.String getCurrentEntity() throws ApptrieveException
AppConnModel
Gets the current entity (screen) of the legacy application.
Reasons for failure include:
getCurrentEntity
in interface AppConnModel
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.setCurrentEntity(java.lang.String)
public int getCurrentRecordIndex() throws ApptrieveException
AppConnModel
getCurrentRecordIndex
in interface AppConnModel
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.setCurrentRecordIndex(int)
,
AppConnModel.getCurrentRecord()
public java.lang.String getCurrentRecordSetName() throws ApptrieveException
AppConnModel
getCurrentRecordSetName
in interface AppConnModel
ApptrieveException
- - if there is no current recordset forpublic void insertRecord(java.util.Map record) throws AppConnException, ApptrieveException
AppConnModel
Performs the insert operation for the current recordset.
insertRecord
in interface AppConnModel
record
- java.util.Map - A map containing
name-value pairs for the record elements to insert
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic void insertRecords(java.util.List records) throws AppConnException, ApptrieveException
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.
insertRecords
in interface AppConnModel
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
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.insertRecord(java.util.Map)
public void moveCurrentRecordIndex(int movement) throws ApptrieveException
AppConnModel
Moves the current record index to a new position in the current recordset.
The movementCode can be one of the following AppConnModel fields:
AppConnModel.ScrollHome
AppConnModel.ScrollEnd
AppConnModel.ScrollLineUp
AppConnModel.ScrollLineDown
AppConnModel.ScrollPageUp
AppConnModel.ScrollPageDown
moveCurrentRecordIndex
in interface AppConnModel
movement
- int - The type of movement to perform
ApptrieveException
- - if a Host Integrator server error occurspublic void performEntityOperation(java.lang.String operationName) throws AppConnException, ApptrieveException
AppConnModel
Performs an operation on the current entity.
Reasons for failure include:
performEntityOperation
in interface AppConnModel
operationName
- java.lang.String - The operation name
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.setCurrentEntity(java.lang.String)
,
AppConnModel.getCurrentEntity()
,
AppConnModel.getEntityOperations(java.lang.String)
public void selectCurrentRecord() throws ApptrieveException
AppConnModel
Performs the selection operation for the current recordset.
selectCurrentRecord
in interface AppConnModel
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.nextRecord(java.lang.String)
,
AppConnModel.setCurrentRecordIndex(int)
,
AppConnModel.selectRecordByFilter(java.lang.String)
,
AppConnModel.selectRecordByIndex(int)
public boolean selectRecordByFilter(java.lang.String filterExpression) throws ApptrieveException
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.
selectRecordByFilter
in interface AppConnModel
filterExpression
- java.lang.String - An expression that qualifies the record
to find. (null matches any record)
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.selectCurrentRecord()
,
AppConnModel.selectRecordByIndex(int)
public boolean selectRecordByIndex(int index) throws ApptrieveException
AppConnModel
Performs its selection operation on a record in the current recordset. The record to select is selected by the provided index number.
selectRecordByIndex
in interface AppConnModel
index
- int - The index of the record to select
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.selectCurrentRecord()
,
AppConnModel.selectRecordByFilter(java.lang.String)
public void setAttributes(java.util.Map attributes) throws ApptrieveException
AppConnModel
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.
setAttributes
in interface AppConnModel
attributes
- java.util.Map - A map containing attributes (name/value pairs)
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.setAttributesDelayed(java.util.Map, java.lang.String)
,
AppConnModel.getAttributes(java.util.List)
public void setAttributesDelayed(java.util.Map attributes, java.lang.String entityName) throws AppConnException, ApptrieveException
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.
setAttributesDelayed
in interface AppConnModel
attributes
- java.util.Map - A map containing attributes (name/value pairs)entityName
- java.lang.String - Name of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.setCurrentEntity(java.lang.String)
,
AppConnModel.getCurrentEntity()
,
AppConnModel.fetchRecords(int, java.util.List, java.lang.String)
,
AppConnModel.setAttributes(java.util.Map)
public void setCurrentEntity(java.lang.String entityName) throws AppConnException, ApptrieveException
AppConnModel
Sets the current entity.
The legacy application will traverse to the screen that corresponds to that entity.
Reasons for failure include:
setCurrentEntity
in interface AppConnModel
entityName
- java.lang.String - Name of the entity in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getCurrentEntity()
public boolean setCurrentRecordIndex(int index) throws ApptrieveException
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.
setCurrentRecordIndex
in interface AppConnModel
index
- int - The index of the record to make current
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getCurrentRecordIndex()
,
AppConnModel.getCurrentRecord()
public void setCurrentRecordSetByName(java.lang.String recordSetName) throws AppConnException, ApptrieveException
AppConnModel
Sets the current recordset by name. This is only needed if there is more than one recordset for the current entity.
setCurrentRecordSetByName
in interface AppConnModel
recordSetName
- java.lang.String - The name of the recordset to make current
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getCurrentRecordSetName()
public void setModelVariables(java.util.Map variables) throws ApptrieveException
AppConnModel
Sets the values of variables in the Host Integrator model.
Reasons for failure include:
setModelVariables
in interface AppConnModel
variables
- java.util.Map - A collection of name/value pairs for the variables
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.getModelVariables()
,
AppConnModel.getModelVariableNames()
public void waitForCondition(int timeout, java.lang.String expression, java.lang.String entityName) throws ApptrieveException
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.
waitForCondition
in interface AppConnModel
timeout
- int - the timeout period in secondsexpression
- java.lang.String - the expression to wait forentityName
- java.lang.String - the name of the entity to use as
the context for the expression.
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.performAidKey(int)
public void updateCurrentRecord(java.util.Map record) throws AppConnException, ApptrieveException
AppConnModel
Changes the values of the current record in the current recordset.
updateCurrentRecord
in interface AppConnModel
record
- java.util.Map - A map containing
name-value pairs for the record elements to change
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.updateRecordByFilter(java.util.Map, java.lang.String)
,
AppConnModel.updateRecordByIndex(java.util.Map, int)
,
AppConnModel.updateRecords(java.util.Map, java.lang.String)
public boolean updateRecordByFilter(java.util.Map record, java.lang.String filterExpression) throws AppConnException, ApptrieveException
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.
updateRecordByFilter
in interface AppConnModel
record
- java.util.Map - A map containing
name-value pairs for the record elements to changefilterExpression
- java.lang.String - An expression that qualifies the
record to update. (null matches any record)
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.updateCurrentRecord(java.util.Map)
,
AppConnModel.updateRecordByIndex(java.util.Map, int)
,
AppConnModel.updateRecords(java.util.Map, java.lang.String)
public boolean updateRecordByIndex(java.util.Map record, int index) throws AppConnException, ApptrieveException
AppConnModel
Changes the values of a record in the current recordset. The record to change is selected by the provided index number.
updateRecordByIndex
in interface AppConnModel
record
- java.util.Map - A map containing
name-value pairs for the record elements to changeindex
- int - The index of the record to update
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.updateCurrentRecord(java.util.Map)
,
AppConnModel.updateRecordByFilter(java.util.Map, java.lang.String)
,
AppConnModel.updateRecords(java.util.Map, java.lang.String)
public int updateRecords(java.util.Map record, java.lang.String filterExpression) throws AppConnException, ApptrieveException
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.
updateRecords
in interface AppConnModel
record
- java.util.Map - A map containing
name-value pairs for the record elements to changefilterExpression
- java.lang.String - An expression that qualifies the
records to update. (null matches all records)
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occursAppConnModel.updateCurrentRecord(java.util.Map)
,
AppConnModel.updateRecordByFilter(java.util.Map, java.lang.String)
,
AppConnModel.updateRecordByIndex(java.util.Map, int)
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
AppConnTable
performTableProcedure
in interface AppConnTable
tableName
- java.lang.String - Name of the table on which to perform the procedureprocedureName
- java.lang.String - Name of the table procedure to performdataInputValues
- java.util.Map - Set of data input column name-value pairs to usefilterValues
- java.util.Map - Set of filter column name-value pairs to usefilterIsCaseSensitive
- 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 outputmaxRows
- int - The maximum number of rows that will be returned
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic AppConnRecordSet executeSQLStatement(java.lang.String sqlStatement, int maxRows) throws AppConnException, ApptrieveException
AppConnTable
executeSQLStatement
in interface AppConnTable
sqlStatement
- java.lang.String - The SQL statement to executemaxRows
- Maximum number of rows to return, or zero to return all rows.
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic AppConnRecordSet executeSQLStatement(java.lang.String sqlStatement) throws AppConnException, ApptrieveException
AppConnTable
executeSQLStatement
in interface AppConnTable
sqlStatement
- java.lang.String - The SQL statement to execute
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic ColumnMetaData getColumnMetaData(java.lang.String tableName, java.lang.String columnName) throws AppConnException, ApptrieveException
AppConnTable
getColumnMetaData
in interface AppConnTable
tableName
- java.lang.String - Name of the table in the Host Integrator modelcolumnName
- java.lang.String - Name of the column of the table in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic ProcedureMetaData getProcedureMetaData(java.lang.String tableName, java.lang.String procedureName) throws AppConnException, ApptrieveException
AppConnTable
getProcedureMetaData
in interface AppConnTable
tableName
- java.lang.String - Name of the table in the Host Integrator modelprocedureName
- java.lang.String - Name of the procedure of the table in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getTableColumns(java.lang.String tableName) throws AppConnException, ApptrieveException
AppConnTable
getTableColumns
in interface AppConnTable
tableName
- java.lang.String - Name of the table in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic java.lang.String getTableDescription(java.lang.String tableName) throws AppConnException, ApptrieveException
AppConnTable
getTableDescription
in interface AppConnTable
tableName
- java.lang.String - Name of the table in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getTableNames() throws ApptrieveException
AppConnTable
getTableNames
in interface AppConnTable
ApptrieveException
- - if a Host Integrator server error occurspublic java.util.List getTableProcedures(java.lang.String tableName) throws AppConnException, ApptrieveException
AppConnTable
getTableProcedures
in interface AppConnTable
tableName
- java.lang.String - Name of the table in the Host Integrator model
AppConnException
- - if there is a parameter error
ApptrieveException
- - if a Host Integrator server error occurspublic java.lang.String getStringAtCursor(int length) throws ApptrieveException
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:
getStringAtCursor
in interface AppConnTerm
length
- int - The length of the string on the entity (i.e. screen)
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.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)
public java.lang.String getStringAtOffset(int offset, int length) throws ApptrieveException
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:
getStringAtOffset
in interface AppConnTerm
offset
- int - The offset from the start of the screen bufferlength
- int - The length of the string on the entity (i.e. screen)
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.getStringAtRowColumn(int, int, int, int)
,
AppConnTerm.insertStringAtOffset(java.lang.String, int)
,
AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)
public java.lang.String getStringAtRowColumn(int topRow, int leftColumn, int numRows, int numColumns) throws ApptrieveException
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:
getStringAtRowColumn
in interface AppConnTerm
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 rownumColumns
- int - the number of columns to get relative to the starting column
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.getStringAtOffset(int, int)
,
AppConnTerm.insertStringAtOffset(java.lang.String, int)
,
AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)
public void insertStringAtCursor(java.lang.String string) throws ApptrieveException
AppConnTerm
Inserts a string into the current entity on the Host Integrator server starting at the current cursor position.
Reasons for failure include:
insertStringAtCursor
in interface AppConnTerm
string
- java.lang.String - The string to insert
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.getStringAtOffset(int, int)
,
AppConnTerm.getStringAtRowColumn(int, int, int, int)
,
AppConnTerm.insertStringAtOffset(java.lang.String, int)
,
AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)
public void insertStringAtOffset(java.lang.String string, int offset) throws ApptrieveException
AppConnTerm
Inserts a string into the current entity on the Host Integrator server starting at an offset.
Reasons for failure include:
insertStringAtOffset
in interface AppConnTerm
string
- java.lang.String - The stringoffset
- int - The offset from the start of the screen buffer
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.getStringAtOffset(int, int)
,
AppConnTerm.getStringAtRowColumn(int, int, int, int)
,
AppConnTerm.insertStringAtRowColumn(java.lang.String, int, int)
public void insertStringAtRowColumn(java.lang.String string, int rowNum, int columnNum) throws ApptrieveException
AppConnTerm
Inserts a string into the current entity on the Host Integrator server starting at the given row and column.
Reasons for failure include:
insertStringAtRowColumn
in interface AppConnTerm
string
- java.lang.String - The string to insertrowNum
- 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)
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.getStringAtOffset(int, int)
,
AppConnTerm.getStringAtRowColumn(int, int, int, int)
,
AppConnTerm.insertStringAtOffset(java.lang.String, int)
public void performAidKey(int key) throws ApptrieveException
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.
performAidKey
in interface AppConnTerm
key
- int - The aid key AppConnTerm constant
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.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)
public void waitForCursor(int rowNum, int columnNum, int timeout) throws ApptrieveException
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.
waitForCursor
in interface AppConnTerm
rowNum
- int - the screen row number for the cursorcolumnNum
- int - the screen column number for the cursortimeout
- int - the timeout period in seconds
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.performAidKey(int)
,
AppConnModel.waitForEntityChange(java.lang.String, int)
,
AppConnTerm.waitForString(java.lang.String, int, int, int)
,
AppConnTerm.waitForStringRelCursor(java.lang.String, int, int, int)
public void waitForString(java.lang.String string, int rowNum, int columnNum, int timeout) throws ApptrieveException
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.
waitForString
in interface AppConnTerm
string
- java.lang.String - the string to wait forrowNum
- 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
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.performAidKey(int)
,
AppConnTerm.waitForCursor(int, int, int)
,
AppConnModel.waitForEntityChange(java.lang.String, int)
,
AppConnTerm.waitForStringRelCursor(java.lang.String, int, int, int)
public void waitForStringRelCursor(java.lang.String string, int rowOffset, int columnOffset, int timeout) throws ApptrieveException
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.
waitForStringRelCursor
in interface AppConnTerm
string
- java.lang.String - the string to wait forrowOffset
- int - the starting screen location for the string relative
to current cursor rowcolumnOffset
- int - the starting screen column location for the string relative
to current cursor columntimeout
- int - the timeout period in seconds
ApptrieveException
- - if a Host Integrator server error occursAppConnTerm.performAidKey(int)
,
AppConnTerm.waitForCursor(int, int, int)
,
AppConnModel.waitForEntityChange(java.lang.String, int)
,
AppConnTerm.waitForString(java.lang.String, int, int, int)
protected java.lang.String localizeError(java.util.ResourceBundle rb, java.lang.String key, java.lang.Object[] args)
rb
- resource bundlekey
- keyargs
- args
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |