refactoring
This commit is contained in:
parent
2d4b8a85f9
commit
cda9cc4782
@ -78,6 +78,8 @@ import static org.thingsboard.server.controller.ControllerConstants.EDGE_ASSIGN_
|
|||||||
import static org.thingsboard.server.controller.ControllerConstants.EDGE_ID_PARAM_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.EDGE_ID_PARAM_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.EDGE_UNASSIGN_ASYNC_FIRST_STEP_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.EDGE_UNASSIGN_ASYNC_FIRST_STEP_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.EDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.EDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION;
|
||||||
|
import static org.thingsboard.server.controller.ControllerConstants.NAME_CONFLICT_POLICY_DESC;
|
||||||
|
import static org.thingsboard.server.controller.ControllerConstants.NAME_CONFLICT_SEPARATOR_DESC;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
|
||||||
@ -140,13 +142,9 @@ public class AssetController extends BaseController {
|
|||||||
@RequestMapping(value = "/asset", method = RequestMethod.POST)
|
@RequestMapping(value = "/asset", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Asset saveAsset(@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "A JSON value representing the asset.") @RequestBody Asset asset,
|
public Asset saveAsset(@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "A JSON value representing the asset.") @RequestBody Asset asset,
|
||||||
@Parameter(description = "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. " +
|
@Parameter(description = NAME_CONFLICT_POLICY_DESC)
|
||||||
"If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. " +
|
|
||||||
"UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.")
|
|
||||||
@RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy,
|
@RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy,
|
||||||
@Parameter(description = "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. " +
|
@Parameter(description = NAME_CONFLICT_SEPARATOR_DESC)
|
||||||
"For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for asset 'Office A', " +
|
|
||||||
"created asset will have name like 'Office A-7fsh4f'.")
|
|
||||||
@RequestParam(name = "separator", defaultValue = "_") String separator) throws Exception {
|
@RequestParam(name = "separator", defaultValue = "_") String separator) throws Exception {
|
||||||
asset.setTenantId(getTenantId());
|
asset.setTenantId(getTenantId());
|
||||||
checkEntity(asset.getId(), asset, Resource.ASSET);
|
checkEntity(asset.getId(), asset, Resource.ASSET);
|
||||||
|
|||||||
@ -1744,4 +1744,12 @@ public class ControllerConstants {
|
|||||||
MARKDOWN_CODE_BLOCK_END ;
|
MARKDOWN_CODE_BLOCK_END ;
|
||||||
|
|
||||||
protected static final String SECURITY_WRITE_CHECK = " Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).";
|
protected static final String SECURITY_WRITE_CHECK = " Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).";
|
||||||
|
|
||||||
|
public static final String NAME_CONFLICT_POLICY_DESC = "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. " +
|
||||||
|
" If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. " +
|
||||||
|
" UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.";
|
||||||
|
|
||||||
|
public static final String NAME_CONFLICT_SEPARATOR_DESC = "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. " +
|
||||||
|
"For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', " +
|
||||||
|
"created entity will have name like 'test-name-7fsh4f'.";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,6 +49,8 @@ import static org.thingsboard.server.controller.ControllerConstants.CUSTOMER_ID;
|
|||||||
import static org.thingsboard.server.controller.ControllerConstants.CUSTOMER_ID_PARAM_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.CUSTOMER_ID_PARAM_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.CUSTOMER_TEXT_SEARCH_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.CUSTOMER_TEXT_SEARCH_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.HOME_DASHBOARD;
|
import static org.thingsboard.server.controller.ControllerConstants.HOME_DASHBOARD;
|
||||||
|
import static org.thingsboard.server.controller.ControllerConstants.NAME_CONFLICT_POLICY_DESC;
|
||||||
|
import static org.thingsboard.server.controller.ControllerConstants.NAME_CONFLICT_SEPARATOR_DESC;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
|
||||||
@ -131,13 +133,9 @@ public class CustomerController extends BaseController {
|
|||||||
@RequestMapping(value = "/customer", method = RequestMethod.POST)
|
@RequestMapping(value = "/customer", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Customer saveCustomer(@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "A JSON value representing the customer.") @RequestBody Customer customer,
|
public Customer saveCustomer(@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "A JSON value representing the customer.") @RequestBody Customer customer,
|
||||||
@Parameter(description = "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. " +
|
@Parameter(description = NAME_CONFLICT_POLICY_DESC)
|
||||||
"If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. " +
|
|
||||||
"UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.")
|
|
||||||
@RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy,
|
@RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy,
|
||||||
@Parameter(description = "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. " +
|
@Parameter(description = NAME_CONFLICT_SEPARATOR_DESC)
|
||||||
"For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for customer name 'Customer A', " +
|
|
||||||
"created customer will have name like 'Customer A-7fsh4f'.")
|
|
||||||
@RequestParam(name = "separator", defaultValue = "_") String separator) throws Exception {
|
@RequestParam(name = "separator", defaultValue = "_") String separator) throws Exception {
|
||||||
customer.setTenantId(getTenantId());
|
customer.setTenantId(getTenantId());
|
||||||
checkEntity(customer.getId(), customer, Resource.CUSTOMER);
|
checkEntity(customer.getId(), customer, Resource.CUSTOMER);
|
||||||
|
|||||||
@ -110,6 +110,8 @@ import static org.thingsboard.server.controller.ControllerConstants.EDGE_ASSIGN_
|
|||||||
import static org.thingsboard.server.controller.ControllerConstants.EDGE_ID_PARAM_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.EDGE_ID_PARAM_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.EDGE_UNASSIGN_ASYNC_FIRST_STEP_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.EDGE_UNASSIGN_ASYNC_FIRST_STEP_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.EDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.EDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION;
|
||||||
|
import static org.thingsboard.server.controller.ControllerConstants.NAME_CONFLICT_POLICY_DESC;
|
||||||
|
import static org.thingsboard.server.controller.ControllerConstants.NAME_CONFLICT_SEPARATOR_DESC;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
|
||||||
@ -181,13 +183,9 @@ public class DeviceController extends BaseController {
|
|||||||
@Parameter(description = "Optional value of the device credentials to be used during device creation. " +
|
@Parameter(description = "Optional value of the device credentials to be used during device creation. " +
|
||||||
"If omitted, access token will be auto-generated.")
|
"If omitted, access token will be auto-generated.")
|
||||||
@RequestParam(name = "accessToken", required = false) String accessToken,
|
@RequestParam(name = "accessToken", required = false) String accessToken,
|
||||||
@Parameter(description = "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. " +
|
@Parameter(description = NAME_CONFLICT_POLICY_DESC)
|
||||||
"If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. " +
|
|
||||||
"UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.")
|
|
||||||
@RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy,
|
@RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy,
|
||||||
@Parameter(description = "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. " +
|
@Parameter(description = NAME_CONFLICT_SEPARATOR_DESC)
|
||||||
"For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for device name 'thermostat', " +
|
|
||||||
"created device will have name like 'thermostat-7fsh4f'.")
|
|
||||||
@RequestParam(name = "separator", defaultValue = "_") String separator) throws Exception {
|
@RequestParam(name = "separator", defaultValue = "_") String separator) throws Exception {
|
||||||
device.setTenantId(getCurrentUser().getTenantId());
|
device.setTenantId(getCurrentUser().getTenantId());
|
||||||
if (device.getId() != null) {
|
if (device.getId() != null) {
|
||||||
|
|||||||
@ -71,6 +71,8 @@ import static org.thingsboard.server.controller.ControllerConstants.ENTITY_VIEW_
|
|||||||
import static org.thingsboard.server.controller.ControllerConstants.ENTITY_VIEW_TEXT_SEARCH_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.ENTITY_VIEW_TEXT_SEARCH_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.ENTITY_VIEW_TYPE;
|
import static org.thingsboard.server.controller.ControllerConstants.ENTITY_VIEW_TYPE;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.MODEL_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.MODEL_DESCRIPTION;
|
||||||
|
import static org.thingsboard.server.controller.ControllerConstants.NAME_CONFLICT_POLICY_DESC;
|
||||||
|
import static org.thingsboard.server.controller.ControllerConstants.NAME_CONFLICT_SEPARATOR_DESC;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_DATA_PARAMETERS;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_NUMBER_DESCRIPTION;
|
||||||
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
|
import static org.thingsboard.server.controller.ControllerConstants.PAGE_SIZE_DESCRIPTION;
|
||||||
@ -131,13 +133,9 @@ public class EntityViewController extends BaseController {
|
|||||||
public EntityView saveEntityView(
|
public EntityView saveEntityView(
|
||||||
@Parameter(description = "A JSON object representing the entity view.")
|
@Parameter(description = "A JSON object representing the entity view.")
|
||||||
@RequestBody EntityView entityView,
|
@RequestBody EntityView entityView,
|
||||||
@Parameter(description = "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. " +
|
@Parameter(description = NAME_CONFLICT_POLICY_DESC)
|
||||||
"If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. " +
|
|
||||||
"UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.")
|
|
||||||
@RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy,
|
@RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy,
|
||||||
@Parameter(description = "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. " +
|
@Parameter(description = NAME_CONFLICT_SEPARATOR_DESC)
|
||||||
"For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity view name 'Device A', " +
|
|
||||||
"created customer will have name like 'Device A-7fsh4f'.")
|
|
||||||
@RequestParam(name = "separator", defaultValue = "_") String separator) throws Exception {
|
@RequestParam(name = "separator", defaultValue = "_") String separator) throws Exception {
|
||||||
entityView.setTenantId(getCurrentUser().getTenantId());
|
entityView.setTenantId(getCurrentUser().getTenantId());
|
||||||
EntityView existingEntityView = null;
|
EntityView existingEntityView = null;
|
||||||
|
|||||||
@ -166,9 +166,6 @@ public class BaseAssetService extends AbstractCachedEntityService<AssetCacheKey,
|
|||||||
} else if (asset.getId() != null) {
|
} else if (asset.getId() != null) {
|
||||||
oldAsset = findAssetById(asset.getTenantId(), asset.getId());
|
oldAsset = findAssetById(asset.getTenantId(), asset.getId());
|
||||||
}
|
}
|
||||||
if (nameConflictStrategy.policy() == NameConflictPolicy.UNIQUIFY) {
|
|
||||||
uniquifyEntityName(asset, oldAsset, asset::setName, EntityType.ASSET, nameConflictStrategy);
|
|
||||||
}
|
|
||||||
AssetCacheEvictEvent evictEvent = new AssetCacheEvictEvent(asset.getTenantId(), asset.getName(), oldAsset != null ? oldAsset.getName() : null);
|
AssetCacheEvictEvent evictEvent = new AssetCacheEvictEvent(asset.getTenantId(), asset.getName(), oldAsset != null ? oldAsset.getName() : null);
|
||||||
Asset savedAsset;
|
Asset savedAsset;
|
||||||
try {
|
try {
|
||||||
@ -190,6 +187,9 @@ public class BaseAssetService extends AbstractCachedEntityService<AssetCacheKey,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
asset.setType(assetProfile.getName());
|
asset.setType(assetProfile.getName());
|
||||||
|
if (nameConflictStrategy.policy() == NameConflictPolicy.UNIQUIFY) {
|
||||||
|
uniquifyEntityName(asset, oldAsset, asset::setName, EntityType.ASSET, nameConflictStrategy);
|
||||||
|
}
|
||||||
savedAsset = assetDao.saveAndFlush(asset.getTenantId(), asset);
|
savedAsset = assetDao.saveAndFlush(asset.getTenantId(), asset);
|
||||||
publishEvictEvent(evictEvent);
|
publishEvictEvent(evictEvent);
|
||||||
eventPublisher.publishEvent(SaveEntityEvent.builder().tenantId(savedAsset.getTenantId()).entityId(savedAsset.getId())
|
eventPublisher.publishEvent(SaveEntityEvent.builder().tenantId(savedAsset.getTenantId()).entityId(savedAsset.getId())
|
||||||
|
|||||||
@ -160,11 +160,11 @@ public class CustomerServiceImpl extends AbstractCachedEntityService<CustomerCac
|
|||||||
if (doValidate) {
|
if (doValidate) {
|
||||||
oldCustomer = customerValidator.validate(customer, Customer::getTenantId);
|
oldCustomer = customerValidator.validate(customer, Customer::getTenantId);
|
||||||
}
|
}
|
||||||
|
var evictEvent = new CustomerCacheEvictEvent(customer.getTenantId(), customer.getTitle(), oldCustomer != null ? oldCustomer.getTitle() : null);
|
||||||
|
try {
|
||||||
if (nameConflictStrategy.policy() == NameConflictPolicy.UNIQUIFY) {
|
if (nameConflictStrategy.policy() == NameConflictPolicy.UNIQUIFY) {
|
||||||
uniquifyEntityName(customer, oldCustomer, customer::setTitle, EntityType.CUSTOMER, nameConflictStrategy);
|
uniquifyEntityName(customer, oldCustomer, customer::setTitle, EntityType.CUSTOMER, nameConflictStrategy);
|
||||||
}
|
}
|
||||||
var evictEvent = new CustomerCacheEvictEvent(customer.getTenantId(), customer.getTitle(), oldCustomer != null ? oldCustomer.getTitle() : null);
|
|
||||||
try {
|
|
||||||
Customer savedCustomer = customerDao.saveAndFlush(customer.getTenantId(), customer);
|
Customer savedCustomer = customerDao.saveAndFlush(customer.getTenantId(), customer);
|
||||||
if (!savedCustomer.isPublic()) {
|
if (!savedCustomer.isPublic()) {
|
||||||
dashboardService.updateCustomerDashboards(savedCustomer.getTenantId(), savedCustomer.getId());
|
dashboardService.updateCustomerDashboards(savedCustomer.getTenantId(), savedCustomer.getId());
|
||||||
|
|||||||
@ -235,9 +235,6 @@ public class DeviceServiceImpl extends CachedVersionedEntityService<DeviceCacheK
|
|||||||
} else if (device.getId() != null) {
|
} else if (device.getId() != null) {
|
||||||
oldDevice = findDeviceById(device.getTenantId(), device.getId());
|
oldDevice = findDeviceById(device.getTenantId(), device.getId());
|
||||||
}
|
}
|
||||||
if (nameConflictStrategy.policy() == NameConflictPolicy.UNIQUIFY) {
|
|
||||||
uniquifyEntityName(device, oldDevice, device::setName, EntityType.DEVICE, nameConflictStrategy);
|
|
||||||
}
|
|
||||||
DeviceCacheEvictEvent deviceCacheEvictEvent = new DeviceCacheEvictEvent(device.getTenantId(), device.getId(), device.getName(), oldDevice != null ? oldDevice.getName() : null);
|
DeviceCacheEvictEvent deviceCacheEvictEvent = new DeviceCacheEvictEvent(device.getTenantId(), device.getId(), device.getName(), oldDevice != null ? oldDevice.getName() : null);
|
||||||
try {
|
try {
|
||||||
DeviceProfile deviceProfile;
|
DeviceProfile deviceProfile;
|
||||||
@ -259,6 +256,9 @@ public class DeviceServiceImpl extends CachedVersionedEntityService<DeviceCacheK
|
|||||||
}
|
}
|
||||||
device.setType(deviceProfile.getName());
|
device.setType(deviceProfile.getName());
|
||||||
device.setDeviceData(syncDeviceData(deviceProfile, device.getDeviceData()));
|
device.setDeviceData(syncDeviceData(deviceProfile, device.getDeviceData()));
|
||||||
|
if (nameConflictStrategy.policy() == NameConflictPolicy.UNIQUIFY) {
|
||||||
|
uniquifyEntityName(device, oldDevice, device::setName, EntityType.DEVICE, nameConflictStrategy);
|
||||||
|
}
|
||||||
Device savedDevice = deviceDao.saveAndFlush(device.getTenantId(), device);
|
Device savedDevice = deviceDao.saveAndFlush(device.getTenantId(), device);
|
||||||
deviceCacheEvictEvent.setSavedDevice(savedDevice);
|
deviceCacheEvictEvent.setSavedDevice(savedDevice);
|
||||||
publishEvictEvent(deviceCacheEvictEvent);
|
publishEvictEvent(deviceCacheEvictEvent);
|
||||||
|
|||||||
@ -130,10 +130,10 @@ public class EntityViewServiceImpl extends CachedVersionedEntityService<EntityVi
|
|||||||
} else if (entityView.getId() != null) {
|
} else if (entityView.getId() != null) {
|
||||||
old = findEntityViewById(entityView.getTenantId(), entityView.getId(), false);
|
old = findEntityViewById(entityView.getTenantId(), entityView.getId(), false);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
if (nameConflictStrategy.policy() == NameConflictPolicy.UNIQUIFY) {
|
if (nameConflictStrategy.policy() == NameConflictPolicy.UNIQUIFY) {
|
||||||
uniquifyEntityName(entityView, old, entityView::setName, EntityType.ENTITY_VIEW, nameConflictStrategy);
|
uniquifyEntityName(entityView, old, entityView::setName, EntityType.ENTITY_VIEW, nameConflictStrategy);
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
EntityView saved = entityViewDao.save(entityView.getTenantId(), entityView);
|
EntityView saved = entityViewDao.save(entityView.getTenantId(), entityView);
|
||||||
publishEvictEvent(new EntityViewEvictEvent(saved.getTenantId(), saved.getId(), saved.getEntityId(), old != null ? old.getEntityId() : null, saved.getName(), old != null ? old.getName() : null, saved));
|
publishEvictEvent(new EntityViewEvictEvent(saved.getTenantId(), saved.getId(), saved.getEntityId(), old != null ? old.getEntityId() : null, saved.getName(), old != null ? old.getName() : null, saved));
|
||||||
eventPublisher.publishEvent(SaveEntityEvent.builder().tenantId(saved.getTenantId())
|
eventPublisher.publishEvent(SaveEntityEvent.builder().tenantId(saved.getTenantId())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user