Skip to content

Commit 3def731

Browse files
committed
0.7.4.6 (2020-12-29)
-------------------- + Changes in param configuration for ValidatorCatalog A.P.I.
1 parent 6b8850b commit 3def731

File tree

8 files changed

+22
-41
lines changed

8 files changed

+22
-41
lines changed

docgen/parameters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title" : "Jupiter (Fugerit Core A.P.I.)",
33
"name": "Jupiter",
4-
"version" : "0.7.4.5",
4+
"version" : "0.7.4.6",
55
"date" : "29/12/2020",
66
"organization" : {
77
"name" : "Fugerit Org",

docgen/release-notes.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
0.7.4.5 (2020-12-29)
1+
0.7.4.6 (2020-12-29)
2+
--------------------
3+
+ Changes in param configuration for ValidatorCatalog A.P.I.
4+
5+
0.7.4.5 (2020-12-29)
26
--------------------
37
+ Added error map based on ID for validator catalog A.P.I.
48

fj-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>0.7.4.5</version>
10+
<version>0.7.4.6</version>
1111
</parent>
1212

1313
<name>fj-core</name>

fj-core/src/main/java/org/fugerit/java/core/validator/BasicValidator.java

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ public class BasicValidator extends BasicIdConfigType {
2626

2727
public static final String KEY_INFO = "info";
2828

29-
public static final String KEY_OPTION1 = "option1";
30-
public static final String KEY_OPTION2 = "option2";
31-
public static final String KEY_OPTION3 = "option3";
32-
3329
public static final String ERROR_KEY_REQUIRED = "error.required";
3430
public static final String ERROR_KEY_LENGTH_MIN = "error.length.min";
3531
public static final String ERROR_KEY_LENGTH_MAX = "error.length.max";
@@ -42,15 +38,15 @@ public class BasicValidator extends BasicIdConfigType {
4238

4339
private String info;
4440

45-
private String option1;
46-
47-
private String option2;
48-
49-
private String option3;
50-
5141
private Element config;
5242

43+
private Properties params;
44+
5345
private BasicValidator parent;
46+
47+
public BasicValidator() {
48+
this.params = new Properties();
49+
}
5450

5551
/**
5652
*
@@ -100,18 +96,7 @@ public void configure( Properties atts ) throws ConfigException {
10096
if ( StringUtils.isNotEmpty( info ) ) {
10197
this.info = info;
10298
}
103-
String opt1 = atts.getProperty( KEY_OPTION1 );
104-
if ( StringUtils.isNotEmpty( opt1 ) ) {
105-
this.option1 = opt1;
106-
}
107-
String opt2 = atts.getProperty( KEY_OPTION2 );
108-
if ( StringUtils.isNotEmpty( opt2 ) ) {
109-
this.option2 = opt2;
110-
}
111-
String opt3 = atts.getProperty( KEY_OPTION3 );
112-
if ( StringUtils.isNotEmpty( opt3 ) ) {
113-
this.option3 = opt3;
114-
}
99+
this.getParams().putAll( atts );
115100
}
116101

117102
protected String checkOverride( ValidatorContext context, String def, String key ) {
@@ -164,18 +149,6 @@ public String getInfo() {
164149
return info;
165150
}
166151

167-
public String getOption1() {
168-
return option1;
169-
}
170-
171-
public String getOption2() {
172-
return option2;
173-
}
174-
175-
public String getOption3() {
176-
return option3;
177-
}
178-
179152
protected Element getConfig() {
180153
return config;
181154
}
@@ -184,6 +157,10 @@ protected BasicValidator getParent() {
184157
return parent;
185158
}
186159

160+
public Properties getParams() {
161+
return params;
162+
}
163+
187164
@Override
188165
public String toString() {
189166
return "Validator[id:"+this.getId()+",type:"+this.getClass().getName()+"]";

fj-core/src/main/java/org/fugerit/java/core/validator/ValidatorCatalog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void configure( Element element ) throws ConfigException {
102102
}
103103
validator.configure( current, parentValidator );
104104
validator.checkConfig();
105-
logger.info( "validator : {}", validator );
105+
logger.info( "validator : {} -> {}", validator, validator.getParams() );
106106
this.getValidators().add( validator );
107107
}
108108
}

fj-ext/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>0.7.4.5</version>
10+
<version>0.7.4.6</version>
1111
</parent>
1212

1313
<name>fj-ext</name>

fj-tool/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.fugerit.java</groupId>
99
<artifactId>fj-lib</artifactId>
10-
<version>0.7.4.5</version>
10+
<version>0.7.4.6</version>
1111
</parent>
1212

1313
<name>fj-tool</name>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>org.fugerit.java</groupId>
66
<artifactId>fj-lib</artifactId>
77

8-
<version>0.7.4.5</version>
8+
<version>0.7.4.6</version>
99
<packaging>pom</packaging>
1010

1111
<name>fj-lib</name>

0 commit comments

Comments
 (0)