Class JDBCUrlParser


  • public class JDBCUrlParser
    extends Object
    Convert JDBC URL into JDBC Connection properties. Currently work with H2 and PostGreSQL DataSourceFactory
    Author:
    Nicolas Fortin
    • Field Detail

      • SPATIAL_DATASOURCE_ENDSWITH

        public static final String SPATIAL_DATASOURCE_ENDSWITH
        If the property value of DataSourceFactory#OSGI_JDBC_DRIVER_NAME ends with SPATIAL_DATASOURCE_ENDSWITH then it is the wrapped spatial version of a DataSourceFactory
        See Also:
        Constant Field Values
    • Method Detail

      • parse

        public static Properties parse​(String jdbcUrl)
                                throws IllegalArgumentException
        Convert JDBC URL into JDBC Connection properties
        Parameters:
        jdbcUrl - JDBC connection path
        Returns:
        Properties to be used in OSGi DataSourceFactory that does not handle DataSourceFactory#JDBC_URL
        Throws:
        IllegalArgumentException - Argument is not a valid JDBC connection URL or cannot be parsed by this class