use of org.finos.legend.engine.shared.core.url.StreamProvider in project legend-engine by finos.
the class AbstractServicePlanExecutor method execute.
protected Result execute(Map<String, ?> parameters, ServiceRunnerInput serviceRunnerInput, StreamProvider streamProvider) {
MutableList<CommonProfile> profiles = Lists.mutable.empty();
PlanExecutionContext planExecutionContext = null;
if (serviceRunnerInput != null) {
Identity identity = serviceRunnerInput.getIdentity();
if (identity != null) {
profiles.addAll(IdentityFactoryProvider.getInstance().adapt(identity));
}
if (serviceRunnerInput.getOperationalContext() != null && serviceRunnerInput.getOperationalContext().getGraphFetchCrossAssociationKeysCacheConfig() != null) {
List<GraphFetchCache> graphFetchCaches = serviceRunnerInput.getOperationalContext().getGraphFetchCrossAssociationKeysCacheConfig().entrySet().stream().map(e -> ExecutionCacheBuilder.buildGraphFetchCacheByTargetCrossKeysFromExecutionCache(e.getValue(), e.getKey())).collect(Collectors.toList());
planExecutionContext = new PlanExecutionContext(graphFetchCaches);
}
}
return this.executor.execute(this.plan, parameters, streamProvider, profiles, planExecutionContext);
}
Aggregations