com.arsdigita.acs
Interface DataSource

All Known Implementing Classes:
AdSet, Selection, VectorDataSource, EmailQueue

public interface DataSource

Interface for representing data objects that we will display in templates. Provides a generic interface for iterating over lists of items and getting properties from the currently-active item.


Method Summary
 boolean contains(String column)
          Returns true if column is a valid column in this datasource; returns false otherwise.
 String get(String key)
          Generic get-property method; returns the value of the column named by key for the currently active
 String[] keys()
          Returns a list of valid keys in this datasource, for use with get().
 boolean next()
          Advances to the next item, if there is one, and returns true; returns false otherwise.
 int rownum()
          Returns the current row number in the datasource.
 

Method Detail

contains

public boolean contains(String column)
                 throws DataSourceException
Returns true if column is a valid column in this datasource; returns false otherwise.

get

public String get(String key)
           throws DataSourceException
Generic get-property method; returns the value of the column named by key for the currently active

next

public boolean next()
             throws DataSourceException
Advances to the next item, if there is one, and returns true; returns false otherwise.

keys

public String[] keys()
              throws DataSourceException
Returns a list of valid keys in this datasource, for use with get().

rownum

public int rownum()
           throws DataSourceException
Returns the current row number in the datasource.