Search in sources :

Example 1 with BaseWidgetType

use of org.thingsboard.server.common.data.widget.BaseWidgetType in project thingsboard by thingsboard.

the class WidgetTypeEntity method toData.

@Override
public WidgetType toData() {
    BaseWidgetType baseWidgetType = super.toBaseWidgetType();
    WidgetType widgetType = new WidgetType(baseWidgetType);
    widgetType.setDescriptor(descriptor);
    return widgetType;
}
Also used : BaseWidgetType(org.thingsboard.server.common.data.widget.BaseWidgetType) BaseWidgetType(org.thingsboard.server.common.data.widget.BaseWidgetType) WidgetType(org.thingsboard.server.common.data.widget.WidgetType)

Example 2 with BaseWidgetType

use of org.thingsboard.server.common.data.widget.BaseWidgetType in project thingsboard by thingsboard.

the class WidgetTypeDetailsEntity method toData.

@Override
public WidgetTypeDetails toData() {
    BaseWidgetType baseWidgetType = super.toBaseWidgetType();
    WidgetTypeDetails widgetTypeDetails = new WidgetTypeDetails(baseWidgetType);
    widgetTypeDetails.setImage(image);
    widgetTypeDetails.setDescription(description);
    widgetTypeDetails.setDescriptor(descriptor);
    return widgetTypeDetails;
}
Also used : BaseWidgetType(org.thingsboard.server.common.data.widget.BaseWidgetType) WidgetTypeDetails(org.thingsboard.server.common.data.widget.WidgetTypeDetails)

Example 3 with BaseWidgetType

use of org.thingsboard.server.common.data.widget.BaseWidgetType in project thingsboard by thingsboard.

the class AbstractWidgetTypeEntity method toBaseWidgetType.

protected BaseWidgetType toBaseWidgetType() {
    BaseWidgetType widgetType = new BaseWidgetType(new WidgetTypeId(getUuid()));
    widgetType.setCreatedTime(createdTime);
    if (tenantId != null) {
        widgetType.setTenantId(TenantId.fromUUID(tenantId));
    }
    widgetType.setBundleAlias(bundleAlias);
    widgetType.setAlias(alias);
    widgetType.setName(name);
    return widgetType;
}
Also used : BaseWidgetType(org.thingsboard.server.common.data.widget.BaseWidgetType) WidgetTypeId(org.thingsboard.server.common.data.id.WidgetTypeId)

Example 4 with BaseWidgetType

use of org.thingsboard.server.common.data.widget.BaseWidgetType in project thingsboard by thingsboard.

the class WidgetTypeInfoEntity method toData.

@Override
public WidgetTypeInfo toData() {
    BaseWidgetType baseWidgetType = super.toBaseWidgetType();
    WidgetTypeInfo widgetTypeInfo = new WidgetTypeInfo(baseWidgetType);
    widgetTypeInfo.setImage(image);
    widgetTypeInfo.setDescription(description);
    widgetTypeInfo.setWidgetType(widgetType);
    return widgetTypeInfo;
}
Also used : BaseWidgetType(org.thingsboard.server.common.data.widget.BaseWidgetType) WidgetTypeInfo(org.thingsboard.server.common.data.widget.WidgetTypeInfo)

Aggregations

BaseWidgetType (org.thingsboard.server.common.data.widget.BaseWidgetType)4 WidgetTypeId (org.thingsboard.server.common.data.id.WidgetTypeId)1 WidgetType (org.thingsboard.server.common.data.widget.WidgetType)1 WidgetTypeDetails (org.thingsboard.server.common.data.widget.WidgetTypeDetails)1 WidgetTypeInfo (org.thingsboard.server.common.data.widget.WidgetTypeInfo)1