Interface DataSourceAPIErrorDescriptorsAware


  • public interface DataSourceAPIErrorDescriptorsAware
    The scanner should implement this interface in order to take advantage of the connector sdk framework for data source API error descriptors. To use this framework, the scanner must define the errors in a json file and have it accessible on the classpath. See a detailed example in the sdk samples.
    • Method Detail

      • setErrorDescriptors

        void setErrorDescriptors​(DataSourceAPIErrorDescriptors errorDescriptors)
        The connector framework creates a DataSourceAPIErrorDescriptors instance from the json file it finds on the classpath and pass it to the scanner through this method.
        Parameters:
        errorDescriptors -
      • getErrorDescriptorsJsonFileName

        default java.lang.String getErrorDescriptorsJsonFileName()
        Returns:
        the name of the json file. The file must be on the classpath. If null is returned the framework will look for on the classpath for a file called _errors.json. For example, if the scanner class is com.attivio.connector.MyScanner, and null is returned from getErrorDescriptorsJsonFileName(), the framework will expect file MyScanner_errors.json to be on the classpath.