Explore the sample project
You can download the SDK sample pack and SDK javadocs at the Redpoint Global support site.
After downloading the sample pack, you can find source code for the samples in the net.redpoint.dataflow.samples
package, under samples\src\main\java
.
The SDK sample pack contains a variety of simple tools that demonstrate the capabilities of the SDK:
DelimitedInputSampleTool
This tool reads a comma-delimited file from the server's filesystem and produces a stream of Records. Key concepts include:
Implementing
InputTool.
The
@FileBrowse
annotation so that user can browse for an input file.T
he@SchemaEditor
annotation so the user can edit the input file Schema directly.T
he@Trigger
annotation to hide and show a dependent control.
LowercaseTransformSampleTool
This tool reads from the input connector, converts all text fields to lowercase, appends an integer field containing the total number of converted characters, and copies the unchanged fields through to the output connector. Key concepts include:
Implementing
TransformTool.
Modifying an input
Schema
to produce a derived outputSchema.
Using
RecordCopier
to efficiently copy fields from input to outputRecords.
DelimitedOutputSampleTool
This tool accepts a stream of records and writes a comma-delimited file to the server's filesystem. Key concepts include:
Implements
OutputTool.
The
@FileBrowse
annotation so that user can browse for an output file.Call
context.tracemessage()
to output a message to the project log.
TableJoinGeneralSampleTool
This tool reads two inputs, performs a single-field equality join, and outputs the joined records. Key concepts include:
Implements
GeneralTool.
Shows how the
getInputConnectorTypes()
andgetOutputConnectorTypes()
methods tell RPDM which connectors are available.Shows how to read records from
RecordSourceBlocking
and write toRecordDestinationBlocking.
Shows how to create an output
Schema
that is a combination of the two inputSchemas.
PropertiesSampleTool
This tool outputs the values of all of its user-settable properties. it demonstrates various options for configuring properties and annotations. Key concepts include:
Implements
InputTool.
Demonstrates a wide spectrum of UI property annotations for the basic controls.
Use of
@Tab
,@GroupStart
,@GroupEnd
annotations for layout control.Use of
@Trigger
and@MultiTrigger
annotations to hide/show/enable/disable other controls.
ReflectorSampleTool
This tool demonstrates how a transform tool can copy fields and their values between input and output records. Key concepts include:
Implements
TransformTool.
Uses
RecordCopier
to copy fields from input to output efficiently.
TokenizerSampleTool
This tool breaks up input strings into tokens (or words). Key concepts include:
Implements
GeneralTool.
Implements
HasDynamicConnectors
to support optional input and output connectors.
AnalyzeSchemaSampleTool
This tool simulates the analysis of an input source and populating a Schema that is shown in the UI (User Interface). Key concepts include:
Uses the
@Schema
annotation to indicate a schema display in the UI.Implements
HasDynamicUI
to support user actions and server-side update of the property display.Uses
@PushButton
and@Action
to tell the server when a button is pressed in the UI.Implements
handleUIAction()
to simulate the Schema analysis.
DataViewSampleTool
This tool simulates the population of a "data sample" UI component in response to a user action. Key concepts include:
Uses the
@DataView
annotation to indicate a sample data display in the UI.Implements
HasDynamicUI
to support user actions and server-side update of the property display.Uses
@PushButton
and@Action
to tell the server when a button is pressed in the UI.Implements
handleUIAction()
to simulate the sample data population.
TableControlSampleTool
This tool shows how to build a table control in the UI that lets the user edit a list of objects. Key concepts include:
Implements TransformTool and performs the list of user-specifed operations.
Uses the
@Table
annotation to indicate a table (grid) control in the UI.Defines a nested class (POJO) that represents the row elements for the table control.
Annotates the fields of the nested class to indicate the control type for each column in the table control.
Uses the
@FieldSelect
annotation to let the user choose input fields.Uses the
@DropList
annotation with anenum
field type to automatically populate the drop-list contents from theenum
values.
DynamicUI1SampleTool
This tool shows how to create and configure various dynamic user interface controls, and handle the UI actions they generate. Key concepts include:
Use of the
Action
andDynamicEnabled
andDynamicVisible
annotations to enable/disable or show/hide controls based on user action.Use of the
Action
andDynamicItems
annotations to populate aDropList
based on user action.Use of an
enum
, an inner class, andTable
annotations to build an editable associative map in a grid control.Use of the
handleUIAction
method to capture and respond to user actions.
DynamicUI2SampleTool
This tool elaborates on concepts introduced in DynamicUI1SampleTool
, and shows:
Use of the
PushButton
andAction
annotations with thehandleUIAction
method to demonstrate progress dialogs.Use of the
Action
annotation and thehandleUIAction
method to update control and label values.
SharedSettingsTool
This tool shows how to to share settings between tools, and allow those settings to be overridden on a tool-by-tool basis using the OverridableSettings
annotation and a Settings
subclass.
SuperSettingsToolBase and SuperSettingsToolDerived
These tools show how to use inheritance in your SDK tools, allowing them to share both settings and processing logic. SuperSettingsToolDerived
pulls in settings from the superclass defined in SuperSettingsToolBase
.
MenuControlSampleTool
This tool shows how to create and configure menus and submenus using the Menu
annotation. Key concepts include:
Menus and submenus
Menus with icons
XmlWalkerSampleTool
This tool shows how the GeneralTool
interface can be combined with recursion to walk an XML tree, flattening it into a stream of values and the XPath expressions describing their location in the document.