1
2
3
4
5
6
7
8
9
10
11
12 package ca.spaz.cron.config;
13
14 public final class DatasourceValidator implements PropertyValidator {
15
16 private DatasourceValidator() {
17
18 }
19
20 private static final DatasourceValidator instance = new DatasourceValidator();
21
22 public boolean isValid(String key, String value) {
23 if (key.startsWith("datasource.") || key.startsWith("db.")) {
24 return false;
25 }
26 return true;
27 }
28
29 public boolean equals(Object o) {
30 return (null != o && o.getClass() == this.getClass());
31 }
32
33 public static final DatasourceValidator getInstance() {
34 return instance;
35 }
36
37 }