com.ibm.xsp.model.domino
Class DominoViewDataModel

java.lang.Object
  extended by javax.faces.model.DataModel
      extended by com.ibm.xsp.model.TabularDataModel
          extended by com.ibm.xsp.model.domino.DominoViewDataModel
All Implemented Interfaces:
DataModelEx

public class DominoViewDataModel
extends TabularDataModel

DominoViewDataModel represents a class that wraps a Domino View Data Source


Field Summary
 
Fields inherited from class com.ibm.xsp.model.TabularDataModel
_rowIndex, _wrappedData, dataControl, RESORT_ASCENDING, RESORT_BOTH, RESORT_DESCENDING, RESORT_NONE, RESORT_UNKNOWN, SORT_ASCENDING, SORT_DESCENDING, SORT_TOGGLE, TYPE_CATEGORY, TYPE_ENTRY, TYPE_TOTAL, TYPE_UNKNOWN
 
Constructor Summary
DominoViewDataModel(DominoViewData viewData)
          Construct a data model from the data source
 
Method Summary
 void addSelectedId(java.lang.String id)
          Add the specified id to the selected list
 boolean canHaveMoreRows()
          Return true where the data model is not able to compute the precise number of rows in a data source and therefore can potentially have more rows than initial count.
 void clearSelectedIds()
          Clear the list of selected ids.
 void collapseRow(java.lang.String position)
          collapse the row at this position
 void deleteSelectedItems()
          Delete the selected items and clear the list of selected ids.
 void expandRow(java.lang.String position)
          expand the row at this position
 int getCategoryColumnIndex(java.lang.String columnName)
           
 int getCategoryCount()
          Return the number of categoized columns
 java.lang.String getCategoryFilter()
          Return the category filter
 int getCategoryIndentLevel()
          Return the Category Indent Level (-1)
 java.lang.String getCategoryName()
          Return the Category name Returns null
 int getColumnIndentLevel()
          Return the Column Indent Level (-1)
 java.util.Vector getColumnValues()
          get the Columns Values as a Vector.
 DominoViewData getDominoViewData()
          returns the data source
 com.ibm.xsp.model.domino.DominoViewDataContainer getDominoViewDataContainer()
          returns the data container
 int getIndentLevel()
          Return the Indent Level (-1)
 java.lang.String getResortColumn()
          Return the name of the resort column
 int getResortState(java.lang.String columnName)
          Return the resort state of the column specified
 int getResortType(java.lang.String columnName)
          Return the resort type of the column specified
 int getRowCount()
           
 java.lang.Object getRowData()
           
 java.lang.String getRowId()
          Return the current row id
 java.lang.String getRowPosition()
          Return the current row position
 int getRowType()
          Return the row type - TYPE_ENTRY, TYPE_CATEGORY, TYPE_TOTAL Default is TYPE_UNKNOWN
 java.util.Iterator<java.lang.String> getSelectedIds()
          Return an iterator of the selected ids.
 lotus.domino.View getView()
          Return the associated document view
 java.lang.String getViewName()
          Return the name of the View that this View Data Model is based on
 boolean hasCategoryFilter()
          Is a category filter applied to the data
 boolean hasFTFilter()
          has Full Test Search Filter
 boolean hasKeysFilter()
          has Keys filter applied
 int hasMoreRows(int maxCount)
          Check if it might have rows beyond the count.
 boolean isCategorized()
          Is the data source itself is categorized
 boolean isColumnCategorized(java.lang.String columnName)
          Is column categorized
 boolean isColumnSortable(java.lang.String columnName)
           
 boolean isRowCategory()
          Is current row a category heading
 boolean isRowCollapsed()
          Is the row collapsed.
 boolean isRowCollapsed(java.lang.String position)
          Is the row collapsed for the given row index position
 boolean isRowData()
          Is the row is regular data row (not a category or total)
 boolean isRowExpanded()
          Is the row expanded.
 boolean isRowExpanded(java.lang.String position)
          Is the row expanded for the given row index position
 boolean isRowLeaf()
          Return true is row is leaf
 boolean isRowNonData()
          Is the row is a category or total or any non-regular row entry
 boolean isRowTotal()
          Does current row contain a total value
 boolean isRowUnread()
          Is row unread
 boolean isRowUnread(java.lang.String onBehalfOfUser)
          Is row read by user specified
 boolean isSelectedId(java.lang.String id)
          Return true if the specified id is selected
 void removeSelectedId(java.lang.String id)
          Remove the specified id to the selected list
 int resetResortState(java.lang.String columnName)
          Reset the resort state for the column (returns -1)
 void setDataControl(FacesDataIterator dataControl)
          Set the Data Control
 void setDominoViewDataContainer(DominoViewData dvd)
          sets the data container via the data source
 void setDominoViewDataContainer(com.ibm.xsp.model.domino.DominoViewDataContainer dvdc)
          sets the data container directly
 void setResortOrder(java.lang.String columnName, java.lang.String sortOrder)
          Set the Resort order for specified column, ascending, descending, toggle
 void toggleRow(java.lang.String position)
          invert the expand/collapse state of a row
 
Methods inherited from class com.ibm.xsp.model.TabularDataModel
codeToParameter, duplicateRowData, getDataControl, getRowIndex, getWrappedData, insertRowData, isRowAvailable, parameterToCode, removeRowData, setRowData, setRowIndex, setWrappedData
 
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, removeDataModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DominoViewDataModel

public DominoViewDataModel(DominoViewData viewData)
Construct a data model from the data source

Method Detail

getDominoViewData

public DominoViewData getDominoViewData()
returns the data source

Returns:
the data source

setDominoViewDataContainer

public void setDominoViewDataContainer(DominoViewData dvd)
sets the data container via the data source

Parameters:
dvd - the data container

setDominoViewDataContainer

public void setDominoViewDataContainer(com.ibm.xsp.model.domino.DominoViewDataContainer dvdc)
sets the data container directly

Parameters:
dvdc - the data container

getDominoViewDataContainer

public com.ibm.xsp.model.domino.DominoViewDataContainer getDominoViewDataContainer()
returns the data container

Returns:
the data container

setDataControl

public void setDataControl(FacesDataIterator dataControl)
Set the Data Control

Overrides:
setDataControl in class TabularDataModel

getView

public lotus.domino.View getView()
Return the associated document view


getRowCount

public int getRowCount()
Specified by:
getRowCount in class javax.faces.model.DataModel

canHaveMoreRows

public boolean canHaveMoreRows()
Description copied from class: TabularDataModel
Return true where the data model is not able to compute the precise number of rows in a data source and therefore can potentially have more rows than initial count.

Default is false

Overrides:
canHaveMoreRows in class TabularDataModel
Returns:
true is data source can have more rows

hasMoreRows

public int hasMoreRows(int maxCount)
Description copied from class: TabularDataModel
Check if it might have rows beyond the count. This happens when the data model is not able to compute the precise count number, or when it is too costly to achieve. So this function tries to

Overrides:
hasMoreRows in class TabularDataModel
Returns:
the number of rows beyond the count. If the result is greater that maxCount it means there might be even more...

getRowData

public java.lang.Object getRowData()
Specified by:
getRowData in class javax.faces.model.DataModel

getColumnValues

public java.util.Vector getColumnValues()
Description copied from class: TabularDataModel
get the Columns Values as a Vector. Returns null

Overrides:
getColumnValues in class TabularDataModel

getSelectedIds

public java.util.Iterator<java.lang.String> getSelectedIds()
Return an iterator of the selected ids.

Overrides:
getSelectedIds in class TabularDataModel

clearSelectedIds

public void clearSelectedIds()
Clear the list of selected ids.

Overrides:
clearSelectedIds in class TabularDataModel

isSelectedId

public boolean isSelectedId(java.lang.String id)
Return true if the specified id is selected

Overrides:
isSelectedId in class TabularDataModel

addSelectedId

public void addSelectedId(java.lang.String id)
Add the specified id to the selected list

Overrides:
addSelectedId in class TabularDataModel

removeSelectedId

public void removeSelectedId(java.lang.String id)
Remove the specified id to the selected list

Overrides:
removeSelectedId in class TabularDataModel

deleteSelectedItems

public void deleteSelectedItems()
                         throws java.io.IOException
Description copied from class: TabularDataModel
Delete the selected items and clear the list of selected ids.

Overrides:
deleteSelectedItems in class TabularDataModel
Throws:
java.io.IOException

setResortOrder

public void setResortOrder(java.lang.String columnName,
                           java.lang.String sortOrder)
Description copied from class: TabularDataModel
Set the Resort order for specified column, ascending, descending, toggle

Overrides:
setResortOrder in class TabularDataModel

getResortType

public int getResortType(java.lang.String columnName)
Description copied from class: TabularDataModel
Return the resort type of the column specified

RESORT_NONE, RESORT_ASCENDING, RESORT_DESCENDING, RESORT_BOTH

Default is RESORT_NONE

Overrides:
getResortType in class TabularDataModel
Parameters:
columnName - column
Returns:
resort type

getResortState

public int getResortState(java.lang.String columnName)
Description copied from class: TabularDataModel
Return the resort state of the column specified

RESORT_NONE, RESORT_ASCENDING, RESORT_DESCENDING, RESORT_BOTH

Default is RESORT_NONE

Overrides:
getResortState in class TabularDataModel
Parameters:
columnName - column
Returns:
resort state

getResortColumn

public java.lang.String getResortColumn()
Description copied from class: TabularDataModel
Return the name of the resort column

Overrides:
getResortColumn in class TabularDataModel

resetResortState

public int resetResortState(java.lang.String columnName)
Description copied from class: TabularDataModel
Reset the resort state for the column (returns -1)

Overrides:
resetResortState in class TabularDataModel

getRowType

public int getRowType()
Description copied from class: TabularDataModel
Return the row type - TYPE_ENTRY, TYPE_CATEGORY, TYPE_TOTAL Default is TYPE_UNKNOWN

Overrides:
getRowType in class TabularDataModel

isRowLeaf

public boolean isRowLeaf()
Description copied from class: TabularDataModel
Return true is row is leaf

Default is false

Overrides:
isRowLeaf in class TabularDataModel

getCategoryIndentLevel

public int getCategoryIndentLevel()
Description copied from class: TabularDataModel
Return the Category Indent Level (-1)

Overrides:
getCategoryIndentLevel in class TabularDataModel

getIndentLevel

public int getIndentLevel()
Description copied from class: TabularDataModel
Return the Indent Level (-1)

Overrides:
getIndentLevel in class TabularDataModel

getColumnIndentLevel

public int getColumnIndentLevel()
Description copied from class: TabularDataModel
Return the Column Indent Level (-1)

Overrides:
getColumnIndentLevel in class TabularDataModel

isRowCategory

public boolean isRowCategory()
Description copied from class: TabularDataModel
Is current row a category heading

Overrides:
isRowCategory in class TabularDataModel

getRowPosition

public java.lang.String getRowPosition()
Description copied from class: TabularDataModel
Return the current row position

Overrides:
getRowPosition in class TabularDataModel

getRowId

public java.lang.String getRowId()
Description copied from class: TabularDataModel
Return the current row id

Overrides:
getRowId in class TabularDataModel

getCategoryName

public java.lang.String getCategoryName()
Description copied from class: TabularDataModel
Return the Category name Returns null

Overrides:
getCategoryName in class TabularDataModel

getCategoryColumnIndex

public int getCategoryColumnIndex(java.lang.String columnName)
Overrides:
getCategoryColumnIndex in class TabularDataModel
Returns:
index of category column among category columns 0 = 1st categorized column, 1 = 2nd categorized column, etc. Integer.MIN_VALUE is returned for any error situation

toggleRow

public void toggleRow(java.lang.String position)
Description copied from class: TabularDataModel
invert the expand/collapse state of a row

Overrides:
toggleRow in class TabularDataModel

expandRow

public void expandRow(java.lang.String position)
Description copied from class: TabularDataModel
expand the row at this position

Overrides:
expandRow in class TabularDataModel

collapseRow

public void collapseRow(java.lang.String position)
Description copied from class: TabularDataModel
collapse the row at this position

Overrides:
collapseRow in class TabularDataModel

isRowCollapsed

public boolean isRowCollapsed(java.lang.String position)
Is the row collapsed for the given row index position

Parameters:
position - specified row index
Returns:

isRowExpanded

public boolean isRowExpanded(java.lang.String position)
Is the row expanded for the given row index position

Parameters:
position - specified row index
Returns:

isRowCollapsed

public boolean isRowCollapsed()
Description copied from class: TabularDataModel
Is the row collapsed. Default false

Overrides:
isRowCollapsed in class TabularDataModel

isRowExpanded

public boolean isRowExpanded()
Description copied from class: TabularDataModel
Is the row expanded. Default false

Overrides:
isRowExpanded in class TabularDataModel

isRowTotal

public boolean isRowTotal()
Description copied from class: TabularDataModel
Does current row contain a total value

Overrides:
isRowTotal in class TabularDataModel

isRowNonData

public boolean isRowNonData()
Description copied from class: TabularDataModel
Is the row is a category or total or any non-regular row entry

Overrides:
isRowNonData in class TabularDataModel
Returns:
true if the row is a category or total

isRowData

public boolean isRowData()
Description copied from class: TabularDataModel
Is the row is regular data row (not a category or total)

Overrides:
isRowData in class TabularDataModel
Returns:
true if it is a regular data row - not a category or total

isRowUnread

public boolean isRowUnread()
Description copied from class: TabularDataModel
Is row unread

Overrides:
isRowUnread in class TabularDataModel

isRowUnread

public boolean isRowUnread(java.lang.String onBehalfOfUser)
Description copied from class: TabularDataModel
Is row read by user specified

Overrides:
isRowUnread in class TabularDataModel

isColumnCategorized

public boolean isColumnCategorized(java.lang.String columnName)
Description copied from class: TabularDataModel
Is column categorized

Overrides:
isColumnCategorized in class TabularDataModel

isColumnSortable

public boolean isColumnSortable(java.lang.String columnName)
Overrides:
isColumnSortable in class TabularDataModel

isCategorized

public boolean isCategorized()
Description copied from class: TabularDataModel
Is the data source itself is categorized

Overrides:
isCategorized in class TabularDataModel
Returns:
true if data source itself is categorized

getCategoryCount

public int getCategoryCount()
Description copied from class: TabularDataModel
Return the number of categoized columns

Overrides:
getCategoryCount in class TabularDataModel

getCategoryFilter

public java.lang.String getCategoryFilter()
Description copied from class: TabularDataModel
Return the category filter

Overrides:
getCategoryFilter in class TabularDataModel

hasCategoryFilter

public boolean hasCategoryFilter()
Description copied from class: TabularDataModel
Is a category filter applied to the data

Overrides:
hasCategoryFilter in class TabularDataModel

hasKeysFilter

public boolean hasKeysFilter()
Description copied from class: TabularDataModel
has Keys filter applied

Overrides:
hasKeysFilter in class TabularDataModel

hasFTFilter

public boolean hasFTFilter()
Description copied from class: TabularDataModel
has Full Test Search Filter

Overrides:
hasFTFilter in class TabularDataModel

getViewName

public java.lang.String getViewName()
Return the name of the View that this View Data Model is based on

Returns:
the name of the View