|
|
|
@ -20,7 +20,6 @@ import org.springframework.stereotype.Component; |
|
|
|
import org.thingsboard.server.common.data.id.TenantId; |
|
|
|
import org.thingsboard.server.common.data.widget.WidgetType; |
|
|
|
import org.thingsboard.server.common.data.widget.WidgetTypeDetails; |
|
|
|
import org.thingsboard.server.common.data.widget.WidgetsBundle; |
|
|
|
import org.thingsboard.server.dao.exception.DataValidationException; |
|
|
|
import org.thingsboard.server.dao.model.ModelConstants; |
|
|
|
import org.thingsboard.server.dao.service.DataValidator; |
|
|
|
@ -39,7 +38,6 @@ public class WidgetTypeDataValidator extends DataValidator<WidgetTypeDetails> { |
|
|
|
@Override |
|
|
|
protected void validateDataImpl(TenantId tenantId, WidgetTypeDetails widgetTypeDetails) { |
|
|
|
validateName("Widgets type name", widgetTypeDetails.getName()); |
|
|
|
validateName("Widgets type bundle alias", widgetTypeDetails.getBundleAlias()); |
|
|
|
if (widgetTypeDetails.getDescriptor() == null || widgetTypeDetails.getDescriptor().size() == 0) { |
|
|
|
throw new DataValidationException("Widgets type descriptor can't be empty!"); |
|
|
|
} |
|
|
|
|