Class SQLConnectionChecker
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.core.impl.checker.SQLConnectionChecker
-
- All Implemented Interfaces:
ItemChecker
,LogEnabled
,Serviceable
public class SQLConnectionChecker extends AbstractLogEnabled implements ItemChecker, Serviceable
Checks that a sql connection can be established with the provided values
-
-
Field Summary
Fields Modifier and Type Field Description private ServiceManager
_manager
-
Constructor Summary
Constructors Constructor Description SQLConnectionChecker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
check(String url, String login, String password, ServiceManager manager)
Check the sql connection infovoid
check(List<String> values)
Checks the validity of the parameters.void
service(ServiceManager manager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_manager
private ServiceManager _manager
-
-
Constructor Detail
-
SQLConnectionChecker
public SQLConnectionChecker()
-
-
Method Detail
-
service
public void service(ServiceManager manager)
- Specified by:
service
in interfaceServiceable
-
check
public static void check(String url, String login, String password, ServiceManager manager) throws ItemCheckerTestFailureException
Check the sql connection info- Parameters:
url
- The sql urllogin
- The db loginpassword
- The db passwordmanager
- The service manager- Throws:
ItemCheckerTestFailureException
- If an error occurred
-
check
public void check(List<String> values) throws ItemCheckerTestFailureException
Description copied from interface:ItemChecker
Checks the validity of the parameters.- Specified by:
check
in interfaceItemChecker
- Parameters:
values
- the values to test- Throws:
ItemCheckerTestFailureException
- if the test failed
-
-