|
|
|
@ -58,11 +58,13 @@ import java.security.cert.Certificate; |
|
|
|
import java.security.cert.CertificateException; |
|
|
|
import java.security.cert.CertificateFactory; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.regex.Matcher; |
|
|
|
import java.util.regex.Pattern; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static org.thingsboard.server.dao.service.Validator.validateId; |
|
|
|
import static org.thingsboard.server.dao.service.Validator.validateString; |
|
|
|
@ -378,7 +380,9 @@ public class DeviceProfileServiceImpl extends AbstractCachedEntityService<Device |
|
|
|
public List<EntityInfo> findDeviceProfileNamesByTenantId(TenantId tenantId, boolean activeOnly) { |
|
|
|
log.trace("Executing findDeviceProfileNamesByTenantId, tenantId [{}]", tenantId); |
|
|
|
validateId(tenantId, INCORRECT_TENANT_ID + tenantId); |
|
|
|
return deviceProfileDao.findTenantDeviceProfileNames(tenantId.getId(), activeOnly); |
|
|
|
return deviceProfileDao.findTenantDeviceProfileNames(tenantId.getId(), activeOnly) |
|
|
|
.stream().sorted(Comparator.comparing(EntityInfo::getName)) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
private final PaginatedRemover<TenantId, DeviceProfile> tenantDeviceProfilesRemover = |
|
|
|
|