1 package org.simantics.modeling;
5 import org.simantics.db.ReadGraph;
6 import org.simantics.db.Resource;
7 import org.simantics.db.exception.DatabaseException;
8 import org.simantics.scl.compiler.environment.LocalEnvironment;
9 import org.simantics.scl.compiler.environment.specification.EnvironmentSpecification;
11 public interface IComponentTypeScriptEnvironmentFactory {
14 * Return the EnvironmentSpecification used to initialize the runtime environment for this script
17 * @param componentType
18 * @return the runtime enviroment
19 * @throws DatabaseException
21 public EnvironmentSpecification getRuntimeEnvironmentSpecification(ReadGraph graph, Resource componentType) throws DatabaseException;
24 * Return a local environment for this script if one is needed
27 * @param componentType
28 * @return the local environment or null
29 * @throws DatabaseException
31 public LocalEnvironment getLocalEnvironment(ReadGraph graph, Resource componentType) throws DatabaseException;
34 * Get the set of all modules the local environment returned by getLocalEnvironment reads from
37 * @return a set of module names or null
39 public Set<String> getModuleReads(LocalEnvironment environment);
42 * Get the set of all modules the local environment returned by getLocalEnvironment writes to
45 * @return a set of module names or null
47 public Set<String> getModuleWrites(LocalEnvironment environment);