Skip to content

Commit 973900e

Browse files
committed
fix: checkstyle
1 parent 986836c commit 973900e

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

src/main/java/io/neonbee/endpoint/odatav4/ODataV4Endpoint.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ public class ODataV4Endpoint implements Endpoint {
5050
*/
5151
public static final String CONFIG_URI_CONVERSION = "uriConversion";
5252

53+
/**
54+
* The NeonBee CDS service annotation to include or exclude services from being exposed via the OData V4 endpoint.
55+
*/
56+
public static final String NEONBEE_ENDPOINT_CDS_SERVICE_ANNOTATION = "neonbee.endpoint";
57+
5358
private static final String BASE_PATH_SEGMENT = "odata";
5459

5560
/**
@@ -61,8 +66,6 @@ public class ODataV4Endpoint implements Endpoint {
6166

6267
private static final String NORMALIZED_URI_CONTEXT_KEY = ODataV4Endpoint.class.getName() + "_normalizedUri";
6368

64-
public static final String NEONBEE_ENDPOINT_CDS_SERVICE_ANNOTATION = "neonbee.endpoint";
65-
6669
/**
6770
* Either STRICT (<namespace>.<service>), LOOSE (<path mapping of namespace>-<path mapping of
6871
* service>) or CDS (<path mapping of service>) URI mapping:
@@ -235,6 +238,17 @@ public Future<Router> createEndpointRouter(Vertx vertx, String basePath, JsonObj
235238
return succeededFuture(router);
236239
}
237240

241+
/**
242+
* Refreshes the given router with the current models.
243+
*
244+
* @param vertx The Vert.x instance.
245+
* @param router The router to refresh.
246+
* @param basePath The base path of the endpoint.
247+
* @param uriConversion The URI conversion to use.
248+
* @param exposedEntities The block / allow list of entities to be exposed.
249+
* @param currentModels The current models reference.
250+
* @return A future indicating when the refresh is complete.
251+
*/
238252
protected Future<Void> refreshRouter(Vertx vertx, Router router, String basePath, UriConversion uriConversion,
239253
RegexBlockList exposedEntities, AtomicReference<Map<String, EntityModel>> currentModels) {
240254
return NeonBee.get(vertx).getModelManager().getSharedModels().compose(models -> {

src/main/java/io/neonbee/entity/AbstractEntityVerticle.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,16 @@ private static Registry<String> getRegistry(Vertx vertx) {
249249
return NeonBee.get(vertx).getEntityRegistry();
250250
}
251251

252+
/**
253+
* Requests an entity from the entity verticle(s) registered for the given entity type name in the request.
254+
*
255+
* @param <T> The expected type of the returned entity
256+
* @param type The class of the expected type of the returned entity
257+
* @param vertx The Vert.x instance
258+
* @param request The data request containing the entity type name to request data from
259+
* @param context The data context to be used for the request
260+
* @return A future to the requested entity of the expected type
261+
*/
252262
public static <T> Future<T> requestEntity(Class<T> type, Vertx vertx, DataRequest request, DataContext context) {
253263
FullQualifiedName entityTypeName = request.getEntityTypeName();
254264
if (entityTypeName == null) {

src/test/java/io/neonbee/endpoint/HttpMethodToDataActionMapperTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package io.neonbee.endpoint;
22

33
import static io.neonbee.endpoint.HttpMethodToDataActionMapper.mapMethodToAction;
4-
import static org.junit.jupiter.api.Assertions.*;
4+
import static org.junit.jupiter.api.Assertions.assertEquals;
5+
import static org.junit.jupiter.api.Assertions.assertNull;
56

67
import org.junit.jupiter.api.Test;
78

0 commit comments

Comments
 (0)