Skip to content

Commit

Permalink
Merge branch 'release/5.1.0.RELEASE.20231011'
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusHdez960717 committed Oct 11, 2023
2 parents 4242015 + 600746c commit 3b7e59a
Show file tree
Hide file tree
Showing 59 changed files with 98 additions and 94 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* 5.1.0.RELEASE.20231011:
* **GENERAL** :
* **FIX** :bug: : Fix `5.0.1.RELEASE.20231011`: Rename `clean-core` to `commons`. Fix at class level.

* 5.0.1.RELEASE.20231011:
* **GENERAL** :
* **FIX** :raised: : Rename `clean-core` to `commons`.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Multilanguage:

This library aims to provide standards and utilities that make work easier when creating microservices.

Docs updated for version: `5.0.1.RELEASE.20231011`
Docs updated for version: `5.1.0.RELEASE.20231011`

## Table of Contents
- [1 - Validations](#1)
Expand Down Expand Up @@ -39,7 +39,7 @@ Docs updated for version: `5.0.1.RELEASE.20231011`
- To validate an object, the `dev.root101.commons.utils.validation.ValidationService` class and its static methods are used. Example: `ValidationService.validateAndThrow(some_object);`.
- If all validations passed correctly, the code runs normally. If at least one validation fails, a `ValidationException` will be thrown or **a `List` in case of need** (`ValidationService.validate(some_object);`, without `andThrow`).
- ALL validation examples are located in the examples folder `dev.root101.commons.examples.validation...`.
- **NOTE**: ALL the objects used are `record` to reduce the example code, but everything explained here works EXACTLY the same with standard Java classes.
- **NOTE**: ALL the objects used are `record` to reduce the example code, but everything explained here works *EXACTLY* the same with standard Java classes.

### 1.1 - Validation Exception <a name="1.1"></a>
Once validations are executed on an object, and some fail, an exception of type `dev.root101.commons.exceptions.ValidationException` will be thrown.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

group = 'dev.root101.commons'

version = '5.0.1.RELEASE.20231011'
version = '5.1.0.RELEASE.20231011'

repositories {
jcenter()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.root101.clean.core.examples;
package dev.root101.commons.examples;

import dev.root101.clean.core.examples.Status_Enum.StatusResponse;
import dev.root101.clean.core.utils.EnumMappeable;
import dev.root101.clean.core.utils.EnumMappeableService;
import dev.root101.commons.examples.Status_Enum.StatusResponse;
import dev.root101.commons.utils.EnumMappeable;
import dev.root101.commons.utils.EnumMappeableService;

public class EnumMappeableMain {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.root101.clean.core.examples;
package dev.root101.commons.examples;

import dev.root101.clean.core.utils.SecurityAlgorithms;
import dev.root101.commons.utils.SecurityAlgorithms;

public class SecureAlgosMain {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.root101.clean.core.examples.jackson;
package dev.root101.commons.examples.jackson;

import dev.root101.clean.core.utils.Jackson;
import dev.root101.commons.utils.Jackson;

public class ReadMain {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.root101.clean.core.examples.jackson;
package dev.root101.commons.examples.jackson;

import com.fasterxml.jackson.annotation.JsonProperty;
import dev.root101.clean.core.utils.Jackson;
import dev.root101.commons.utils.Jackson;

public class WriteMain {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.root101.clean.core.examples.validation;
package dev.root101.commons.examples.validation;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.commons.validation.ValidationService;
import jakarta.validation.constraints.Size;

class Main_1_2 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.root101.clean.core.examples.validation;
package dev.root101.commons.examples.validation;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.commons.validation.ValidationService;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.root101.clean.core.examples.validation;
package dev.root101.commons.examples.validation;

import dev.root101.clean.core.utils.validation.ValidationFieldName;
import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.commons.validation.ValidationFieldName;
import dev.root101.commons.validation.ValidationService;
import jakarta.validation.constraints.Size;

class Main_1_4 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.root101.clean.core.examples.validation.personalized_1_5;
package dev.root101.commons.examples.validation.personalized_1_5;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.commons.validation.ValidationService;

public class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.root101.clean.core.examples.validation.personalized_1_5;
package dev.root101.commons.examples.validation.personalized_1_5;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.root101.clean.core.examples.validation.personalized_1_5;
package dev.root101.commons.examples.validation.personalized_1_5;

import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.root101.clean.core.examples.validation.pre_made_1_6;
package dev.root101.commons.examples.validation.pre_made_1_6;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.clean.core.utils.validation.annotations.Digit;
import dev.root101.commons.validation.ValidationService;
import dev.root101.commons.validation.annotations.Digit;

public class Digit_Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.root101.clean.core.examples.validation.pre_made_1_6;
package dev.root101.commons.examples.validation.pre_made_1_6;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.clean.core.utils.validation.annotations.EnumValidator;
import dev.root101.clean.core.utils.validation.annotations.EnumValidatorComparator;
import dev.root101.commons.validation.ValidationService;
import dev.root101.commons.validation.annotations.EnumValidator;
import dev.root101.commons.validation.annotations.EnumValidatorComparator;
import java.util.List;

public class Enum_List_Main {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.root101.clean.core.examples.validation.pre_made_1_6;
package dev.root101.commons.examples.validation.pre_made_1_6;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.clean.core.utils.validation.annotations.EnumValidator;
import dev.root101.clean.core.utils.validation.annotations.EnumValidatorRegister_String;
import dev.root101.commons.validation.ValidationService;
import dev.root101.commons.validation.annotations.EnumValidator;
import dev.root101.commons.validation.annotations.EnumValidatorRegister_String;

public class Enum_Single_DefaultComparator_Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.root101.clean.core.examples.validation.pre_made_1_6;
package dev.root101.commons.examples.validation.pre_made_1_6;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.clean.core.utils.validation.annotations.EnumValidator;
import dev.root101.clean.core.utils.validation.annotations.EnumValidatorComparator;
import dev.root101.commons.validation.ValidationService;
import dev.root101.commons.validation.annotations.EnumValidator;
import dev.root101.commons.validation.annotations.EnumValidatorComparator;

public class Enum_Single_Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.root101.clean.core.examples.validation.pre_made_1_6;
package dev.root101.commons.examples.validation.pre_made_1_6;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.clean.core.utils.validation.annotations.SizeExact;
import dev.root101.commons.validation.ValidationService;
import dev.root101.commons.validation.annotations.SizeExact;

public class SizeExact_Main {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatusCode;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.root101.clean.core.exceptions;
package dev.root101.commons.exceptions;

import java.util.Arrays;
import java.util.List;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/root101/commons/rest/ApiResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.rest;
package dev.root101.commons.rest;

import org.springframework.http.ResponseEntity;

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/dev/root101/commons/rest/ResponseExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package dev.root101.clean.core.rest;
package dev.root101.commons.rest;

import dev.root101.clean.core.exceptions.ApiException;
import dev.root101.clean.core.exceptions.InternalServerErrorException;
import dev.root101.commons.exceptions.ApiException;
import dev.root101.commons.exceptions.InternalServerErrorException;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.logging.Logger;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/root101/commons/rest/RestTemplateUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.rest;
package dev.root101.commons.rest;

import dev.root101.clean.core.utils.Jackson;
import dev.root101.commons.utils.Jackson;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/root101/commons/test/Child.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package dev.root101.clean.core.test;
package dev.root101.commons.test;

import dev.root101.clean.core.utils.validation.ValidationFieldName;
import dev.root101.commons.validation.ValidationFieldName;
import java.util.List;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/root101/commons/test/Main.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.root101.clean.core.test;
package dev.root101.commons.test;

import dev.root101.clean.core.utils.validation.ValidationService;
import dev.root101.commons.validation.ValidationService;
import java.util.List;

class Main {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/root101/commons/test/Parent.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package dev.root101.clean.core.test;
package dev.root101.commons.test;

import dev.root101.clean.core.utils.validation.ValidationFieldName;
import dev.root101.commons.validation.ValidationFieldName;
import java.util.List;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/dev/root101/commons/test/ParentType.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package dev.root101.clean.core.test;
package dev.root101.commons.test;

import com.fasterxml.jackson.annotation.JsonProperty;
import dev.root101.clean.core.exceptions.NotFoundException;
import dev.root101.clean.core.test.ParentType.PlatformResponse;
import dev.root101.clean.core.utils.EnumMappeable;
import dev.root101.commons.exceptions.NotFoundException;
import dev.root101.commons.test.ParentType.PlatformResponse;
import dev.root101.commons.utils.EnumMappeable;
import jakarta.validation.constraints.Size;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/root101/commons/test/Toy.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package dev.root101.clean.core.test;
package dev.root101.commons.test;

import jakarta.validation.constraints.Size;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/root101/commons/utils/EnumMappeable.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.root101.clean.core.utils;
package dev.root101.commons.utils;

public interface EnumMappeable<T> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.root101.clean.core.utils;
package dev.root101.commons.utils;

import java.util.List;
import java.util.function.Function;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/root101/commons/utils/Jackson.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.utils;
package dev.root101.commons.utils;

import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonParseException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/root101/commons/utils/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.root101.clean.core.utils;
package dev.root101.commons.utils;

import java.net.Socket;

Expand Down
Loading

0 comments on commit 3b7e59a

Please sign in to comment.