java.lang.Object
org.tentackle.session.AbstractSessionConfiguration
org.tentackle.session.DriverConfiguration
- All Implemented Interfaces:
ScopeConfigurator,Validateable
Configuration for a backend driver.
The configuration is stored via the standard
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 Summary
ConstructorsConstructorDescriptionDriverConfiguration(String name, String driver, String url) Creates a driver configuration. -
Method Summary
Modifier and TypeMethodDescriptionbooleanSets the driver's classname.static Map<String,DriverConfiguration> getDriverConfigurations(boolean system) Loads all driver configurations.getUrl()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.voidGets the driver's classname.voidSets the url to load the driver.Methods inherited from class org.tentackle.session.AbstractSessionConfiguration
getDefaultScopes, getName, getPrefNode, isPersisted, setName, setPersisted, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tentackle.validate.Validateable
validate
-
Constructor Details
-
DriverConfiguration
Creates a driver configuration.- Parameters:
name- the symbolic driver namedriver- the driver's classnameurl- the url to load the driver
-
-
Method Details
-
getDriverConfigurations
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
Sets the driver's classname.- Returns:
- the classname
-
setDriver
Gets the driver's classname.- Parameters:
driver- the classname
-
getUrl
Gets the url to load the driver.- Returns:
- the url
-
setUrl
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
-
hashCode
public int hashCode()
-