mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'master' into feature/operation-template
This commit is contained in:
commit
9159b1105b
@ -110,6 +110,7 @@ public class MetadataServiceImpl implements MetadataService {
|
|||||||
RequestValidationUtil.validateMetadata(metadata);
|
RequestValidationUtil.validateMetadata(metadata);
|
||||||
try {
|
try {
|
||||||
Metadata createdMetadata = DeviceMgtAPIUtils.getMetadataManagementService().createMetadata(metadata);
|
Metadata createdMetadata = DeviceMgtAPIUtils.getMetadataManagementService().createMetadata(metadata);
|
||||||
|
DeviceManagerUtil.removeBillingCache();
|
||||||
return Response.status(Response.Status.CREATED).entity(createdMetadata).build();
|
return Response.status(Response.Status.CREATED).entity(createdMetadata).build();
|
||||||
} catch (MetadataKeyAlreadyExistsException e) {
|
} catch (MetadataKeyAlreadyExistsException e) {
|
||||||
String msg = "Metadata entry metaKey:" + metadata.getMetaKey() + " is already exist.";
|
String msg = "Metadata entry metaKey:" + metadata.getMetaKey() + " is already exist.";
|
||||||
|
|||||||
@ -701,7 +701,8 @@ public final class DeviceManagerUtil {
|
|||||||
*/
|
*/
|
||||||
public static void removeBillingCache() {
|
public static void removeBillingCache() {
|
||||||
CacheManager manager = getCacheManager();
|
CacheManager manager = getCacheManager();
|
||||||
manager.removeCache(DeviceManagementConstants.BILLING_CACHE);
|
Cache cache = manager.getCache(DeviceManagementConstants.BILLING_CACHE);
|
||||||
|
cache.removeAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user