Class DriverConfiguration

java.lang.Object
org.tentackle.session.AbstractSessionConfiguration
org.tentackle.session.DriverConfiguration
All Implemented Interfaces:
ScopeConfigurator, Validateable

public class DriverConfiguration extends AbstractSessionConfiguration
Configuration for a backend driver.
The configuration is stored via the standard Preferences and provides the parameters necessary to load the driver.

Notice that the implementation does not depend on the tentackle-database or tentackle-sql module!

  • Constructor Details

    • DriverConfiguration

      public DriverConfiguration(String name, String driver, String url)
      Creates a driver configuration.
      Parameters:
      name - the symbolic driver name
      driver - the driver's classname
      url - the url to load the driver
  • Method Details

    • getDriverConfigurations

      public static Map<String,DriverConfiguration> getDriverConfigurations(boolean system)
      Loads all driver configurations.
      Parameters:
      system - true if load from system preferences, else user preferences
      Returns:
      the driver configurations
    • removeDriverConfigurations

      public static void removeDriverConfigurations(boolean system)
      Removes all driver configurations.
      Parameters:
      system - true if load from system preferences, else user preferences
    • getDriver

      @Bindable @NotNull public String getDriver()
      Sets the driver's classname.
      Returns:
      the classname
    • setDriver

      @Bindable public void setDriver(String driver)
      Gets the driver's classname.
      Parameters:
      driver - the classname
    • getUrl

      @Bindable @NotNull public String getUrl()
      Gets the url to load the driver.
      Returns:
      the url
    • setUrl

      @Bindable public void setUrl(String url)
      Sets the url to load the driver.
      Parameters:
      url - the url
    • persist

      public void persist(boolean system)
      Persists this configuration.
      Parameters:
      system - true if store in system preferences (requires extra permission), else user preferences
    • remove

      public void remove(boolean system)
      Removes this configuration.
      Parameters:
      system - true if store in system preferences (requires extra permission), else user preferences
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object