public class ConnectionUrlPropertyType extends PropertyType<String>
jdbc:subprotocol:subname
". DriverManager.getDriver(url)
to validate the URL. Constructor Example | Comments | ||
---|---|---|---|
Property<String> A_PROPERTY = |
Default value is null . It is not possible to set a default value. |
||
Type of value(s) | Examples | Result | Comments |
Valid | jdbc:hsqldb:mem:localbatch | "jdbc:hsqldb:mem:localbatch" | Validate successfully. |
Valid | jdbc:oracle:thin:Herong/TopSecret@localhost:1521:XE | "jdbc:oracle:thin:Herong/TopSecret@localhost:1521:XE" | Validate successfully. |
Invalid | cow | null |
Validate will throw an exception. The resulting value is null . |
Invalid | «empty string» | null |
|
Invalid | «only spaces» | null |
|
Invalid | null |
null |
DriverManager.getDriver(String)
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
TYPE
The type name string constant of ConnectionUrlPropertyType
|
Constructor and Description |
---|
ConnectionUrlPropertyType() |
Modifier and Type | Method and Description |
---|---|
protected String |
getDriverInfo(String url,
Driver driver)
Getting the Driver info as a String.
|
List<String> |
getRestrictions()
Gets a detailed description of the PropertyType with any constraints that might influence the validation.
|
String |
validateValue(String propertyName,
String value)
Converts the string representation of to a typed value.
|
equals, getDefaultValue, getDefaultValueAsString, getDefaultValueDescription, getDescription, getDescription, getInitializationPriority, getIo, getLogger, getTypeName, hasDefaultValue, isDefaultValueValid, postGetValueProcessing, setDefaultValue, setInitializationPriority, setIo, setTypedValue, setTypeName, toString, toType, validate, validateConstraints, validateNullType
public static final String TYPE
public List<String> getRestrictions()
PropertyType
getRestrictions
in class PropertyType<String>
public String validateValue(String propertyName, String value) throws PropertyException
PropertyType
validateValue
in class PropertyType<String>
propertyName
- the name of the property used for logging purposes. To uniquely identify the Property with validation issues.value
- the string representation of the propertyPropertyException
- if the conversion failed.