- java.lang.Object
-
- org.tentackle.session.AbstractSessionConfiguration
-
- org.tentackle.session.DriverConfiguration
-
- All Implemented Interfaces:
org.tentackle.validate.ScopeConfigurator,org.tentackle.validate.Validateable
public class DriverConfiguration extends AbstractSessionConfiguration
Configuration for a backend driver.
The configuration is stored via the standardPreferencesand provides the paramaters necessary to load the a driver.Notice that the implementation does not depend on the tentackle-database or tentackle-sql module!
-
-
Constructor Summary
Constructors Constructor Description DriverConfiguration(java.lang.String name, java.lang.String driver, java.lang.String url)Creates a driver configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetDriver()Sets the driver's classname.static java.util.Map<java.lang.String,DriverConfiguration>getDriverConfigurations(boolean system)Loads all driver configurations.java.lang.StringgetUrl()Gets the url to load the driver.inthashCode()voidpersist(boolean system)Persists this configuration.voidremove(boolean system)Removes this configuration.static voidremoveDriverConfigurations(boolean system)Removes all driver configurations.voidsetDriver(java.lang.String driver)Gets the driver's classname.voidsetUrl(java.lang.String url)Sets the url to load the driver.-
Methods inherited from class org.tentackle.session.AbstractSessionConfiguration
getDefaultScopes, getName, getPrefNode, isPersisted, setName, setPersisted, toString, validate
-
-
-
-
Method Detail
-
getDriverConfigurations
public static java.util.Map<java.lang.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 java.lang.String getDriver()
Sets the driver's classname.- Returns:
- the classname
-
setDriver
@Bindable public void setDriver(java.lang.String driver)
Gets the driver's classname.- Parameters:
driver- the classname
-
getUrl
@Bindable @NotNull public java.lang.String getUrl()
Gets the url to load the driver.- Returns:
- the url
-
setUrl
@Bindable public void setUrl(java.lang.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(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-