|
|
|
@ -23,7 +23,6 @@ import com.google.common.util.concurrent.ListenableFuture; |
|
|
|
import com.google.common.util.concurrent.MoreExecutors; |
|
|
|
import lombok.Getter; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.context.support.DefaultMessageSourceResolvable; |
|
|
|
@ -47,6 +46,7 @@ import org.thingsboard.server.common.data.EntityViewInfo; |
|
|
|
import org.thingsboard.server.common.data.HasTenantId; |
|
|
|
import org.thingsboard.server.common.data.OtaPackage; |
|
|
|
import org.thingsboard.server.common.data.OtaPackageInfo; |
|
|
|
import org.thingsboard.server.common.data.StringUtils; |
|
|
|
import org.thingsboard.server.common.data.TbResource; |
|
|
|
import org.thingsboard.server.common.data.TbResourceInfo; |
|
|
|
import org.thingsboard.server.common.data.Tenant; |
|
|
|
@ -120,6 +120,7 @@ import org.thingsboard.server.dao.queue.QueueService; |
|
|
|
import org.thingsboard.server.dao.relation.RelationService; |
|
|
|
import org.thingsboard.server.dao.rpc.RpcService; |
|
|
|
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.TenantProfileService; |
|
|
|
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.util.TbCoreComponent; |
|
|
|
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.entitiy.TbNotificationEntityService; |
|
|
|
import org.thingsboard.server.service.ota.OtaPackageStateService; |
|
|
|
@ -418,7 +418,7 @@ public abstract class BaseController { |
|
|
|
|
|
|
|
PageLink createPageLink(int pageSize, int page, String textSearch, String sortProperty, String sortOrder) throws ThingsboardException { |
|
|
|
if (StringUtils.isNotEmpty(sortProperty)) { |
|
|
|
if (!StringUtils.isAlphanumeric(sortProperty)) { |
|
|
|
if (!Validator.isValidProperty(sortProperty)) { |
|
|
|
throw new IllegalArgumentException("Invalid sort property"); |
|
|
|
} |
|
|
|
SortOrder.Direction direction = SortOrder.Direction.ASC; |
|
|
|
|