/** * Merge script generated model into template-ready model * * @param scriptContent script content * @param scriptModel script model * @param templateModel template model */ final private void mergeScriptModelIntoTemplateModel(ScriptContent scriptContent, Map<String, Object> scriptModel, Map<String, Object> templateModel) { // determine script processor ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(scriptContent); if (scriptProcessor != null) { for (Map.Entry<String, Object> entry : scriptModel.entrySet()) { // retrieve script model value Object value = entry.getValue(); Object templateValue = scriptProcessor.unwrapValue(value); templateModel.put(entry.getKey(), templateValue); } } }
/** * Merge script generated model into template-ready model * * @param scriptContent script content * @param scriptModel script model * @param templateModel template model */ final private void mergeScriptModelIntoTemplateModel(ScriptContent scriptContent, Map<String, Object> scriptModel, Map<String, Object> templateModel) { // determine script processor ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(scriptContent); if (scriptProcessor != null) { for (Map.Entry<String, Object> entry : scriptModel.entrySet()) { // retrieve script model value Object value = entry.getValue(); Object templateValue = scriptProcessor.unwrapValue(value); templateModel.put(entry.getKey(), templateValue); } } }
/** * Merge script generated model into template-ready model * * @param scriptContent script content * @param scriptModel script model * @param templateModel template model */ final private void mergeScriptModelIntoTemplateModel(ScriptContent scriptContent, Map<String, Object> scriptModel, Map<String, Object> templateModel) { // determine script processor ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(scriptContent); if (scriptProcessor != null) { for (Map.Entry<String, Object> entry : scriptModel.entrySet()) { // retrieve script model value Object value = entry.getValue(); Object templateValue = scriptProcessor.unwrapValue(value); templateModel.put(entry.getKey(), templateValue); } } }
if (debug) start = System.nanoTime(); ScriptProcessor scriptProcessor = container.getScriptProcessorRegistry().getScriptProcessor(location); scriptProcessor.executeScript(location, model); String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(moduleScriptPath); if (validScriptPath != null) scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); ScriptContent scriptContent = scriptProcessor.findScript(validScriptPath); scriptProcessor.executeScript(scriptContent, model);
if (debug) start = System.nanoTime(); ScriptProcessor scriptProcessor = container.getScriptProcessorRegistry().getScriptProcessor(location); scriptProcessor.executeScript(location, model); String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(moduleScriptPath); if (validScriptPath != null) scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); ScriptContent scriptContent = scriptProcessor.findScript(validScriptPath); scriptProcessor.executeScript(scriptContent, model);
if (debug) start = System.nanoTime(); ScriptProcessor scriptProcessor = container.getScriptProcessorRegistry().getScriptProcessor(location); scriptProcessor.executeScript(location, model); String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(moduleScriptPath); if (validScriptPath != null) scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); ScriptContent scriptContent = scriptProcessor.findScript(validScriptPath); scriptProcessor.executeScript(scriptContent, model);
if (format != null) String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(basePath + "." + format); if (validScriptPath != null) ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); scriptContent = scriptProcessor.findScript(validScriptPath); break; String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(basePath); if (validScriptPath != null) ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); scriptContent = scriptProcessor.findScript(validScriptPath);
if (format != null) String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(basePath + "." + format); if (validScriptPath != null) ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); scriptContent = scriptProcessor.findScript(validScriptPath); break; String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(basePath); if (validScriptPath != null) ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); scriptContent = scriptProcessor.findScript(validScriptPath);
if (format != null) String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(basePath + "." + format); if (validScriptPath != null) ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); scriptContent = scriptProcessor.findScript(validScriptPath); break; String validScriptPath = getContainer().getScriptProcessorRegistry().findValidScriptPath(basePath); if (validScriptPath != null) ScriptProcessor scriptProcessor = getContainer().getScriptProcessorRegistry().getScriptProcessor(validScriptPath); scriptContent = scriptProcessor.findScript(validScriptPath);