@ -74,6 +74,7 @@ public class WidgetTypeController extends AutoCommitController {
"Those properties are useful to edit the Widget Type but they are not required for Dashboard rendering. ";
"Those properties are useful to edit the Widget Type but they are not required for Dashboard rendering. ";
privatestaticfinalStringWIDGET_TYPE_INFO_DESCRIPTION="Widget Type Info is a lightweight object that represents Widget Type but does not contain the heavyweight widget descriptor JSON";
privatestaticfinalStringWIDGET_TYPE_INFO_DESCRIPTION="Widget Type Info is a lightweight object that represents Widget Type but does not contain the heavyweight widget descriptor JSON";
privatestaticfinalStringTENANT_ONLY_PARAM_DESCRIPTION="Optional boolean parameter indicating whether only tenant widget types should be returned";
privatestaticfinalStringTENANT_ONLY_PARAM_DESCRIPTION="Optional boolean parameter indicating whether only tenant widget types should be returned";
privatestaticfinalStringFULL_SEARCH_PARAM_DESCRIPTION="Optional boolean parameter indicating whether search widgets by description not only by name";
privatestaticfinalStringUPDATE_EXISTING_BY_FQN_PARAM_DESCRIPTION="Optional boolean parameter indicating whether to update existing widget type by FQN if present instead of creating new one";
privatestaticfinalStringUPDATE_EXISTING_BY_FQN_PARAM_DESCRIPTION="Optional boolean parameter indicating whether to update existing widget type by FQN if present instead of creating new one";
@ApiOperation(value="Get Widget Type Details (getWidgetTypeById)",
@ApiOperation(value="Get Widget Type Details (getWidgetTypeById)",
@ -163,15 +164,17 @@ public class WidgetTypeController extends AutoCommitController {
@Query("SELECT new org.thingsboard.server.dao.model.sql.WidgetTypeInfoEntity(wtd) FROM WidgetTypeDetailsEntity wtd WHERE wtd.tenantId = :systemTenantId "+
@Query("SELECT new org.thingsboard.server.dao.model.sql.WidgetTypeInfoEntity(wtd) FROM WidgetTypeDetailsEntity wtd WHERE wtd.tenantId = :systemTenantId "+
"AND LOWER(wtd.name) LIKE LOWER(CONCAT('%', :searchText, '%'))")
"AND (LOWER(wtd.name) LIKE LOWER(CONCAT('%', :searchText, '%')) "+
"OR ((:fullSearch) IS TRUE AND LOWER(wtd.description) LIKE LOWER(CONCAT('%', :searchText, '%'))))")
@Query("SELECT new org.thingsboard.server.dao.model.sql.WidgetTypeInfoEntity(wtd) FROM WidgetTypeDetailsEntity wtd WHERE wtd.tenantId IN (:tenantId, :nullTenantId) "+
@Query("SELECT new org.thingsboard.server.dao.model.sql.WidgetTypeInfoEntity(wtd) FROM WidgetTypeDetailsEntity wtd WHERE wtd.tenantId IN (:tenantId, :nullTenantId) "+
"AND LOWER(wtd.name) LIKE LOWER(CONCAT('%', :textSearch, '%'))")
"AND (LOWER(wtd.name) LIKE LOWER(CONCAT('%', :searchText, '%')) "+
"OR ((:fullSearch) IS TRUE AND LOWER(wtd.description) LIKE LOWER(CONCAT('%', :searchText, '%'))))")