ariba.ui.table
Class AWTCSVDataSource

java.lang.Object
  extended by ariba.ui.table.AWTDataSource
      extended by ariba.ui.table.AWTCSVDataSource
All Implemented Interfaces:
CSVConsumer

public final class AWTCSVDataSource
extends AWTDataSource
implements CSVConsumer


Nested Class Summary
 class AWTCSVDataSource.Entity
           
static class AWTCSVDataSource.PeekIterator
           
 
Constructor Summary
AWTCSVDataSource()
           
 
Method Summary
static java.util.List computeOutlineList(java.util.List allItems, java.lang.String childrenKey, java.lang.String levelKey)
           
 void consumeLineOfTokens(java.lang.String path, int lineNumber, java.util.List line)
          Called once per CSV line read.
static AWTCSVDataSource dataSourceForCSVString(java.lang.String content)
           
static AWTCSVDataSource dataSourceForFile(java.io.File file)
           
static AWTCSVDataSource dataSourceForPath(java.lang.String path, AWComponent parentComponent)
           
static AWTCSVDataSource dataSourceForURL(java.net.URL url)
           
 AWTEntity entity()
           
 java.util.List fetchObjects()
          Returns the list of objects.
 boolean hasChanges()
          Should return true when underlying changes in the datasource indicate that the DisplayGroup should automatcally call fetchObjects() as soon as possible to present the user with recent changes.
 java.util.List headings()
           
 java.util.List objects()
          called when done
 
Methods inherited from class ariba.ui.table.AWTDataSource
dataSourceDoesSort, delete, insert, setSortOrderings
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTCSVDataSource

public AWTCSVDataSource()
Method Detail

entity

public AWTEntity entity()
Overrides:
entity in class AWTDataSource

objects

public java.util.List objects()
called when done


fetchObjects

public java.util.List fetchObjects()
Description copied from class: AWTDataSource
Returns the list of objects. Should list should be sorted if dataSourceDoesSort() has been overridden to return true

Specified by:
fetchObjects in class AWTDataSource
Returns:
array of fetched objects

hasChanges

public boolean hasChanges()
Description copied from class: AWTDataSource
Should return true when underlying changes in the datasource indicate that the DisplayGroup should automatcally call fetchObjects() as soon as possible to present the user with recent changes. Datasources for which fetching is not "free" should override this method to return false either always, or at least unless a special event has occured that indicates re-performing a fetch is warrented.

Overrides:
hasChanges in class AWTDataSource
Returns:
true if a fetch should be triggered immediately.

headings

public java.util.List headings()

dataSourceForFile

public static AWTCSVDataSource dataSourceForFile(java.io.File file)

dataSourceForURL

public static AWTCSVDataSource dataSourceForURL(java.net.URL url)

dataSourceForCSVString

public static AWTCSVDataSource dataSourceForCSVString(java.lang.String content)

dataSourceForPath

public static AWTCSVDataSource dataSourceForPath(java.lang.String path,
                                                 AWComponent parentComponent)

consumeLineOfTokens

public void consumeLineOfTokens(java.lang.String path,
                                int lineNumber,
                                java.util.List line)
Description copied from interface: CSVConsumer
Called once per CSV line read.

Specified by:
consumeLineOfTokens in interface CSVConsumer
Parameters:
path - the CSV source file
lineNumber - the current line being reported, 1-based.
line - a List of tokens parsed from a one line in the file

computeOutlineList

public static java.util.List computeOutlineList(java.util.List allItems,
                                                java.lang.String childrenKey,
                                                java.lang.String levelKey)


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.