DDI resource - remove dupplicated annotations (MgmtTenantManagementRestResource) (#2066)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-17 19:09:06 +02:00
committed by GitHub
parent 64494d6845
commit 13923367ee
2 changed files with 8 additions and 9 deletions

View File

@@ -131,7 +131,8 @@ public interface MgmtTenantManagementRestApi {
})
@GetMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}",
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
ResponseEntity<MgmtSystemTenantConfigurationValue> getTenantConfigurationValue(@PathVariable("keyName") String keyName);
ResponseEntity<MgmtSystemTenantConfigurationValue> getTenantConfigurationValue(
@PathVariable("keyName") String keyName);
/**
* Handles the PUT request for updating a tenant specific configuration value.
@@ -174,7 +175,8 @@ public interface MgmtTenantManagementRestApi {
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
ResponseEntity<MgmtSystemTenantConfigurationValue> updateTenantConfigurationValue(
@PathVariable("keyName") String keyName, MgmtSystemTenantConfigurationValueRequest configurationValueRest);
@PathVariable("keyName") String keyName,
@RequestBody MgmtSystemTenantConfigurationValueRequest configurationValueRest);
/**
* Handles the PUT request for updating a batch of tenant specific configurations

View File

@@ -27,8 +27,6 @@ import org.eclipse.hawkbit.repository.model.TenantConfigurationValue;
import org.eclipse.hawkbit.tenancy.configuration.TenantConfigurationProperties;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
/**
@@ -74,7 +72,7 @@ public class MgmtTenantManagementResource implements MgmtTenantManagementRestApi
}
@Override
public ResponseEntity<Void> deleteTenantConfigurationValue(@PathVariable("keyName") final String keyName) {
public ResponseEntity<Void> deleteTenantConfigurationValue(final String keyName) {
//Default DistributionSet Type cannot be deleted as is part of TenantMetadata
if (isDefaultDistributionSetTypeKey(keyName)) {
return ResponseEntity.badRequest().build();
@@ -87,15 +85,14 @@ public class MgmtTenantManagementResource implements MgmtTenantManagementRestApi
}
@Override
public ResponseEntity<MgmtSystemTenantConfigurationValue> getTenantConfigurationValue(
@PathVariable("keyName") final String keyName) {
public ResponseEntity<MgmtSystemTenantConfigurationValue> getTenantConfigurationValue(final String keyName) {
return ResponseEntity.ok(loadTenantConfigurationValueBy(keyName));
}
@Override
public ResponseEntity<MgmtSystemTenantConfigurationValue> updateTenantConfigurationValue(
@PathVariable("keyName") final String keyName,
@RequestBody final MgmtSystemTenantConfigurationValueRequest configurationValueRest) {
final String keyName,
final MgmtSystemTenantConfigurationValueRequest configurationValueRest) {
Serializable configurationValue = configurationValueRest.getValue();
final MgmtSystemTenantConfigurationValue responseUpdatedValue;
if (isDefaultDistributionSetTypeKey(keyName)) {