com.wrq.vhi.script.api
Interface ParseRecordEvent

All Superinterfaces:
EntityEvent, Event, HostSessionEvent, ModelEvent, RecordEvent, RecordSetEvent

public interface ParseRecordEvent
extends RecordEvent

Parse record event information.

See Also:
RecordSetEventHandler.parseRecord(com.wrq.vhi.script.api.ParseRecordEvent)

Method Summary
 FieldLocation createFieldLocation(int offset, int length)
          Creates a field location using linear coordinates.
 java.util.Map defaultParseRecord()
          Gets the default field locations as defined by the model.
 RectangularTerminalRegion getRecordRegion()
          Gets the rectangular region which describes the contents of the record.
 
Methods inherited from interface com.wrq.vhi.script.api.RecordEvent
getHostRecordIndex, getRecordIndex, getRecordStateObject, isRecordStateObject, setRecordStateObject
 
Methods inherited from interface com.wrq.vhi.script.api.RecordSetEvent
getPageNumber, getRecordSetContext, getRecordSetMetaData, getRecordSetName
 
Methods inherited from interface com.wrq.vhi.script.api.EntityEvent
getEntityName, getTabStops
 
Methods inherited from interface com.wrq.vhi.script.api.HostSessionEvent
getHostSession
 
Methods inherited from interface com.wrq.vhi.script.api.ModelEvent
getClientSession, getCurrentOperation, getCurrentProcedure, getModelContext
 
Methods inherited from interface com.wrq.vhi.script.api.Event
checkForTimeout, createErrorMessage, createErrorMessage, createHostSession, createUserErrorMessage, getEventStack, getHandlerProperty, getLogger, isDesignEnvironment
 

Method Detail

getRecordRegion

RectangularTerminalRegion getRecordRegion()
Gets the rectangular region which describes the contents of the record. Note that this region will always have an offset of zero since it does not necessarily represent a contiguous region on the screen. In fact when a record is split across screens, a portion of the region will not be on the current screen.

Returns:
the contents of the record

defaultParseRecord

java.util.Map defaultParseRecord()
Gets the default field locations as defined by the model. The contents of the returned map can be modified and used as the event's return value.

Returns:
A map of field names to FieldLocation objects

createFieldLocation

FieldLocation createFieldLocation(int offset,
                                  int length)
Creates a field location using linear coordinates.

Parameters:
offset - the zero-based offset from the start of the record
length - the length of the field
Returns:
a FieldLocation object describing the field's location
Throws:
java.lang.IllegalArgumentException - if the offset or length is invalid