abbreviations
Class FieldHandler
java.lang.Object
com.wrq.vhi.script.api.FieldEventHandler
abbreviations.FieldHandler
- All Implemented Interfaces:
- com.wrq.vhi.script.api.EventHandler
public class FieldHandler
- extends com.wrq.vhi.script.api.FieldEventHandler
This class overrides the readField(com.wrq.vhi.script.api.ReadFieldEvent)
event so that the cryptic
codes contained in the host application display can be translated into a
more readable form in the client application.
The model load event placed a java.util.ResourceBundle
in the model hashmap. This class simply looks up the translated value
of the abbreviation and returns it. If the translation table can't
be found, or if no translation exists for the given abbreviation, then
the original code is returned.
Fields inherited from interface com.wrq.vhi.script.api.EventHandler |
DEFAULT_TIMEOUT |
Method Summary |
java.lang.String |
readField(com.wrq.vhi.script.api.ReadFieldEvent event)
Called by the Host Integrator server to read the field. |
Methods inherited from class com.wrq.vhi.script.api.FieldEventHandler |
writeField |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
description
public static final java.lang.String description
- See Also:
- Constant Field Values
readFieldTimeout
public static final int readFieldTimeout
- Timeout in seconds for the readField() event. A value of
DEFAULT_TIMEOUT means the event will use the model defined
default event timeout.
- See Also:
- Constant Field Values
writeFieldTimeout
public static final int writeFieldTimeout
- Timeout in seconds for the writeField() event. A value of
DEFAULT_TIMEOUT means the event will use the model defined
default event timeout.
- See Also:
- Constant Field Values
FieldHandler
public FieldHandler()
readField
public java.lang.String readField(com.wrq.vhi.script.api.ReadFieldEvent event)
throws com.wrq.apptrieve.agent.ApptrieveException
- Called by the Host Integrator server to read the field.
Looks up the code value contained in the field in a resource file.
If a translation exists the translation is returned, otherwise the
original code is returned.
- Overrides:
readField
in class com.wrq.vhi.script.api.FieldEventHandler
- Parameters:
event
- the event instance
- Returns:
- the translated field value
- Throws:
com.wrq.apptrieve.agent.ApptrieveException