|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataProvider
This interface shall be implemented to provide new data to a RepositoryEntry.
The data is shown in a table within the ProductGrabber.
To add a DataProvider to the ProductGrabber use the following example code:
ProductGrabberVPI.getInstance().getRepositoryManager().addDataProvider(new SampleDataProvider());
| Method Summary | |
|---|---|
void |
cleanUp(RepositoryEntry entry,
Repository repository)
Implementation should delete all stored data. |
void |
createData(RepositoryEntry entry,
Repository repository)
Implementation should create the data this DataProvider provides. |
Comparator |
getComparator()
Returns the Comparator for the data provided by this DataProvider. |
Object |
getData(RepositoryEntry entry,
Repository repository)
Returns the data which is provided by this implementation. |
TableColumn |
getTableColumn()
Returns a TableColumn which defines the UI representation of the provided data within a
Table. |
boolean |
mustCreateData(RepositoryEntry entry,
Repository repository)
Implementation should check if the data this DataProvider provides must be created, or if it is
already stored. |
| Method Detail |
|---|
boolean mustCreateData(RepositoryEntry entry,
Repository repository)
DataProvider provides must be created, or if it is
already stored.
entry - the entry for which the data shall be provided.repository - the repsoitory containing the entry.
void createData(RepositoryEntry entry,
Repository repository)
throws IOException
DataProvider provides.
Also the created should be stored for performance reasons.
Created data can be stored into a PropertyMap retrieved by calling
Repository.getPropertyMap()
or in a directory retrieved from
Repository.getStorageDir().
entry - the entry for which the data shall be provided.repository - the repository containing the entry. // todo - (from nf) for what? entry knows it repository!
IOException - if an error occurs during creating the data.
Object getData(RepositoryEntry entry,
Repository repository)
throws IOException
entry - the entry for which the data shall be provided.repository - the repository containing the entry. // todo - (from nf) for what? entry knows it repository!
IOException - if an error occurs during providing the data.Comparator getComparator()
Comparator for the data provided by this DataProvider.
void cleanUp(RepositoryEntry entry,
Repository repository)
entry - the entry for which the data was provided.repository - the repository contained the entry. // todo - (from nf) for what? entry knows it repository!TableColumn getTableColumn()
TableColumn which defines the UI representation of the provided data within a
Table.
TableColumn.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||