/** * Returns the best fit script processor for the given script * content object. * * If a script processor cannot be matched, the default * script processor will be returned. * * @param path the path * * @return the script processor */ public ScriptProcessor getScriptProcessor(ScriptContent scriptContent) { return getScriptProcessor(scriptContent.getPath()); }
/** * Registers a script processor * * @param scriptProcessor the script processor to register */ public void registerScriptProcessor(ScriptProcessor scriptProcessor) { registerScriptProcessor(scriptProcessor, null, null); }
/** * Resets the templates container */ public void reset() { this.scriptProcessorRegistry.reset(); this.templateProcessorRegistry.reset(); } }
/** * Gets the extension for given processor. * * @param scriptProcessor the script processor * * @return the extension for processor */ public String getExtensionForProcessor(ScriptProcessor scriptProcessor) { String ext = null; final String[] extensions = this.getRegisteredExtensions(); for (int n=0; n<extensions.length; n++) { final String extension = extensions[n]; ScriptProcessor processor = getScriptProcessorByExtension(extension); if (processor == scriptProcessor) { ext = extension; break; } } return ext; }
/** * Returns the script processor that matches the file * extension for the given path. * * If a script processor cannot be matched to the path, the default * script processor will be returned. * * @param path the path * * @return the script processor */ public ScriptProcessor getScriptProcessor(String path) { ScriptProcessor processor = null; int i = path.lastIndexOf('.'); if (i != -1) { String extension = path.substring(i + 1); processor = getScriptProcessorByExtension(extension); } if (processor == null) { processor = getDefaultScriptProcessor(); } return processor; }
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);
validScriptPath = getScriptProcessorRegistry().findValidScriptPath(uri); if (validScriptPath != null)
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);
/** * Gets the extension for given processor. * * @param scriptProcessor the script processor * * @return the extension for processor */ public String getExtensionForProcessor(ScriptProcessor scriptProcessor) { String ext = null; final String[] extensions = this.getRegisteredExtensions(); for (int n=0; n<extensions.length; n++) { final String extension = extensions[n]; ScriptProcessor processor = getScriptProcessorByExtension(extension); if (processor == scriptProcessor) { ext = extension; break; } } return ext; }
/** * Returns the script processor that matches the file * extension for the given path. * * If a script processor cannot be matched to the path, the default * script processor will be returned. * * @param path the path * * @return the script processor */ public ScriptProcessor getScriptProcessor(String path) { ScriptProcessor processor = null; int i = path.lastIndexOf('.'); if (i != -1) { String extension = path.substring(i + 1); processor = getScriptProcessorByExtension(extension); } if (processor == null) { processor = getDefaultScriptProcessor(); } return processor; }
validScriptPath = getScriptProcessorRegistry().findValidScriptPath(uri); if (validScriptPath != null)
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);
/** * Registers a script processor * * @param scriptProcessor the script processor to register */ public void registerScriptProcessor(ScriptProcessor scriptProcessor) { registerScriptProcessor(scriptProcessor, null, null); }
/** * Returns the best fit script processor for the given script * content object. * * If a script processor cannot be matched, the default * script processor will be returned. * * @param scriptContent ScriptContent * * @return the script processor */ public ScriptProcessor getScriptProcessor(ScriptContent scriptContent) { return getScriptProcessor(scriptContent.getPath()); }
/** * Resets the templates container */ public void reset() { this.scriptProcessorRegistry.reset(); this.templateProcessorRegistry.reset(); } }
/** * Gets the extension for given processor. * * @param scriptProcessor the script processor * * @return the extension for processor */ public String getExtensionForProcessor(ScriptProcessor scriptProcessor) { String ext = null; final String[] extensions = this.getRegisteredExtensions(); for (int n=0; n<extensions.length; n++) { final String extension = extensions[n]; ScriptProcessor processor = getScriptProcessorByExtension(extension); if (processor == scriptProcessor) { ext = extension; break; } } return ext; }
/** * Returns the script processor that matches the file * extension for the given path. * * If a script processor cannot be matched to the path, the default * script processor will be returned. * * @param path the path * * @return the script processor */ public ScriptProcessor getScriptProcessor(String path) { ScriptProcessor processor = null; int i = path.lastIndexOf('.'); if (i != -1) { String extension = path.substring(i + 1); processor = getScriptProcessorByExtension(extension); } if (processor == null) { processor = getDefaultScriptProcessor(); } return processor; }
String validExtScriptPath = getScriptProcessorRegistry().findValidScriptPath(moduleScriptPath); if (validExtScriptPath != null) ScriptProcessor scriptProcessor = getScriptProcessorRegistry().getScriptProcessor(validExtScriptPath); ScriptContent scriptContent = scriptProcessor.findScript(validExtScriptPath);
/** * Registers a script processor * * @param scriptProcessor the script processor to register */ public void registerScriptProcessor(ScriptProcessor scriptProcessor) { registerScriptProcessor(scriptProcessor, null, null); }
/** * Returns the best fit script processor for the given script * content object. * * If a script processor cannot be matched, the default * script processor will be returned. * * @param scriptContent ScriptContent * * @return the script processor */ public ScriptProcessor getScriptProcessor(ScriptContent scriptContent) { return getScriptProcessor(scriptContent.getPath()); }