Package org.javarosa.core.model.utils
Class QuestionPreloader
java.lang.Object
org.javarosa.core.model.utils.QuestionPreloader
public class QuestionPreloader extends Object
The Question Preloader is responsible for maintaining a set of handlers which are capable
of parsing 'preload' elements, and their parameters, and returning IAnswerData objects.
- Author:
- Clayton Sims
-
Constructor Summary
Constructors Constructor Description QuestionPreloader()Creates a new Preloader with default handlers -
Method Summary
Modifier and Type Method Description voidaddPreloadHandler(IPreloadHandler handler)Adds a new preload handler to this preloader.IAnswerDatagetQuestionPreload(String preloadType, String preloadParams)Returns the IAnswerData preload value for the given preload type and parametersbooleanquestionPostProcess(TreeElement node, String preloadType, String params)
-
Constructor Details
-
QuestionPreloader
public QuestionPreloader()Creates a new Preloader with default handlers
-
-
Method Details
-
addPreloadHandler
Adds a new preload handler to this preloader.- Parameters:
handler- an IPreloadHandler that can handle a preload type
-
getQuestionPreload
Returns the IAnswerData preload value for the given preload type and parameters- Parameters:
preloadType- The type of the preload to be returnedpreloadParams- Parameters for the preload handler- Returns:
- An IAnswerData corresponding to a pre-loaded value for the given Arguments. null if no preload could successfully be derived due to either the lack of a handler, or to invalid parameters
-
questionPostProcess
-