Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate: org.eclipse.kura.core.configuration.CloudConfigurationHandler service #5636

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -44,9 +44,13 @@
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;
mattdibi marked this conversation as resolved.
Show resolved Hide resolved
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 +533,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 +583,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
Loading