%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
ca.spaz.cron.config.DatasourceValidator |
|
|
1 | /* |
|
2 | ******************************************************************************* |
|
3 | * Copyright (c) 2005 Chris Rose and AIMedia |
|
4 | * All rights reserved. DatasourceValidator and the accompanying materials |
|
5 | * are made available under the terms of the Common Public License v1.0 |
|
6 | * which accompanies this distribution, and is available at |
|
7 | * http://www.eclipse.org/legal/cpl-v10.html |
|
8 | * |
|
9 | * Contributors: |
|
10 | * Chris Rose |
|
11 | *******************************************************************************/ |
|
12 | package ca.spaz.cron.config; |
|
13 | ||
14 | 21 | public final class DatasourceValidator implements PropertyValidator { |
15 | ||
16 | 30 | private DatasourceValidator() { |
17 | // NO-OP |
|
18 | 30 | } |
19 | ||
20 | 30 | private static final DatasourceValidator instance = new DatasourceValidator(); |
21 | ||
22 | public boolean isValid(String key, String value) { |
|
23 | 10 | if (key.startsWith("datasource.") || key.startsWith("db.")) { |
24 | 0 | return false; |
25 | } |
|
26 | 10 | return true; |
27 | } |
|
28 | ||
29 | public boolean equals(Object o) { |
|
30 | 0 | return (null != o && o.getClass() == this.getClass()); |
31 | } |
|
32 | ||
33 | public static final DatasourceValidator getInstance() { |
|
34 | 30 | return instance; |
35 | } |
|
36 | ||
37 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |