Batch system config update (#1402)
* Added an endpoint for batch update of system configurations Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com> * batch db save Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com> * Review changes and added tests Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com> * Evict cache only if transaction is commited - such as @CacheEvict Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com> * refactoring Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com> * Using AfterTransactionCommitExecutor for cache eviction Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com> * Change request body Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com> --------- Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
package org.eclipse.hawkbit.repository;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.im.authentication.SpPermission.SpringEvalExpressions;
|
||||
import org.eclipse.hawkbit.repository.model.TenantConfiguration;
|
||||
@@ -44,6 +45,22 @@ public interface TenantConfigurationManagement {
|
||||
@PreAuthorize(value = SpringEvalExpressions.HAS_AUTH_TENANT_CONFIGURATION)
|
||||
<T extends Serializable> TenantConfigurationValue<T> addOrUpdateConfiguration(String configurationKeyName, T value);
|
||||
|
||||
/**
|
||||
* Adds or updates a specific configuration for a specific tenant.
|
||||
*
|
||||
*
|
||||
* @param configurations
|
||||
* map containing the key - value of the configuration
|
||||
* @return map of all configuration values which were written into the database.
|
||||
* @throws TenantConfigurationValidatorException
|
||||
* if the {@code propertyType} and the value in general does not
|
||||
* match the expected type and format defined by the Key
|
||||
* @throws ConversionFailedException
|
||||
* if the property cannot be converted to the given
|
||||
*/
|
||||
@PreAuthorize(value = SpringEvalExpressions.HAS_AUTH_TENANT_CONFIGURATION)
|
||||
<T extends Serializable> Map<String, TenantConfigurationValue<T>> addOrUpdateConfiguration(Map<String, T> configurations);
|
||||
|
||||
/**
|
||||
* Build the tenant configuration by the given key
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user