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
@FileBrowseannotation so that user can browse for an input file -
The@SchemaEditorannotation so the user can edit the input file Schema directly -
The@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
TransformTool -
Modifying an input
Schemato produce a derived outputSchema -
Using
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
OutputTool -
The
@FileBrowseannotation 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
RecordSourceBlockingand write toRecordDestinationBlocking -
Shows 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
InputTool -
Demonstrates a wide spectrum of UI property annotations for the basic controls
-
Use of
@Tab,@GroupStart,@GroupEndannotations for layout control -
Use 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
TransformTool -
Uses
RecordCopierto copy fields from input to output efficiently
TokenizerSampleTool
This tool breaks up input strings into tokens (or words). Key concepts include:
-
Implements
GeneralTool -
Implements
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 UI -
Implements
HasDynamicUIto support user actions and server-side update of the property display -
Uses
@PushButtonand@Actionto 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
@DataViewannotation to indicate a sample data display in the UI -
Implements
HasDynamicUIto support user actions and server-side update of the property display -
Uses
@PushButtonand@Actionto 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
@Tableannotation 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
@FieldSelectannotation to let the user choose input fields -
Uses 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 action -
Use of the
ActionandDynamicItemsannotations to populate aDropListbased on user action -
Use of an
enum, an inner class, andTableannotations to build an editable associative map in a grid control -
Use 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 dialogs -
Use 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.