/** * Builds {@link ExecutionContext#getExtensions() extensions} for the script. * @param context the current context * @param script the target script * @return the extended arguments */ public static Map<String, Blob> getExtensions(ExecutionContext context, ExecutionScript script) { Map<String, Blob> results = new LinkedHashMap<>(); Map<String, Blob> extensions = context.getExtensions(); Set<String> supported = script.getSupportedExtensions(); for (Map.Entry<String, Blob> entry : extensions.entrySet()) { if (supported.contains(entry.getKey())) { results.put(entry.getKey(), entry.getValue()); } } return results; }
properties.setProperty(scriptPrefix + KEY_KIND, script.getKind().getSymbol()); properties.setProperty(scriptPrefix + KEY_BLOCKERS, join(script.getBlockerIds())); properties.setProperty(scriptPrefix + KEY_SUPPORTED_EXTENSIONS, join(script.getSupportedExtensions())); String envPrefix = scriptPrefix + KEY_ENV_PREFIX; for (Map.Entry<String, String> entry : script.getEnvironmentVariables().entrySet()) {