Package fmpp.localdatabuilders
Class TddHashLocalDataBuilder
java.lang.Object
fmpp.localdatabuilders.CachingLocalDataBuilder
fmpp.localdatabuilders.TddHashLocalDataBuilder
- All Implemented Interfaces:
LocalDataBuilder
,ProgressListener
Builds data from a TDD hash, interpreting function calls as data loader
invocations. The hash is evaluated when
LocalDataBuilder.build(fmpp.Engine, fmpp.TemplateEnvironment)
is invoked first. Then the result is stored until the end of the processing
session, to be reused for all subsequent LocalDataBuilder.build(fmpp.Engine, fmpp.TemplateEnvironment)
invokations.
This local data builder is what localData setting uses, when the
last parameter to the case function is a hash, e.g.:
localData: [case(sub/, {bgColor:green, doc:xml(data/foo.xml)})].
-
Field Summary
Fields inherited from interface fmpp.ProgressListener
EVENT_BEGIN_FILE_PROCESSING, EVENT_BEGIN_PROCESSING_SESSION, EVENT_CREATED_EMPTY_DIR, EVENT_END_FILE_PROCESSING, EVENT_END_PROCESSING_SESSION, EVENT_IGNORING_DIR, EVENT_SOURCE_NOT_MODIFIED, EVENT_WARNING
-
Constructor Summary
ConstructorsConstructorDescriptionTddHashLocalDataBuilder
(Fragment fragment) TddHashLocalDataBuilder
(String tddHash) -
Method Summary
Methods inherited from class fmpp.localdatabuilders.CachingLocalDataBuilder
build, notifyProgressEvent
-
Constructor Details
-
TddHashLocalDataBuilder
-
TddHashLocalDataBuilder
-
-
Method Details
-
build
Description copied from class:CachingLocalDataBuilder
Override this method in your local data builder class.- Specified by:
build
in classCachingLocalDataBuilder
- Throws:
Exception
-
toString
-