com.wrq.apptrieve.agent
Class Screen

java.lang.Object
  extended by com.wrq.apptrieve.agent.Screen
All Implemented Interfaces:
com.wrq.rejuv.IScreen, java.io.Serializable

public class Screen
extends java.lang.Object
implements com.wrq.rejuv.IScreen, java.io.Serializable

Screen holds information about a particular terminal screen or entity that can be used to render the screen, for example, in html.

See Also:
Serialized Form

Constructor Summary
Screen(java.lang.String xmlText, java.util.Map fields, boolean messageWaiting, boolean keyboardLocked, boolean connectedToHost, java.lang.String errorCode, java.lang.String errorMessage, java.util.List operationNames, java.util.Map readableAttributes, java.util.Map writeableAttributes, java.lang.String defaultOperationName, java.lang.String entityName)
          Constructor for internal use only.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getDefaultOperationName()
          Gets the Name of the default VHI operation, or null if there is none.
 java.lang.String getEntityName()
          If the current screen is a recognized entity, this method returns the name of the entity.
 java.lang.String getErrorCode()
          Gets the AS/400 error code, or empty string if there is no error.
 java.lang.String getErrorMessage()
          Gets the terminal error message, or empty string if there is no error.
 java.util.Map getInputFields()
          Get a Map of the input fields on the current screen.
 java.util.List getOperationNames()
          Gets a List of VHI operation names if the current screen is an entity.
 java.util.Map getReadableAttributes()
          Gets a Map of readable VHI attributes names/values.
 java.util.Map getWriteableAttributes()
          Gets a Map of writeable VHI attributes names/values.
 java.lang.String getXMLText()
          Creates an xml document that specifies the text, colors, fields, and field attributes of a terminal screen.
 boolean isConnectedToHost()
          Determines whether or not the VHI server session is connected to the host.
 boolean isKeyboardLocked()
          Determines whether or not the keyboard is locked.
 boolean isMessageWaiting()
          Determine whether or not the AS/400 message waiting indicator is asserted.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Screen

public Screen(java.lang.String xmlText,
              java.util.Map fields,
              boolean messageWaiting,
              boolean keyboardLocked,
              boolean connectedToHost,
              java.lang.String errorCode,
              java.lang.String errorMessage,
              java.util.List operationNames,
              java.util.Map readableAttributes,
              java.util.Map writeableAttributes,
              java.lang.String defaultOperationName,
              java.lang.String entityName)
Constructor for internal use only.

Parameters:
xmlText - xmlText
fields - fields
messageWaiting - messageWaiting
keyboardLocked - keyboardLocked
connectedToHost - connectedToHost
errorCode - errorCode
errorMessage - errorMessage
operationNames - operationNames
readableAttributes - readableAttributes
writeableAttributes - writeableAttributes
defaultOperationName - defaultOperationName
entityName - entityName
Method Detail

getXMLText

public java.lang.String getXMLText()
Creates an xml document that specifies the text, colors, fields, and field attributes of a terminal screen. If the screen is a recognized entity, the xml document also contains information about writeable attributes that exist on the entity.

Specified by:
getXMLText in interface com.wrq.rejuv.IScreen
Returns:
XML text representing a terminal screen.

getInputFields

public java.util.Map getInputFields()
Get a Map of the input fields on the current screen. The keys of the map are Integers which are the offset position of the start of the field. The values of the map are InputFieldInfo objects that hold information about the input field.

Specified by:
getInputFields in interface com.wrq.rejuv.IScreen
Returns:
Map of input field offsets / field info.
See Also:
InputFieldInfo

isMessageWaiting

public boolean isMessageWaiting()
Determine whether or not the AS/400 message waiting indicator is asserted.

Specified by:
isMessageWaiting in interface com.wrq.rejuv.IScreen
Returns:
true if the AS/400 message waiting indicator is asserted.

isKeyboardLocked

public boolean isKeyboardLocked()
Determines whether or not the keyboard is locked.

Specified by:
isKeyboardLocked in interface com.wrq.rejuv.IScreen
Returns:
true if the keyboard is locked.

isConnectedToHost

public boolean isConnectedToHost()
Determines whether or not the VHI server session is connected to the host.

Specified by:
isConnectedToHost in interface com.wrq.rejuv.IScreen
Returns:
true if the VHI server session is connected to the host.

getErrorCode

public java.lang.String getErrorCode()
Gets the AS/400 error code, or empty string if there is no error.

Specified by:
getErrorCode in interface com.wrq.rejuv.IScreen
Returns:
AS/400 error code, or empty string if there is no error.

getErrorMessage

public java.lang.String getErrorMessage()
Gets the terminal error message, or empty string if there is no error.

Specified by:
getErrorMessage in interface com.wrq.rejuv.IScreen
Returns:
Error message, or empty string if there is no error.

getOperationNames

public java.util.List getOperationNames()
Gets a List of VHI operation names if the current screen is an entity.

Specified by:
getOperationNames in interface com.wrq.rejuv.IScreen
Returns:
List of VHI operation names.

getDefaultOperationName

public java.lang.String getDefaultOperationName()
Gets the Name of the default VHI operation, or null if there is none.

Specified by:
getDefaultOperationName in interface com.wrq.rejuv.IScreen
Returns:
Name of the default VHI operation, or null if there is none.

getReadableAttributes

public java.util.Map getReadableAttributes()
Gets a Map of readable VHI attributes names/values.

Specified by:
getReadableAttributes in interface com.wrq.rejuv.IScreen
Returns:
Map of readable VHI attributes names/values.

getWriteableAttributes

public java.util.Map getWriteableAttributes()
Gets a Map of writeable VHI attributes names/values.

Specified by:
getWriteableAttributes in interface com.wrq.rejuv.IScreen
Returns:
Map of writeable VHI attributes names/values.

getEntityName

public java.lang.String getEntityName()
If the current screen is a recognized entity, this method returns the name of the entity.

Specified by:
getEntityName in interface com.wrq.rejuv.IScreen
Returns:
the name of the entity, or null if the screen is unrecognized

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object