Changes between Version 25 and Version 26 of ApertureDataSource
- Timestamp:
- 10/20/05 10:58:59 (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ApertureDataSource
v25 v26 6 6 Changelog: 7 7 8 * removed setConfigAttribute and writeConfigAttributes: the choice to store DataSource configuration and the way to do that is probably an application decision. This functionality should be moved to a utility class. 8 * removed setConfigAttribute and writeConfigAttributes: the choice to store DataSource configuration and the way to do that is probably an application decision. This functionality should be moved to a utility class. Leo: yes, the configuration can be conveniently stored in either a Parameters object or a RDFMap 9 10 * setting and checking configuration: see comments in header. Leo wants to give feedback to the user if a configuration is not working properly. 9 11 10 12 {{{ … … 14 16 * can be extracted. A Datasource contains all information necessary to realize 15 17 * these objects, such as paths, usernames, passwords, etc. 18 * The configuration of the datasource is passed to it using the <code>initConfiguration()</code> method. 19 * Then, the configuration can be checked using the <code>checkConfiguration()</code>, 20 * where the datasource should try to contact the datasource and see if the configuration is working. 21 * This is used in the configuration editor user-interface to see if the configuration works and 22 * give feedback to the user if passwords, filenames, urls, etc are right. 16 23 */ 17 24 public interface DataSource { … … 28 35 * this method must only be called once. 29 36 * TODO: should it check the configuration (passwords allright, etc) now or when the crawler starts? 30 * @throws InitializationException when the configuration contains syntactically wrong parameters 31 * or does not function correctly. The InitializationException should contain a user-friendly 32 * message that explains why this datasource does not work. If a password is wrong, the exception 33 * should say so. 37 * @throws InitializationException when the configuration contains syntactically wrong parameters, 38 * parameters that cannot be parsed. Semantical errors (not-working urls, etc) are found on 39 * first access or on checkConfiguration(). 34 40 */ 35 41 public void initConfiguration(Map configuration) throws InitializationException; 42 43 44 /** 45 * check the configuration that was passed in initConfiguration(). 46 * The InitializationException should contain a user-friendly 47 * message that explains why this datasource does not work. If a password is wrong, the exception 48 * should say so. This method is usually called once before the datasource is used or 49 * after the user edited the configuration and it should check if passwords and other configs 50 * are working. 51 * @throws InitializationException when the configuration cannot be used to open a datasource 52 */ 53 public void checkConfiguration() throws InitializationException; 54 36 55 37 56 /**