|
|
@ -15,11 +15,11 @@ |
|
|
*/ |
|
|
*/ |
|
|
package org.thingsboard.rule.engine.metadata; |
|
|
package org.thingsboard.rule.engine.metadata; |
|
|
|
|
|
|
|
|
|
|
|
import com.google.common.util.concurrent.Futures; |
|
|
import com.google.common.util.concurrent.ListenableFuture; |
|
|
import com.google.common.util.concurrent.ListenableFuture; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.thingsboard.rule.engine.api.RuleNode; |
|
|
import org.thingsboard.rule.engine.api.RuleNode; |
|
|
import org.thingsboard.rule.engine.api.TbContext; |
|
|
import org.thingsboard.rule.engine.api.TbContext; |
|
|
import org.thingsboard.rule.engine.util.EntitiesTenantIdAsyncLoader; |
|
|
|
|
|
import org.thingsboard.server.common.data.id.EntityId; |
|
|
import org.thingsboard.server.common.data.id.EntityId; |
|
|
import org.thingsboard.server.common.data.id.TenantId; |
|
|
import org.thingsboard.server.common.data.id.TenantId; |
|
|
import org.thingsboard.server.common.data.plugin.ComponentType; |
|
|
import org.thingsboard.server.common.data.plugin.ComponentType; |
|
|
@ -40,7 +40,7 @@ public class TbGetTenantAttributeNode extends TbEntityGetAttrNode<TenantId> { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected ListenableFuture<TenantId> findEntityAsync(TbContext ctx, EntityId originator) { |
|
|
protected ListenableFuture<TenantId> findEntityAsync(TbContext ctx, EntityId originator) { |
|
|
return EntitiesTenantIdAsyncLoader.findEntityIdAsync(ctx, originator); |
|
|
return Futures.immediateFuture(ctx.getTenantId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|