Input Sources
back to index
In order to allow the framework to speak to any external source, a set of interface objects are provided that offer a consistent interface (
IValueSource) to retrieve the input values from a source:

The framework provides the following input sources:
MapSource - Retrieves the input values to be assigned to an object from a Map<String,Object> provided by the user. This is useful if the values already come in this format, for example : HTTP Headers, HTTP Request Parameters, HTTP Sessions, etc.
ObjectSource - Retrieves the input values to be assigned to an object from another object provided by the user.
SwingSource - Extracts the input values to be assigned to an object from the components of a Swing Form. This source intelligently selects the appropriate property for each component. For example, if a value has to be read from a JTextField, it will use the getText() method. However, if the value has to be retrieved from a Scrollbar, getValue() will be used. Check the javadoc for the list of supported components and the invoked getters in each case
HttpRequestSource - Extracts the input values to be assigned to an object from the parameters coming with an HTTP Request
StructuredContentSource - Extracts the input values to be assigned to an object from a string content, applying a different regular expressions depending on the property to retrieve. This would be useful for screen-scraping applications or other similar situations, in which you have a blob of text and want to extract different portions of that text as specific object properties.
XMLContentSource - Extracts the input values to be assigned to an object from an XML document, applying a different XPath expressions depending on the property to retrieve.