|
Docmosis API 4.5.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The DataProvider interface marks classes that can provide data to the population phase of document production. Data may be "indexed" meaning that for a key there is a sequence of values. Sequenced data is used when populating repeating areas of a template such as lists or repeating table rows. Indexes are assumed to start at zero. The DataProvider interface also allow nesting of other data providers. This allows the building of data into naturally recursive structures. Many calls will be made to the DataProvider to fetch data so if the implementation performs lengthy operations in these methods, document production will be slowed. Note also that since the data population phase may be re-tried automatically, the implementation must be able to provide the data each time the getter method is called. This is mostly relevant to the getImage() method which must be able to produce the correct stream each time even if the stream has previously been partially read.
Method Summary | |
boolean |
getBoolean(String key)
Determine if the given key hs been set to true. |
DataProvider |
getDataProvider(String key,
int index)
Get the data provider contained within this data provider with the given key as a name, and an index. |
int |
getDataProviderCount(String key)
Return the number of data providers contained within this data provider with the given key as a name. |
InputStream |
getImage(String key)
Get an InputStream over the image with the given key. |
String |
getString(String key)
Get the value for the given key |
boolean |
hasBooleanKey(String key)
Determine if a value for the boolean key has been specified |
boolean |
hasDataProviderKey(String key)
Determine if a data provider for the key has been specified (even if null) |
boolean |
hasImageKey(String key)
Determine if the given image has been set (even if to null) |
boolean |
hasStringKey(String key)
Determine if the given string has been set (even if to null) |
Method Detail |
public String getString(String key)
key
- the to look up the value
public boolean hasStringKey(String key)
key
- the key for the String
public InputStream getImage(String key)
key
- the key under which to locate the image.
public boolean hasImageKey(String key)
key
- the key for the String
public boolean getBoolean(String key)
key
- the key to lookup
public boolean hasBooleanKey(String key)
key
- the key to lookup
public int getDataProviderCount(String key)
key
- the key (name) of the data providers to look for.
public boolean hasDataProviderKey(String key)
key
- the key with which to lookup the data provider
public DataProvider getDataProvider(String key, int index)
key
- the key (name) of the data provider to look for.index
- the index of the data provider.
|
Docmosis API 4.5.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |