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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfindScripts(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.voidsetUrlVariablePlaceholderPattern(String urlVariablePlaceholderPattern)
-
Field Details
-
DEFAULT_URL_VARIABLE_PLACEHOLDER_PATTERN
- See Also:
-
urlVariablePlaceholderPattern
-
scriptsFolder
-
-
Constructor Details
-
ScriptUrlTemplateScannerImpl
-
-
Method Details
-
setUrlVariablePlaceholderPattern
-
scan
Description copied from interface:ScriptUrlTemplateScannerScans the site context at a certain path to discover script URL templates.- Specified by:
scanin 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)
-