com.bmc.mainview.nvbapi
Class ViewDefinition

java.lang.Object
  extended by com.bmc.mainview.nvbapi.ViewDefinition

public class ViewDefinition
extends java.lang.Object

An in-line view definition used with View and Conversation View definitions can be customized using MAINVIEW Explorer and exported as .vdf files using the "export view data" button.

See Also:
Conversation.viewSet(ViewDefinition, boolean), View

Field Summary
 java.lang.String applidData
          The application ID
 java.lang.String descData
          The view description
 boolean isCustom
          Has the view been customized
 java.lang.String nameData
          The base view name
 java.lang.String[] parameters
          Any parameters to be passed to the view
 java.lang.String productData
          The product field
 java.lang.String qwhere
          A qwhere string to be used with DataGet
static int SORTASCENDING
           
static int SORTDESCENDING
           
 java.lang.String sortField
          The Field to sort on
static int SORTNONE
          The sort type
 int sortType
           
 java.io.File source
          Where it was loaded from
 java.lang.String where
          A where string to be used with DataGet
 
Constructor Summary
ViewDefinition()
           
ViewDefinition(java.io.File text)
           
ViewDefinition(java.lang.String name)
          Create a view definition which refers to a view on the host.
 
Method Summary
 java.lang.String getDefinition()
           
 int getForm()
           
 java.lang.String getName()
           
 java.lang.String[] getParameters()
           
 java.lang.String getProduct()
          Lookup the product that this view came from using the products.properties file.
 java.lang.String getQwhere()
           
 java.lang.String getSortField()
           
 int getSortType()
           
 java.lang.String getWhere()
           
 void setDefinition(java.lang.String definition)
           
 void setForm(int form)
          Indicate that this view is a form of the current view using the same data sample.
 void setName(java.lang.String name)
           
 void setParameter(java.lang.String parameter)
           
 void setParameters(java.lang.String[] parameters)
           
 void setProduct(java.lang.String prod)
          Set which product supports this view
 void setQwhere(java.lang.String qwhere)
           
 void setSort(java.lang.String sortField)
           
 void setSort(java.lang.String sortField, int sortType)
           
 void setWhere(java.lang.String where)
           
 void write(java.io.BufferedWriter wtr)
          Create a file that can be used to reload the view.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

descData

public java.lang.String descData
The view description


nameData

public java.lang.String nameData
The base view name


productData

public java.lang.String productData
The product field


applidData

public java.lang.String applidData
The application ID


parameters

public java.lang.String[] parameters
Any parameters to be passed to the view


where

public java.lang.String where
A where string to be used with DataGet


qwhere

public java.lang.String qwhere
A qwhere string to be used with DataGet


isCustom

public boolean isCustom
Has the view been customized


source

public java.io.File source
Where it was loaded from


sortField

public java.lang.String sortField
The Field to sort on


SORTNONE

public static final int SORTNONE
The sort type

See Also:
Constant Field Values

SORTASCENDING

public static final int SORTASCENDING
See Also:
Constant Field Values

SORTDESCENDING

public static final int SORTDESCENDING
See Also:
Constant Field Values

sortType

public int sortType
Constructor Detail

ViewDefinition

public ViewDefinition()

ViewDefinition

public ViewDefinition(java.io.File text)
               throws java.io.IOException
Throws:
java.io.IOException

ViewDefinition

public ViewDefinition(java.lang.String name)
Create a view definition which refers to a view on the host.

Parameters:
name -
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getDefinition

public java.lang.String getDefinition()

setDefinition

public void setDefinition(java.lang.String definition)

write

public void write(java.io.BufferedWriter wtr)
           throws java.io.IOException
Create a file that can be used to reload the view.

Parameters:
wtr -
Throws:
java.io.IOException - on errors

getProduct

public java.lang.String getProduct()
Lookup the product that this view came from using the products.properties file.

Returns:
the product name or null if no definition has been loaded.
Throws:
java.lang.IllegalArgumentException - if the product is not in the file
See Also:
setDefinition(String)

setProduct

public void setProduct(java.lang.String prod)
Set which product supports this view

Parameters:
prod -

getParameters

public java.lang.String[] getParameters()
Returns:
the parameters

setParameter

public void setParameter(java.lang.String parameter)
Parameters:
parameter - Provide a single parameter

setParameters

public void setParameters(java.lang.String[] parameters)
Parameters:
parameters - the parameters to set

getSortField

public java.lang.String getSortField()
Returns:
the sortField

setSort

public void setSort(java.lang.String sortField)
Parameters:
sortField - the field to use

setSort

public void setSort(java.lang.String sortField,
                    int sortType)
Parameters:
sortField - the field to use
sortType - One of SORTASCENDING or SORTDESCENDING

getSortType

public int getSortType()
Returns:
one of SORTNONE. SORTASCENDING or SORTDESCENDING

getForm

public int getForm()
Returns:
the form number or -1 if never set
See Also:
setForm(int)

setForm

public void setForm(int form)
Indicate that this view is a form of the current view using the same data sample. The form number is a slot in the host server that is used to hold alternate forms.

Parameters:
form - the form number to set. 0 = base, or 1 - 20
See Also:
NOTE: Requires BPY8796 maintenance level on the host server.

getWhere

public java.lang.String getWhere()
Returns:
the where expression

setWhere

public void setWhere(java.lang.String where)
Parameters:
where - the expression to set

getQwhere

public java.lang.String getQwhere()
Returns:
the qwhere expression

setQwhere

public void setQwhere(java.lang.String qwhere)
Parameters:
qwhere - the expression to set