Skip to content

Commit

Permalink
deprecate: org.eclipse.kura.core.configuration.CloudConfigurationHand…
Browse files Browse the repository at this point in the history
…ler service (#5636)

* deprecate: org.eclipse.kura.core.configuration.CloudConfigurationHandler service

Signed-off-by: MMaiero <[email protected]>

* fix: Reintroduced logger import removed by cleanup

Signed-off-by: MMaiero <[email protected]>

* Another tentative to fix

Signed-off-by: MMaiero <[email protected]>

---------

Signed-off-by: MMaiero <[email protected]>
  • Loading branch information
MMaiero authored Jan 9, 2025
1 parent 80b4b9e commit 2cb6b9a
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*******************************************************************************
* Copyright (c) 2011, 2021 Eurotech and/or its affiliates and others
*
* Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
*
* SPDX-License-Identifier: EPL-2.0
*
*
* Contributors:
* Eurotech
*******************************************************************************/
Expand Down Expand Up @@ -47,6 +47,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @deprecated Please switch to CONF-V2 and corresponding REST APIs
* (https://eclipse-kura.github.io/kura/docs-release-5.6/references/rest-apis/rest-configuration-service-v2/)
*/
@Deprecated
public class CloudConfigurationHandler implements RequestHandler {

private static final String EXPECTED_ONE_RESOURCE_BUT_FOUND_NONE_MESSAGE = "Expected one resource but found none";
Expand Down Expand Up @@ -529,7 +534,7 @@ public Void call() throws Exception {
Thread.currentThread().setName(getClass().getSimpleName());
//
// update the configuration
try (final Scope scope = AuditContext.openScope(auditContext)) {
try (final Scope scope = AuditContext.openScope(this.auditContext)) {
List<ComponentConfiguration> configImpls = this.xmlConfigurations != null
? this.xmlConfigurations.getConfigurations()
: null;
Expand Down Expand Up @@ -579,7 +584,7 @@ public RollbackCallable(Long snapshotId, ConfigurationService configurationServi
public Void call() throws Exception {
Thread.currentThread().setName(getClass().getSimpleName());
// rollback to the specified snapshot if any
try (final Scope scope = AuditContext.openScope(auditContext)) {
try (final Scope scope = AuditContext.openScope(this.auditContext)) {
if (this.snapshotId == null) {
this.configurationService.rollback();
} else {
Expand Down

0 comments on commit 2cb6b9a

Please sign in to comment.