Skip to content

Commit

Permalink
fix erros from review comments
Browse files Browse the repository at this point in the history
Also-by: Matthias Feurer [email protected]
Signed-off-by: georgios dimitropoulos <[email protected]>
  • Loading branch information
gdimitropoulos-sotec committed Oct 30, 2023
1 parent c9048a0 commit 9d1b487
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2016, 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2016, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down Expand Up @@ -85,6 +85,8 @@ public abstract class AbstractHttpEndpoint<T extends ServiceConfigProperties> ex

/**
* A function that tries to parse a string into an Optional boolean.
* The input string should be a valid boolean value as string (e.g. 'true', 'false' etc..).
* If string is null or empty, function returns Optional.empty() else an Optional object of boolean type.
*/
protected static final Function<String, Optional<Boolean>> CONVERTER_BOOLEAN = s -> {
return Strings.isNullOrEmpty(s) ? Optional.empty() : Optional.of(Boolean.valueOf(s));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2020, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down Expand Up @@ -226,6 +226,7 @@ protected Future<Result<Void>> processDeleteDevicesOfTenant(final String tenantI
* @param filters A list of filters. The filters are predicates that objects in the result set must match.
* @param sortOptions A list of sort options. The sortOptions specify properties to sort the result set by.
* @param isGateway Optional filter for searching all gateways or only devices.
* If the given parameter is Optional.empty(), then result will include both devices and gateways.
* @param span The active OpenTracing span to use for tracking this operation.
* <p>
* Implementations <em>must not</em> invoke the {@link Span#finish()} nor the {@link Span#finish(long)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2020, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down Expand Up @@ -193,7 +193,7 @@ private void doSearchDevices(final RoutingContext ctx) {
CONVERTER_BOOLEAN,
value -> true);

CompositeFuture.all(pageSize, pageOffset, filters, sortOptions)
CompositeFuture.all(pageSize, pageOffset, filters, sortOptions, isGateway)
.onSuccess(ok -> TracingHelper.TAG_TENANT_ID.set(span, tenantId))
.compose(ok -> getService().searchDevices(
tenantId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public interface DeviceManagementService {
* methods. However,implementations may log (error) events on this span, set tags and use this span
* as the parent for additional spans created as part of this method's execution.
* @param isGateway Optional filter for searching all gateways or only devices.
* If the given parameter is Optional.empty(), then result will include both devices and gateways.
* @return A future indicating the outcome of the operation.
* <p>
* The future will be succeeded with a result containing the matching devices. Otherwise, the future will
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, 2021, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2020, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2020, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021, 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down

0 comments on commit 9d1b487

Please sign in to comment.