com.webmethods.caf.faces.data.export
Class PageableExportProvider

java.lang.Object
  extended by com.webmethods.caf.faces.data.object.BoundPropertiesContentProvider
      extended by com.webmethods.caf.faces.data.object.BoundPropertiesTableContentProvider
          extended by com.webmethods.caf.faces.data.export.PageableExportProvider
All Implemented Interfaces:
IContentProvider, ISortableTableContentProvider, ITableContentProvider, IUpdateableContentProvider
Direct Known Subclasses:
AtomEntriesExportProvider, CSVExportProvider

public class PageableExportProvider
extends BoundPropertiesTableContentProvider
implements ISortableTableContentProvider

Pageable and sortable provider which limits a wrapped table content-provider to exposing a specified set of properties; these properties are specified via binding expressions.


Field Summary
protected  int m_first
           
protected  int m_rows
           
static ISortInfo NO_SORT
           
 
Fields inherited from class com.webmethods.caf.faces.data.object.BoundPropertiesContentProvider
m_keys, m_provider, m_var
 
Constructor Summary
PageableExportProvider()
          Blank provider.
PageableExportProvider(ITableContentProvider provider, Map keys, String var)
          Provider limiting specified provider to specified keys.
 
Method Summary
 int getFirst()
          Zero-based index of first row in page.
 int getRowIndex()
          Return the zero-relative index of the currently selected row.
 int getRows()
          Number of rows in page.
 ISortInfo getSort()
          Returns current sort info.
 boolean isRowAvailable()
          Return a flag indicating whether there is rowData available at the current rowIndex.
 void setFirst(int first)
          Zero-based index of first row in page.
 void setRowIndex(int rowIndex)
          Set the zero-relative index of the currently selected row, or -1 to indicate that we are not positioned on a row.
 void setRows(int rows)
          Number of rows in page.
 void setSort(ISortInfo sort)
          Sets new sort info, re-sorting the table (if necessary).
 
Methods inherited from class com.webmethods.caf.faces.data.object.BoundPropertiesTableContentProvider
getCurrentRow, getRowCount, getRowVariable, getTableProvider, setRowVariable
 
Methods inherited from class com.webmethods.caf.faces.data.object.BoundPropertiesContentProvider
createDefaultKeys, getKeys, getPropertyKeys, getProvider, getType, getValue, getVar, hasProperty, isReadOnly, setKeys, setProvider, setValue, setVar, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webmethods.caf.faces.data.ITableContentProvider
getCurrentRow, getRowCount, getRowVariable, setRowVariable
 
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
getPropertyKeys, getType, getValue, hasProperty, toString
 

Field Detail

NO_SORT

public static final ISortInfo NO_SORT

m_first

protected int m_first

m_rows

protected int m_rows
Constructor Detail

PageableExportProvider

public PageableExportProvider()
Blank provider. Must be initialized with BoundPropertiesContentProvider.setProvider(com.webmethods.caf.faces.data.IContentProvider), BoundPropertiesContentProvider.setKeys(java.util.Map), and BoundPropertiesContentProvider.setVar(java.lang.String).


PageableExportProvider

public PageableExportProvider(ITableContentProvider provider,
                              Map keys,
                              String var)
Provider limiting specified provider to specified keys.

Method Detail

getRowIndex

public int getRowIndex()
Description copied from interface: ITableContentProvider
Return the zero-relative index of the currently selected row.

If we are not currently positioned on a row, or no wrappedData is available, return -1.

Specified by:
getRowIndex in interface ITableContentProvider
Overrides:
getRowIndex in class BoundPropertiesTableContentProvider
See Also:
DataModel

isRowAvailable

public boolean isRowAvailable()
Description copied from interface: ITableContentProvider
Return a flag indicating whether there is rowData available at the current rowIndex. If no wrappedData is available, return false.

Specified by:
isRowAvailable in interface ITableContentProvider
Overrides:
isRowAvailable in class BoundPropertiesTableContentProvider
See Also:
DataModel

setRowIndex

public void setRowIndex(int rowIndex)
Description copied from interface: ITableContentProvider
Set the zero-relative index of the currently selected row, or -1 to indicate that we are not positioned on a row.

Specified by:
setRowIndex in interface ITableContentProvider
Overrides:
setRowIndex in class BoundPropertiesTableContentProvider
See Also:
DataModel

getSort

public ISortInfo getSort()
Description copied from interface: ISortableTableContentProvider
Returns current sort info. Never null.

Specified by:
getSort in interface ISortableTableContentProvider
Returns:
currenly set sort info

setSort

public void setSort(ISortInfo sort)
Description copied from interface: ISortableTableContentProvider
Sets new sort info, re-sorting the table (if necessary). This does not change the model's rowIndex property, even though it will probably now point to a different row.

Specified by:
setSort in interface ISortableTableContentProvider
Parameters:
sort - Sort info, must not be null.

getFirst

public int getFirst()
Zero-based index of first row in page.


setFirst

public void setFirst(int first)
Zero-based index of first row in page.


getRows

public int getRows()
Number of rows in page.


setRows

public void setRows(int rows)
Number of rows in page.