File tree Expand file tree Collapse file tree 9 files changed +24
-32
lines changed
src/main/java/org/fugerit/java/core/validator Expand file tree Collapse file tree 9 files changed +24
-32
lines changed Original file line number Diff line number Diff line change 11{
22 "title" : " Jupiter (Fugerit Core A.P.I.)" ,
33 "name" : " Jupiter" ,
4- "version" : " 0.7.4.3 " ,
4+ "version" : " 0.7.4.4 " ,
55 "date" : " 29/12/2020" ,
66 "organization" : {
77 "name" : " Fugerit Org" ,
Original file line number Diff line number Diff line change 1- 0.7.4.3 (2020-12-29)
1+ 0.7.4.4 (2020-12-29)
2+ --------------------
3+ + Added info property in BasicValidator
4+
5+ 0.7.4.3 (2020-12-29)
26--------------------
37+ Added xsd schema for validator catalog
48+ Added MapEntry and PropertyEntry helpers
Original file line number Diff line number Diff line change 77 <parent >
88 <groupId >org.fugerit.java</groupId >
99 <artifactId >fj-lib</artifactId >
10- <version >0.7.4.3 </version >
10+ <version >0.7.4.4 </version >
1111 </parent >
1212
1313 <name >fj-core</name >
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ public class BasicValidator extends BasicIdConfigType {
2424
2525 public static final int NO_LENGTH_CONSTRAINT = -1 ;
2626
27+ public static final String KEY_INFO = "info" ;
28+
2729 public static final String KEY_OPTION1 = "option1" ;
2830 public static final String KEY_OPTION2 = "option2" ;
2931 public static final String KEY_OPTION3 = "option3" ;
@@ -38,6 +40,8 @@ public class BasicValidator extends BasicIdConfigType {
3840
3941 private int maxLength = NO_LENGTH_CONSTRAINT ;
4042
43+ private String info ;
44+
4145 private String option1 ;
4246
4347 private String option2 ;
@@ -92,6 +96,10 @@ public void configure( Properties atts ) throws ConfigException {
9296 if ( StringUtils .isNotEmpty ( max ) ) {
9397 this .maxLength = Integer .parseInt ( max );
9498 }
99+ String info = atts .getProperty ( KEY_INFO );
100+ if ( StringUtils .isNotEmpty ( info ) ) {
101+ this .info = info ;
102+ }
95103 String opt1 = atts .getProperty ( KEY_OPTION1 );
96104 if ( StringUtils .isNotEmpty ( opt1 ) ) {
97105 this .option1 = opt1 ;
@@ -151,7 +159,11 @@ public int getMinLength() {
151159 public int getMaxLength () {
152160 return maxLength ;
153161 }
154-
162+
163+ public String getInfo () {
164+ return info ;
165+ }
166+
155167 public String getOption1 () {
156168 return option1 ;
157169 }
Original file line number Diff line number Diff line change @@ -21,29 +21,21 @@ public class ValidatorDate extends BasicValidator {
2121
2222 public static final String KEY_MAXDATE = "maxDate" ;
2323
24- public static final String KEY_INFO = "info" ;
25-
2624 public static final String ERROR_KEY_DATE = "error.date" ;
2725
2826 public static final String ERROR_KEY_DATE_MIN = "error.date.min" ;
2927
3028 public static final String ERROR_KEY_DATE_MAX = "error.date.max" ;
3129
3230 private String dateFormat ;
33-
34- private String info ;
35-
31+
3632 private String minDate ;
3733
3834 private String maxDate ;
3935
4036 public String getDateFormat () {
4137 return dateFormat ;
4238 }
43-
44- public String getInfo () {
45- return info ;
46- }
4739
4840 public String getMinDate () {
4941 return minDate ;
@@ -77,10 +69,6 @@ public void configure( Properties atts ) throws ConfigException {
7769 if ( StringUtils .isNotEmpty ( dateFormat ) ) {
7870 this .dateFormat = dateFormat ;
7971 }
80- String info = atts .getProperty ( KEY_INFO );
81- if ( StringUtils .isNotEmpty ( info ) ) {
82- this .info = info ;
83- }
8472 String minDate = atts .getProperty ( KEY_MINDATE );
8573 if ( StringUtils .isNotEmpty ( minDate ) ) {
8674 this .minDate = minDate ;
Original file line number Diff line number Diff line change @@ -15,22 +15,14 @@ public class ValidatorRegex extends BasicValidator {
1515
1616 public static final String KEY_REGEX = "regex" ;
1717
18- public static final String KEY_INFO = "info" ;
19-
2018 public static final String ERROR_KEY_REGEX = "error.regex" ;
2119
2220 private String regex ;
2321
24- private String info ;
25-
2622 public String getRegex () {
2723 return regex ;
2824 }
2925
30- public String getInfo () {
31- return info ;
32- }
33-
3426 @ Override
3527 public void checkConfig () throws ConfigException {
3628 super .checkConfig ();
@@ -46,10 +38,6 @@ public void configure( Properties atts ) throws ConfigException {
4638 if ( StringUtils .isNotEmpty ( regex ) ) {
4739 this .regex = regex ;
4840 }
49- String info = atts .getProperty ( KEY_INFO );
50- if ( StringUtils .isNotEmpty ( info ) ) {
51- this .info = info ;
52- }
5341 }
5442
5543 @ Override
Original file line number Diff line number Diff line change 77 <parent >
88 <groupId >org.fugerit.java</groupId >
99 <artifactId >fj-lib</artifactId >
10- <version >0.7.4.3 </version >
10+ <version >0.7.4.4 </version >
1111 </parent >
1212
1313 <name >fj-ext</name >
Original file line number Diff line number Diff line change 77 <parent >
88 <groupId >org.fugerit.java</groupId >
99 <artifactId >fj-lib</artifactId >
10- <version >0.7.4.3 </version >
10+ <version >0.7.4.4 </version >
1111 </parent >
1212
1313 <name >fj-tool</name >
Original file line number Diff line number Diff line change 55 <groupId >org.fugerit.java</groupId >
66 <artifactId >fj-lib</artifactId >
77
8- <version >0.7.4.3 </version >
8+ <version >0.7.4.4 </version >
99 <packaging >pom</packaging >
1010
1111 <name >fj-lib</name >
You can’t perform that action at this time.
0 commit comments