gov.nasa.pds.registry.ui.client
Class PackageTableModel

java.lang.Object
  extended by com.google.gwt.gen2.table.client.TableModel<RowType>
      extended by com.google.gwt.gen2.table.client.MutableTableModel<ViewRegistryPackage>
          extended by gov.nasa.pds.registry.ui.client.PackageTableModel
All Implemented Interfaces:
com.google.gwt.gen2.table.event.client.HasRowCountChangeHandlers, com.google.gwt.gen2.table.event.client.HasRowInsertionHandlers, com.google.gwt.gen2.table.event.client.HasRowRemovalHandlers, com.google.gwt.gen2.table.event.client.HasRowValueChangeHandlers<ViewRegistryPackage>

public class PackageTableModel
extends com.google.gwt.gen2.table.client.MutableTableModel<ViewRegistryPackage>

Table model for packages. Determines the behaviors for retrieving data to fill the paging scrolling table.

Author:
hyunlee

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.gen2.table.client.TableModel
com.google.gwt.gen2.table.client.TableModel.Callback<RowType>
 
Field Summary
 
Fields inherited from class com.google.gwt.gen2.table.client.TableModel
ALL_ROWS, UNKNOWN_ROW_COUNT
 
Constructor Summary
PackageTableModel()
           
 
Method Summary
 void addFilter(String key, String value)
          Add a filter condition
 void clearFilters()
          Clear filters prior to new request
 void deletePackage(ViewRegistryPackage registryPackage, com.google.gwt.user.client.rpc.AsyncCallback<Boolean> asyncCallback)
           
 void getRemotePassword(com.google.gwt.user.client.rpc.AsyncCallback<String> asyncCallback)
           
 void getRemoteUser(com.google.gwt.user.client.rpc.AsyncCallback<String> asyncCallback)
           
 void getSessionId(com.google.gwt.user.client.rpc.AsyncCallback<String> asyncCallback)
           
protected  boolean onRowInserted(int beforeRow)
           
protected  boolean onRowRemoved(int row)
           
protected  boolean onSetRowValue(int row, ViewRegistryPackage rowValue)
           
 void requestRows(com.google.gwt.gen2.table.client.TableModelHelper.Request request, com.google.gwt.gen2.table.client.TableModel.Callback<ViewRegistryPackage> callback)
          Get rows from table as necessary.
 void updatePackage(ViewRegistryPackage viewRegistryPackage, com.google.gwt.user.client.rpc.AsyncCallback<Boolean> asyncCallback)
           
 
Methods inherited from class com.google.gwt.gen2.table.client.MutableTableModel
addRowInsertionHandler, addRowRemovalHandler, addRowValueChangeHandler, insertRow, removeRow, setRowValue
 
Methods inherited from class com.google.gwt.gen2.table.client.TableModel
addHandler, addRowCountChangeHandler, fireEvent, getHandlerManager, getRowCount, isEventHandled, removeHandler, setRowCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageTableModel

public PackageTableModel()
Method Detail

addFilter

public void addFilter(String key,
                      String value)
Add a filter condition

Parameters:
key - filter name
value - filter value

clearFilters

public void clearFilters()
Clear filters prior to new request


requestRows

public void requestRows(com.google.gwt.gen2.table.client.TableModelHelper.Request request,
                        com.google.gwt.gen2.table.client.TableModel.Callback<ViewRegistryPackage> callback)
Get rows from table as necessary. Call only supports the request, filters are added separately, prior to calling the row request.

Specified by:
requestRows in class com.google.gwt.gen2.table.client.TableModel<ViewRegistryPackage>
Parameters:
request - request containing paging and sort info
callback - callback function to handle the response

updatePackage

public void updatePackage(ViewRegistryPackage viewRegistryPackage,
                          com.google.gwt.user.client.rpc.AsyncCallback<Boolean> asyncCallback)

deletePackage

public void deletePackage(ViewRegistryPackage registryPackage,
                          com.google.gwt.user.client.rpc.AsyncCallback<Boolean> asyncCallback)

getRemoteUser

public void getRemoteUser(com.google.gwt.user.client.rpc.AsyncCallback<String> asyncCallback)

getRemotePassword

public void getRemotePassword(com.google.gwt.user.client.rpc.AsyncCallback<String> asyncCallback)

getSessionId

public void getSessionId(com.google.gwt.user.client.rpc.AsyncCallback<String> asyncCallback)

onRowInserted

protected boolean onRowInserted(int beforeRow)
Specified by:
onRowInserted in class com.google.gwt.gen2.table.client.MutableTableModel<ViewRegistryPackage>

onRowRemoved

protected boolean onRowRemoved(int row)
Specified by:
onRowRemoved in class com.google.gwt.gen2.table.client.MutableTableModel<ViewRegistryPackage>

onSetRowValue

protected boolean onSetRowValue(int row,
                                ViewRegistryPackage rowValue)
Specified by:
onSetRowValue in class com.google.gwt.gen2.table.client.MutableTableModel<ViewRegistryPackage>


Copyright © 2010-2013 Planetary Data System. All Rights Reserved.