Class AbstractDatabaseCollector

java.lang.Object
de.hybris.datasupplier.collectors.impl.AbstractDatabaseCollector
All Implemented Interfaces:
DatabaseCollector
Direct Known Subclasses:
HanaCollector, HsqlCollector, MySQLCollector, OracleCollector, SqlServerCollector

public abstract class AbstractDatabaseCollector extends Object implements DatabaseCollector
Provides a base implementation for database collecting strategies (DatabaseCollectingStrategy)
  • Constructor Details

    • AbstractDatabaseCollector

      public AbstractDatabaseCollector()
  • Method Details

    • getHost

      public URI getHost(String url) throws URISyntaxException
      Description copied from interface: DatabaseCollector
      Extracts host as a URI from the jdbc connection string.
      Specified by:
      getHost in interface DatabaseCollector
      Parameters:
      url - jdbc connection string
      Returns:
      host of the database as a URI
      Throws:
      URISyntaxException - in case of being unable to parse the connection string to a URI
    • matchAndReturn

      protected String matchAndReturn(String regex, String url)
      Matches a pattern to the provided regex and returns it. The matching is case insensitive.
      Parameters:
      regex - regular expression
      url - text that needs to be searched for the pattern
      Returns:
      matched string or null if none