Page History
...
The connector metadata is an implementation of abstract java class JDBCMetaData. This defines what connection details need to be prompted to the user for creating a connection to a third-party source. This may include parameters like usernames, tokens, hostnameshost names, ports, account names, etc.
Anchor | ||||
---|---|---|---|---|
|
Metadata Function List
The JDBCMetaData class is used for building a connection wizard for a data source. The following functions need to be implemented to create a basic connection wizard: Anchor
- public JDBCMetaData();
- public void initialiseParameters();
- public String buttonPressed(String buttonName) throws Exception;
Helper These helper functions that are also accessible in JDBCMetaData:
- protected final void addParameter(Parameter p);
- public void setParameterValue(String key, Object value);
- public final Object getParameterValue(String key);
- public boolean isParameterRequired(String key);
- public boolean hasDependentParameters(String key);
...
Attribute | Description |
---|---|
sourceName | Text name for the DataSource. For example, “Twitter Connector”. |
sourceCode | A unique text code for the DataSource. For example, “TWITTER_CONNECTOR”. |
driverName | The text class name of the DataSource. For example, “com.code.TwitterConnector”.TwitterConnector” |
sourceType | This should always be DBType.THIRDPARTYbe DBType.THIRDPARTY. |
Example implementation:
Code Block | ||
---|---|---|
| ||
public SkiTeamMetaData() { super(); sourceName = "Ski Team Source"; sourceCode = "SKI_DATA_SOURCE"; driverName = SkiTeamDataSource.class.getName(); sourceType = DBType.THIRD_PARTY; } |
...
Parameter objects require the following meta-data metadata to be defined:
Attribute | Description |
---|---|
uniqueKey | Text Unique Key for this parameter. |
displayName | Text description. This can be internationalised. |
description | Parameter description. This can be internationalisedinternationalized. |
defaultValue | Object to be assigned as the default value for this parameter. |
displayType | DisplayType for this parameter. See DisplayType in appendix for more information. |
dataType | DataType for this parameter. See Parameter DataType in appendix for more information |
...
A button callback may be used to change the values of other parameters programmatically. A parameter can be set with setParameterValue(String key, String value).
Styleclass | ||
---|---|---|
| ||
...
Section | |||||||
---|---|---|---|---|---|---|---|
|