public class SQLDatabaseTypeValidator extends DefaultValidator
Modifier and Type | Field and Description |
---|---|
private Set<String> |
_allowedDbTypes |
_invalidText, _isMandatory, _pluginName, _regexp, _smanager
Constructor and Description |
---|
SQLDatabaseTypeValidator() |
Modifier and Type | Method and Description |
---|---|
private boolean |
_isValidDatasource(String dataSourceId) |
private void |
_validateDataSource(String dataSourceId,
Errors errors) |
void |
configure(Configuration configuration) |
Map<String,Object> |
getConfiguration()
Retrieves the configuration of the validator.
|
void |
saxConfiguration(ContentHandler handler)
Sax the configuration of the validator to allow the client side to prevalidate
|
Map<String,Object> |
toJson()
Returns a object representing the validator able to be converted into a JSON string
|
protected void |
validateArrayValues(Object[] values,
Errors errors)
Validates a array of values.
|
protected void |
validateSingleValue(Object value,
Errors errors)
Validates a single value.
|
saxJsonConfig, service, setPluginInfo, validate
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private Set<String> _allowedDbTypes
public SQLDatabaseTypeValidator()
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
configure
in class DefaultValidator
ConfigurationException
protected void validateSingleValue(Object value, Errors errors)
validateSingleValue
in class DefaultValidator
value
- the value to validate (can be null
).errors
- the structure to populate if the validation failed.protected void validateArrayValues(Object[] values, Errors errors)
DefaultValidator
validateArrayValues
in class DefaultValidator
values
- the values to validateerrors
- the structure to populate if the validation failed.private void _validateDataSource(String dataSourceId, Errors errors)
private boolean _isValidDatasource(String dataSourceId)
public void saxConfiguration(ContentHandler handler) throws SAXException
Validator
saxConfiguration
in interface Validator
saxConfiguration
in class DefaultValidator
handler
- The content handler where to sax parametersSAXException
- if an error occuredpublic Map<String,Object> toJson()
Validator
toJson
in interface Validator
toJson
in class DefaultValidator
public Map<String,Object> getConfiguration()
Validator
Validator.saxConfiguration(ContentHandler)
getConfiguration
in interface Validator
getConfiguration
in class DefaultValidator