Skip to content

Commit e035037

Browse files
committed
fix before merge
1 parent 876a8b6 commit e035037

9 files changed

Lines changed: 6 additions & 62 deletions

File tree

bellatrix.data/src/main/java/solutions/bellatrix/data/contracts/Repository.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44

55
import java.util.List;
66

7-
/**
8-
* The Repository interface defines the contract for a repository that manages entities.
9-
* It provides methods to get, create, update, and delete entities.
10-
*
11-
* @param <T> the type of entity managed by the repository
12-
*/
137
public interface Repository<T extends Entity> {
148
T getById(T entity);
159

bellatrix.data/src/main/java/solutions/bellatrix/data/http/authentication/AuthSchemaFactory.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
import io.restassured.authentication.NoAuthScheme;
66
import io.restassured.authentication.PreemptiveOAuth2HeaderScheme;
77

8-
/**
9-
* Factory class to create authentication schemes based on the provided Authentication object.
10-
* It supports Basic, Bearer, and Query Parameter authentication methods.
11-
* This class is tightly coupled with res assured library for handling HTTP authentication schemes.
12-
*/
138
public class AuthSchemaFactory {
149
public static AuthenticationScheme getAuthenticationScheme(Authentication authentication) {
1510
var authType = authentication.getAuthenticationMethod();

bellatrix.data/src/main/java/solutions/bellatrix/data/http/configuration/HttpSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
@Data
1313
public class HttpSettings {
14-
private transient AuthenticationMethod authenticationMethod;
1514
@SerializedName("baseUrl")
1615
private String baseUrl;
1716
@SerializedName("basePath")
Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,11 @@
11
package solutions.bellatrix.data.http.contracts;
22

3-
import solutions.bellatrix.data.http.infrastructure.JsonConverter;
4-
53
import java.util.List;
64

7-
/**
8-
* The {@code JsonSerializer} interface provides methods for serializing and deserializing
9-
* objects to and from JSON strings.
10-
* <p>
11-
* If you need to implement a custom JSON serialization mechanism, you can create a class
12-
* that implements this interface.
13-
* <p>
14-
* Example class:
15-
* {@link JsonConverter}
16-
*/
17-
185
public interface ObjectConverter {
19-
/**
20-
* Converts the given object of type T to a string representation.
21-
*
22-
* @param object the object to be converted to a string
23-
* @param <T> the type of the object
24-
* @return the string representation of the object
25-
*/
266
<T> String toString(T object);
277

28-
/**
29-
* Converts the given JSON string to an object of type T.
30-
*
31-
* @param data string to convert to an object
32-
* @param type the class of the type to deserialize into
33-
* @param <T> the type of the object
34-
* @return the deserialized object of type T
35-
*/
368
<T> T fromString(String data, Class<T> type);
379

38-
/**
39-
* Converts the given JSON string to a list of objects of type T.
40-
*
41-
* @param json the JSON string to deserialize
42-
* @param elementType the class of the elements in the list
43-
* @param <T> the type of the elements in the list
44-
* @return a list of deserialized objects of type T
45-
*/
4610
<T> List<T> fromStringToList(String json, Class<T> elementType);
4711
}

bellatrix.data/src/main/java/solutions/bellatrix/data/http/contracts/Queryable.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
import java.util.LinkedList;
99
import java.util.Objects;
1010

11-
/**
12-
* The Queryable interface provides a method to convert an object into a list of query parameters.
13-
*/
1411
public interface Queryable {
1512
default LinkedList<QueryParameter> toQueryParams() {
1613
try {

bellatrix.data/src/main/java/solutions/bellatrix/data/http/infrastructure/Entity.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
import solutions.bellatrix.data.configuration.RepositoryFactory;
55
import solutions.bellatrix.data.contracts.Repository;
66

7-
/**
8-
* The Entity class represents a base entity that can be persisted in a repository.
9-
* It provides methods to get, create, update, and delete the entity.
10-
*
11-
* @param <TIdentifier> the type of the identifier for the entity
12-
* @param <TEntity> the type of the entity itself
13-
*/
147
@SuperBuilder
158
public abstract class Entity<TIdentifier, TEntity> {
169
public TEntity get() {
@@ -25,7 +18,7 @@ public TEntity create() {
2518

2619
public TEntity update() {
2720
var repository = (Repository<Entity>)RepositoryFactory.INSTANCE.getRepository(this.getClass());
28-
return (TEntity)repository.update(this);
21+
return (TEntity)repository.update(this);`
2922
}
3023

3124
public void delete() {

bellatrix.data/src/main/java/solutions/bellatrix/data/http/infrastructure/events/HttpRequestEventArgs.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import lombok.Getter;
44
import solutions.bellatrix.data.http.httpContext.HttpContext;
55

6+
@Getter
67
public class HttpRequestEventArgs {
7-
@Getter public final HttpContext requestConfiguration;
8+
public final HttpContext requestConfiguration;
89

910
public HttpRequestEventArgs(HttpContext requestConfiguration) {
1011
this.requestConfiguration = requestConfiguration;

bellatrix.data/src/main/java/solutions/bellatrix/data/http/infrastructure/events/ResponseProcessingEventArgs.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import io.restassured.response.Response;
44
import lombok.Getter;
55

6+
@Getter
67
public class ResponseProcessingEventArgs {
7-
@Getter private final Response response;
8+
private final Response response;
89

910
public ResponseProcessingEventArgs(Response response) {
1011
this.response = response;

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<module>bellatrix.android</module>
2424
<module>bellatrix.ios</module>
2525
<module>bellatrix.api</module>
26+
<module>bellatrix.data</module>
2627
<!-- Framework Tests -->
2728
<module>framework-tests/bellatrix.core.tests</module>
2829
<module>framework-tests/bellatrix.web.tests</module>
@@ -33,7 +34,6 @@
3334
<!-- Getting Started -->
3435
<module>getting-started/bellatrix.web.getting.started</module>
3536
<module>getting-started/bellatrix.playwright.getting.started</module>
36-
<module>bellatrix.data</module>
3737

3838

3939
</modules>

0 commit comments

Comments
 (0)