variablerecordsets
Class MultiBlankFieldHandler

java.lang.Object
  extended by com.wrq.vhi.script.api.FieldEventHandler
      extended by variablerecordsets.MultiBlankFieldHandler
All Implemented Interfaces:
com.wrq.vhi.script.api.EventHandler

public class MultiBlankFieldHandler
extends com.wrq.vhi.script.api.FieldEventHandler

Remove extra blanks from recordset fields.

Variable-length records often contain fields with embedded blanks, particularly those which wrap across multiple lines. This event handler reduces multi-blank sequences to a single blank when reading the field.


Field Summary
static java.lang.String description
           
static int readFieldTimeout
          Timeout in seconds for the readField() event.
static int writeFieldTimeout
          Timeout in seconds for the writeField() event.
 
Fields inherited from interface com.wrq.vhi.script.api.EventHandler
DEFAULT_TIMEOUT
 
Constructor Summary
MultiBlankFieldHandler()
           
 
Method Summary
 java.lang.String readField(com.wrq.vhi.script.api.ReadFieldEvent event)
          Read a field, reducing multiple blank sequences to single blanks.
 
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
 

Field Detail

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
Constructor Detail

MultiBlankFieldHandler

public MultiBlankFieldHandler()
Method Detail

readField

public java.lang.String readField(com.wrq.vhi.script.api.ReadFieldEvent event)
                           throws com.wrq.apptrieve.agent.ApptrieveException
Read a field, reducing multiple blank sequences to single blanks.

Overrides:
readField in class com.wrq.vhi.script.api.FieldEventHandler
Parameters:
event - the event instance
Returns:
the field value with extra spaces removed
Throws:
com.wrq.apptrieve.agent.ApptrieveException