com.bmc.mainview.nvbapi
Class TabularView

java.lang.Object
  extended by com.bmc.mainview.nvbapi.View
      extended by com.bmc.mainview.nvbapi.TabularView

public class TabularView
extends View

Modification log: JAN2011 Overrides the default refresh behaviour to ensure that the view definition is set for the conversation before the data-get is called, and that each form also refreshes immediately. The base implementation of TabularView only does the data-get on the base view after a refresh, leaving the forms to do the data-get when the fields are later accessed (i.e. the forms are left with their caches cleared ; the next attempt at a row access forces the data-get). The forms size (totalRows) is not cleared with the cache, so that can be incorrect until a row is accessed. If the total rows has decreased, an IllegalArgumentException is thrown. SourceForge Bug ID : 3134484


Field Summary
 
Fields inherited from class com.bmc.mainview.nvbapi.View
localDate, localTime
 
Constructor Summary
TabularView(java.lang.String name, Conversation conversation, boolean returnAll, java.lang.String where)
          Creates an object containing the data from a MAINVIEW tabular view
TabularView(java.lang.String name, Conversation conversation, boolean returnAll, java.lang.String where, ViewListener exit)
          Creates an object containing the data from a MAINVIEW tabular view
TabularView(ViewDefinition def, Conversation conversation)
          Creates an object containing the data from a MAINVIEW tabular view
TabularView(ViewDefinition def, Conversation conversation, boolean returnAll)
          Creates an object containing the data from a MAINVIEW tabular view
TabularView(ViewDefinition def, Conversation conversation, boolean returnAll, java.lang.String where)
          Creates an object containing the data from a MAINVIEW tabular view
TabularView(ViewDefinition def, Conversation conversation, boolean returnAll, java.lang.String where, ViewListener exit)
          Creates an object containing the data from a MAINVIEW tabular view
TabularView(ViewDefinition def, Conversation conversation, boolean returnAll, ViewListener exit)
          Creates an object containing the data from a MAINVIEW tabular view
 
Method Summary
 java.lang.String getRawValue(int row, Field field)
          Extract a field value from a row of mapped data record
 TabularView openForm(java.lang.String view, boolean returnAll)
          Create a tabular view to represent another form of the same data
 TabularView openForm(ViewDefinition def, boolean returnAll)
          Create a tabular view to represent another form of the same data
 void refresh()
          Release previously gotten data and retrieve current values If used on a form, refreshes the base and all forms
 void setQwhere(java.lang.String qwhere)
          Set an MVI WHERE clause to be used with this view.
 void setWhere(java.lang.String where)
          Set an MVI WHERE clause to be used with this view.
 
Methods inherited from class com.bmc.mainview.nvbapi.View
convertTime, fieldCount, getConversation, getField, getField, getQwhere, getRowMax, getValue, getValue, getWhere, setHyperlinks, setRowMax, size, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TabularView

public TabularView(ViewDefinition def,
                   Conversation conversation,
                   boolean returnAll,
                   java.lang.String where)
            throws java.io.IOException
Creates an object containing the data from a MAINVIEW tabular view

Parameters:
def - The definition of the desired view. This may contain any desired parameters or filters.
conversation - A conversation produced by HostServer.ConversationFactory
returnAll - True if all fields are desired, including hidden fields.
where - A MAINVIEW WHERE clause used to filter the records.
Throws:
java.io.IOException - if the rawData cannot be obtained.

TabularView

public TabularView(java.lang.String name,
                   Conversation conversation,
                   boolean returnAll,
                   java.lang.String where)
            throws java.io.IOException
Creates an object containing the data from a MAINVIEW tabular view

Parameters:
name - The name of the desired view
conversation - A conversation produced by HostServer.ConversationFactory
returnAll - True if all fields are desired, including hidden fields.
where - A MAINVIEW WHERE clause used to fiter the records.
Throws:
java.io.IOException - if the rawData cannot be obtained.

TabularView

public TabularView(java.lang.String name,
                   Conversation conversation,
                   boolean returnAll,
                   java.lang.String where,
                   ViewListener exit)
            throws java.io.IOException
Creates an object containing the data from a MAINVIEW tabular view

Parameters:
name - The name of the desired view
conversation - A conversation produced by HostServer.ConversationFactory
returnAll - True if all fields are desired, including hidden fields.
where - A MAINVIEW WHERE clause used to filter the records.
exit - A ViewListener to be called during processing.
Throws:
java.io.IOException - if the rawData cannot be obtained.

TabularView

public TabularView(ViewDefinition def,
                   Conversation conversation,
                   boolean returnAll,
                   java.lang.String where,
                   ViewListener exit)
            throws java.io.IOException
Creates an object containing the data from a MAINVIEW tabular view

Parameters:
def - The definition of the desired view
conversation - A conversation produced by HostServer.ConversationFactory
returnAll - True if all fields are desired, including hidden fields.
where - A MAINVIEW WHERE clause used to fiter the records.
exit - A ViewListener to be called during processing.
Throws:
java.io.IOException - if the rawData cannot be obtained.

TabularView

public TabularView(ViewDefinition def,
                   Conversation conversation,
                   boolean returnAll,
                   ViewListener exit)
            throws java.io.IOException
Creates an object containing the data from a MAINVIEW tabular view

Parameters:
def - The definition of the desired view
conversation - A conversation produced by HostServer.ConversationFactory
returnAll - True if all fields are desired, including hidden fields.
exit - A ViewListener to be called during processing.
Throws:
java.io.IOException - if the rawData cannot be obtained.

TabularView

public TabularView(ViewDefinition def,
                   Conversation conversation,
                   boolean returnAll)
            throws java.io.IOException
Creates an object containing the data from a MAINVIEW tabular view

Parameters:
def - The definition of the desired view
conversation - A conversation produced by HostServer.ConversationFactory
returnAll - True if all fields are desired, including hidden fields.
Throws:
java.io.IOException - if the rawData cannot be obtained.

TabularView

public TabularView(ViewDefinition def,
                   Conversation conversation)
            throws java.io.IOException
Creates an object containing the data from a MAINVIEW tabular view

Parameters:
def - The definition of the desired view
conversation - A conversation produced by HostServer.ConversationFactory
Throws:
java.io.IOException - if the rawData cannot be obtained.
Method Detail

openForm

public TabularView openForm(ViewDefinition def,
                            boolean returnAll)
                     throws java.io.IOException
Create a tabular view to represent another form of the same data

Parameters:
def - The new view
returnAll - true if hidden fields are needed
Returns:
A new view of the same data.
Throws:
java.io.IOException - NOTE: Requires BPY8796 maintenance level on the host server.

openForm

public TabularView openForm(java.lang.String view,
                            boolean returnAll)
                     throws java.io.IOException
Create a tabular view to represent another form of the same data

Parameters:
view - The name of the new view
returnAll - true if hidden fields are needed
Returns:
A new view of the same data.
Throws:
java.io.IOException - NOTE: Requires BPY8796 maintenance level on the host server.

getRawValue

public java.lang.String getRawValue(int row,
                                    Field field)
                             throws java.io.IOException,
                                    java.lang.IllegalArgumentException
Extract a field value from a row of mapped data record

Specified by:
getRawValue in class View
Parameters:
row - The row number: 1 to n
field - The field in thuis rawData
Returns:
A trimmed String with the value of the field in this row.
Throws:
java.lang.IllegalArgumentException - if row number out of range
java.io.IOException

setWhere

public void setWhere(java.lang.String where)
Set an MVI WHERE clause to be used with this view. This method is intended to be called from a ViewListener GOTFIELDS exit.

Overrides:
setWhere in class View
Parameters:
where -
Throws:
java.lang.IllegalStateException - if data has already been retrieved.
See Also:
ViewListener

setQwhere

public void setQwhere(java.lang.String qwhere)
Set an MVI WHERE clause to be used with this view. This method is intended to be called from a ViewListener GOTFIELDS exit.

Overrides:
setQwhere in class View
Parameters:
qwhere -
Throws:
java.lang.IllegalStateException - if data has already been retrieved.
See Also:
ViewListener

refresh

public void refresh()
             throws java.io.IOException
Release previously gotten data and retrieve current values If used on a form, refreshes the base and all forms

Specified by:
refresh in class View
Throws:
java.io.IOException