Search in sources :

Example 1 with ComponentDescriptorId

use of org.thingsboard.server.common.data.id.ComponentDescriptorId in project thingsboard by thingsboard.

the class JpaBaseComponentDescriptorDaoTest method createComponentDescriptor.

private void createComponentDescriptor(ComponentType type, ComponentScope scope, int index) {
    ComponentDescriptor component = new ComponentDescriptor();
    component.setId(new ComponentDescriptorId(UUIDs.timeBased()));
    component.setType(type);
    component.setScope(scope);
    component.setName("COMPONENT_" + index);
    componentDescriptorDao.save(component);
}
Also used : ComponentDescriptor(org.thingsboard.server.common.data.plugin.ComponentDescriptor) ComponentDescriptorId(org.thingsboard.server.common.data.id.ComponentDescriptorId)

Example 2 with ComponentDescriptorId

use of org.thingsboard.server.common.data.id.ComponentDescriptorId in project thingsboard by thingsboard.

the class ComponentDescriptorEntity method toData.

@Override
public ComponentDescriptor toData() {
    ComponentDescriptor data = new ComponentDescriptor(new ComponentDescriptorId(this.getId()));
    data.setType(type);
    data.setScope(scope);
    data.setName(this.getName());
    data.setClazz(this.getClazz());
    data.setActions(this.getActions());
    data.setConfigurationDescriptor(configurationDescriptor);
    return data;
}
Also used : ComponentDescriptor(org.thingsboard.server.common.data.plugin.ComponentDescriptor) ComponentDescriptorId(org.thingsboard.server.common.data.id.ComponentDescriptorId)

Example 3 with ComponentDescriptorId

use of org.thingsboard.server.common.data.id.ComponentDescriptorId in project thingsboard by thingsboard.

the class ComponentDescriptorEntity method toData.

@Override
public ComponentDescriptor toData() {
    ComponentDescriptor data = new ComponentDescriptor(new ComponentDescriptorId(id));
    data.setType(type);
    data.setScope(scope);
    data.setName(this.getName());
    data.setClazz(this.getClazz());
    data.setActions(this.getActions());
    data.setConfigurationDescriptor(this.getConfigurationDescriptor());
    return data;
}
Also used : ComponentDescriptor(org.thingsboard.server.common.data.plugin.ComponentDescriptor) ComponentDescriptorId(org.thingsboard.server.common.data.id.ComponentDescriptorId)

Aggregations

ComponentDescriptorId (org.thingsboard.server.common.data.id.ComponentDescriptorId)3 ComponentDescriptor (org.thingsboard.server.common.data.plugin.ComponentDescriptor)3