Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

 

Data Source Function List

A connector DataSource is an implementation of the abstract java class AbstractDataSource. When defining a DataSource the following functions require implementation: 

 

The following functions can optionally be overwritten: 

 

The following functions are available as utility functions: 

  • protected final byte[] loadBlob(String key); 
  • protected final boolean saveBlob(String key, byte[] data); 
  • protected final boolean areBlobsAvailable(); 
  • public final Object getAttribute(String key); 
  • public final Integer getSourceId(); 

 

 

DataSource Function Definitions 

 

public abstract String getDataSourceName(); 

Return a DataSourceName as a String. 

 

public abstract Collection<AbstractDataSet> getDataSets(); 

Return the collection of DataSets that are available in this DataSource. See the DataSet section for defining a DataSet. 

 

public abstract JDBCMetaData getDataSourceMetaData(); 

Return the connection meta-data required for this DataSource. See the MetaData section for defining Meta Data for a Data Source. 

 

public abstract boolean authenticate() throws Exception; 

Return true or false depending on whether authentication against the data source was successful. This can return true if this is not required. 

 

public abstract void disconnect(); 

disconnect() is called when the connection to the connector is closed. Perform any clean up here. This function can do nothing if it is not required. 

 

public abstract Map<String, Object> testConnection() throws Exception 

Return a map of text entries to be displayed on a successful connection test. The key to the Map is the description shown on the connection test within the Yellowfin UI. 

An error message can be displayed if the connection test was not successful. The key to the Map in this case should be “ERROR”, with a description of the error stored in the Map value. 

 

public ScheduleDefinition getScheduleDefinition(); 

Return a ScheduleDefinition for when the background task should run for this connector. A ScheduleDefinition is instantiated with: 

 

 

 

 

 

  • No labels