@ -17,7 +17,6 @@ package org.thingsboard.server.dao.widget;
import com.fasterxml.jackson.databind.JsonNode ;
import com.google.common.util.concurrent.FluentFuture ;
import com.google.common.util.concurrent.ListenableFuture ;
import lombok.extern.slf4j.Slf4j ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.context.ApplicationEventPublisher ;
@ -51,8 +50,6 @@ import java.util.stream.Stream;
import static com.google.common.util.concurrent.MoreExecutors.directExecutor ;
import static org.thingsboard.server.dao.DaoUtil.toUUIDs ;
import static org.thingsboard.server.dao.entity.AbstractEntityService.checkConstraintViolation ;
import static org.thingsboard.server.dao.service.Validator.validateId ;
import static org.thingsboard.server.dao.service.Validator.validateIds ;
@Service ( "WidgetsBundleDaoService" )
@Slf4j
@ -257,19 +254,9 @@ public class WidgetsBundleServiceImpl implements WidgetsBundleService {
}
@Override
public ListenableFuture < List < WidgetsBundle > > findSystemWidgetsBundlesByIdsAsync ( TenantId tenantId , List < WidgetsBundleId > widgetsBundleIds ) {
log . trace ( "Executing findSystemWidgetsBundlesByIdsAsync, tenantId [{}], widgetsBundleIds [{}]" , tenantId , widgetsBundleIds ) ;
validateId ( tenantId , id - > INCORRECT_TENANT_ID + id ) ;
validateIds ( widgetsBundleIds , ids - > "Incorrect widgetsBundleIds " + ids ) ;
return widgetsBundleDao . findSystemWidgetBundlesByIdsAsync ( tenantId . getId ( ) , toUUIDs ( widgetsBundleIds ) ) ;
}
@Override
public ListenableFuture < List < WidgetsBundle > > findAllTenantWidgetsBundlesByIdsAsync ( TenantId tenantId , List < WidgetsBundleId > widgetsBundleIds ) {
log . trace ( "Executing findAllTenantWidgetsBundlesByIdsAsync, tenantId [{}], widgetsBundleIds [{}]" , tenantId , widgetsBundleIds ) ;
validateId ( tenantId , id - > INCORRECT_TENANT_ID + id ) ;
validateIds ( widgetsBundleIds , ids - > "Incorrect widgetsBundleIds " + ids ) ;
return widgetsBundleDao . findAllTenantWidgetBundlesByTenantIdAndIdsAsync ( tenantId . getId ( ) , toUUIDs ( widgetsBundleIds ) ) ;
public List < WidgetsBundle > findSystemOrTenantWidgetsBundlesByIds ( TenantId tenantId , List < WidgetsBundleId > widgetsBundleIds ) {
log . trace ( "Executing findSystemOrTenantWidgetsBundlesByIds, tenantId [{}], widgetsBundleIds [{}]" , tenantId , widgetsBundleIds ) ;
return widgetsBundleDao . findSystemOrTenantWidgetBundlesByIds ( tenantId . getId ( ) , toUUIDs ( widgetsBundleIds ) ) ;
}
private WidgetTypeDetails updateSystemWidget ( JsonNode widgetTypeJson ) {