Search in sources :

Example 11 with PluginId

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

the class PluginMetaDataEntity method toData.

@Override
public PluginMetaData toData() {
    PluginMetaData data = new PluginMetaData(new PluginId(id));
    data.setTenantId(new TenantId(tenantId));
    data.setCreatedTime(UUIDs.unixTimestamp(id));
    data.setName(name);
    data.setConfiguration(configuration);
    data.setClazz(clazz);
    data.setPublicAccess(publicAccess);
    data.setState(state);
    data.setApiToken(apiToken);
    data.setAdditionalInfo(additionalInfo);
    return data;
}
Also used : TenantId(org.thingsboard.server.common.data.id.TenantId) PluginMetaData(org.thingsboard.server.common.data.plugin.PluginMetaData) PluginId(org.thingsboard.server.common.data.id.PluginId)

Aggregations

PluginId (org.thingsboard.server.common.data.id.PluginId)11 TenantId (org.thingsboard.server.common.data.id.TenantId)7 PluginMetaData (org.thingsboard.server.common.data.plugin.PluginMetaData)7 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)3 ThingsboardException (org.thingsboard.server.exception.ThingsboardException)3 ClusterAPIProtos (org.thingsboard.server.gen.cluster.ClusterAPIProtos)3 ActorRef (akka.actor.ActorRef)1 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Optional (java.util.Optional)1 UUID (java.util.UUID)1 Collectors (java.util.stream.Collectors)1 Slf4j (lombok.extern.slf4j.Slf4j)1 StringUtils (org.apache.commons.lang3.StringUtils)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1 Service (org.springframework.stereotype.Service)1 DeviceId (org.thingsboard.server.common.data.id.DeviceId)1 RuleId (org.thingsboard.server.common.data.id.RuleId)1 TextPageData (org.thingsboard.server.common.data.page.TextPageData)1