Class ScriptUrlTemplateScannerImpl
java.lang.Object
org.craftercms.engine.scripting.impl.ScriptUrlTemplateScannerImpl
- All Implemented Interfaces:
ScriptUrlTemplateScanner
Default implementation of
ScriptUrlTemplateScanner
, which retrieves all the Groovy scripts at the
specified scriptsFolder
path, and then looks for those that have the URL variable placeholder in them.- Author:
- avasquez
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
findScripts
(org.craftercms.core.service.Context context, org.craftercms.core.service.ContentStoreService storeService, ScriptFactory scriptFactory, String folder, List<String> scriptUrls) List<org.springframework.web.util.UriTemplate>
scan
(SiteContext siteContext) Scans the site context at a certain path to discover script URL templates.void
setScriptsFolder
(String scriptsFolder) void
setUrlVariablePlaceholderPattern
(String urlVariablePlaceholderPattern)
-
Field Details
-
DEFAULT_URL_VARIABLE_PLACEHOLDER_PATTERN
- See Also:
-
urlVariablePlaceholderPattern
-
scriptsFolder
-
-
Constructor Details
-
ScriptUrlTemplateScannerImpl
public ScriptUrlTemplateScannerImpl()
-
-
Method Details
-
setUrlVariablePlaceholderPattern
-
setScriptsFolder
-
scan
Description copied from interface:ScriptUrlTemplateScanner
Scans the site context at a certain path to discover script URL templates.- Specified by:
scan
in interfaceScriptUrlTemplateScanner
- Parameters:
siteContext
- the site context to scan- Returns:
- the list of URL templates
-
findScripts
public void findScripts(org.craftercms.core.service.Context context, org.craftercms.core.service.ContentStoreService storeService, ScriptFactory scriptFactory, String folder, List<String> scriptUrls)
-