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
InputToolThe
@FileBrowseannotation so that user can browse for an input fileThe@SchemaEditorannotation so the user can edit the input file Schema directlyThe@Triggerannotation 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
TransformToolModifying an input
Schemato produce a derived outputSchemaUsing
RecordCopierto 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
OutputToolThe
@FileBrowseannotation so that user can browse for an output fileCall
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
GeneralToolShows how the
getInputConnectorTypes()andgetOutputConnectorTypes()methods tell RPDM which connectors are availableShows how to read records from
RecordSourceBlockingand write toRecordDestinationBlockingShows how to create an output
Schemathat 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
InputToolDemonstrates a wide spectrum of UI property annotations for the basic controls
Use of
@Tab,@GroupStart,@GroupEndannotations for layout controlUse of
@Triggerand@MultiTriggerannotations 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
TransformToolUses
RecordCopierto copy fields from input to output efficiently
TokenizerSampleTool
This tool breaks up input strings into tokens (or words). Key concepts include:
Implements
GeneralToolImplements
HasDynamicConnectorsto 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
@Schemaannotation to indicate a schema display in the UIImplements
HasDynamicUIto support user actions and server-side update of the property displayUses
@PushButtonand@Actionto tell the server when a button is pressed in the UIImplements
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
@DataViewannotation to indicate a sample data display in the UIImplements
HasDynamicUIto support user actions and server-side update of the property displayUses
@PushButtonand@Actionto tell the server when a button is pressed in the UIImplements
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
@Tableannotation to indicate a table (grid) control in the UIDefines 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
@FieldSelectannotation to let the user choose input fieldsUses the
@DropListannotation with anenumfield type to automatically populate the drop-list contents from theenumvalues
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
ActionandDynamicEnabledandDynamicVisibleannotations to enable/disable or show/hide controls based on user actionUse of the
ActionandDynamicItemsannotations to populate aDropListbased on user actionUse of an
enum, an inner class, andTableannotations to build an editable associative map in a grid controlUse of the
handleUIActionmethod to capture and respond to user actions
DynamicUI2SampleTool
This tool elaborates on concepts introduced in DynamicUI1SampleTool, and shows:
Use of the
PushButtonandActionannotations with thehandleUIActionmethod to demonstrate progress dialogsUse of the
Actionannotation and thehandleUIActionmethod 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.