|
Docmosis API 4.5.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.docmosis.template.population.DebugDataProvider
This DataProvider implementation has been added to help with debugging or analysing the process of template population. It returns dummy values based for each call and logs what it is doing to the logger at DEBUG level. This class can be applied to the population of a new template to quickly get a list of the pattern of calls made to the data provider. The real data provider can then be based on this as desired.
Constructor Summary | |
DebugDataProvider()
|
Method Summary | |
boolean |
getBoolean(String key)
Log a call to this method and return true. |
DataProvider |
getDataProvider(String key,
int index)
Log a call to this method and return a new DebugDataProvider |
int |
getDataProviderCount(String key)
Log a call to this method and return 1 |
InputStream |
getImage(String key)
Log a call to this method and return null. |
String |
getString(String key)
Log a call to this method and return the given key. |
boolean |
hasBooleanKey(String key)
Log a call to this method and return true. |
boolean |
hasDataProviderKey(String key)
Log a call to this method and return true |
boolean |
hasImageKey(String key)
Log a call to this method and return false. |
boolean |
hasStringKey(String key)
Log a call to this method and return true. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DebugDataProvider()
Method Detail |
public int getDataProviderCount(String key)
getDataProviderCount
in interface DataProvider
key
- the key (name) of the data providers to look for.
public boolean hasDataProviderKey(String key)
hasDataProviderKey
in interface DataProvider
key
- the key with which to lookup the data provider
public DataProvider getDataProvider(String key, int index)
getDataProvider
in interface DataProvider
key
- the key (name) of the data provider to look for.index
- the index of the data provider.
public InputStream getImage(String key)
getImage
in interface DataProvider
key
- the key under which to locate the image.
public boolean hasImageKey(String key)
hasImageKey
in interface DataProvider
key
- the key for the String
public String getString(String key)
getString
in interface DataProvider
key
- the to look up the value
public boolean hasStringKey(String key)
hasStringKey
in interface DataProvider
key
- the key for the String
public boolean getBoolean(String key)
getBoolean
in interface DataProvider
key
- the key to lookup
public boolean hasBooleanKey(String key)
hasBooleanKey
in interface DataProvider
key
- the key to lookup
|
Docmosis API 4.5.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |