|
|
@ -120,6 +120,7 @@ import org.thingsboard.server.dao.queue.QueueService; |
|
|
import org.thingsboard.server.dao.relation.RelationService; |
|
|
import org.thingsboard.server.dao.relation.RelationService; |
|
|
import org.thingsboard.server.dao.rpc.RpcService; |
|
|
import org.thingsboard.server.dao.rpc.RpcService; |
|
|
import org.thingsboard.server.dao.rule.RuleChainService; |
|
|
import org.thingsboard.server.dao.rule.RuleChainService; |
|
|
|
|
|
import org.thingsboard.server.dao.service.Validator; |
|
|
import org.thingsboard.server.dao.tenant.TbTenantProfileCache; |
|
|
import org.thingsboard.server.dao.tenant.TbTenantProfileCache; |
|
|
import org.thingsboard.server.dao.tenant.TenantProfileService; |
|
|
import org.thingsboard.server.dao.tenant.TenantProfileService; |
|
|
import org.thingsboard.server.dao.tenant.TenantService; |
|
|
import org.thingsboard.server.dao.tenant.TenantService; |
|
|
@ -131,7 +132,6 @@ import org.thingsboard.server.queue.discovery.PartitionService; |
|
|
import org.thingsboard.server.queue.provider.TbQueueProducerProvider; |
|
|
import org.thingsboard.server.queue.provider.TbQueueProducerProvider; |
|
|
import org.thingsboard.server.queue.util.TbCoreComponent; |
|
|
import org.thingsboard.server.queue.util.TbCoreComponent; |
|
|
import org.thingsboard.server.service.component.ComponentDiscoveryService; |
|
|
import org.thingsboard.server.service.component.ComponentDiscoveryService; |
|
|
import org.thingsboard.server.service.edge.EdgeNotificationService; |
|
|
|
|
|
import org.thingsboard.server.service.edge.rpc.EdgeRpcService; |
|
|
import org.thingsboard.server.service.edge.rpc.EdgeRpcService; |
|
|
import org.thingsboard.server.service.entitiy.TbNotificationEntityService; |
|
|
import org.thingsboard.server.service.entitiy.TbNotificationEntityService; |
|
|
import org.thingsboard.server.service.ota.OtaPackageStateService; |
|
|
import org.thingsboard.server.service.ota.OtaPackageStateService; |
|
|
@ -417,9 +417,12 @@ public abstract class BaseController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
PageLink createPageLink(int pageSize, int page, String textSearch, String sortProperty, String sortOrder) throws ThingsboardException { |
|
|
PageLink createPageLink(int pageSize, int page, String textSearch, String sortProperty, String sortOrder) throws ThingsboardException { |
|
|
if (!StringUtils.isEmpty(sortProperty)) { |
|
|
if (StringUtils.isNotEmpty(sortProperty)) { |
|
|
|
|
|
if (!Validator.isValidProperty(sortProperty)) { |
|
|
|
|
|
throw new IllegalArgumentException("Invalid sort property"); |
|
|
|
|
|
} |
|
|
SortOrder.Direction direction = SortOrder.Direction.ASC; |
|
|
SortOrder.Direction direction = SortOrder.Direction.ASC; |
|
|
if (!StringUtils.isEmpty(sortOrder)) { |
|
|
if (StringUtils.isNotEmpty(sortOrder)) { |
|
|
try { |
|
|
try { |
|
|
direction = SortOrder.Direction.valueOf(sortOrder.toUpperCase()); |
|
|
direction = SortOrder.Direction.valueOf(sortOrder.toUpperCase()); |
|
|
} catch (IllegalArgumentException e) { |
|
|
} catch (IllegalArgumentException e) { |
|
|
|