DDI resource - remove dupplicated annotations (MgmtTenantManagementRestResource) (#2066)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user