Class AppModuleCollectStrategy
java.lang.Object
ch.tocco.nice2.optional.cms.impl.template.sync.collect.strategy.AbstractCollectStrategy
ch.tocco.nice2.optional.cms.impl.template.sync.collect.strategy.AppModuleCollectStrategy
- All Implemented Interfaces:
CollectStrategy
This collect strategy collects the templates from all app modules (from a specific path in VFS).
If a single module name is set (
setModuleName(String)
, then only the templates from this module are
collected.-
Constructor Summary
ConstructorDescriptionAppModuleCollectStrategy
(TextResources textResources, L10N l10n, org.slf4j.Logger log, ModuleManager moduleManager) -
Method Summary
Modifier and TypeMethodDescriptioncollectTemplates
(Predicate<CmsTemplate> predicate) Collect the templates.void
setModuleName
(String moduleName) If module name is not null, only the templates of this module are collected.void
setRootPath
(String rootPath) Sets the path of the root directory to scan.Methods inherited from class ch.tocco.nice2.optional.cms.impl.template.sync.collect.strategy.AbstractCollectStrategy
collectRecursive, createCmsTemplate, getTemplateContent, getTemplateLabelKey, getTemplateModel, getUniqueId, isCmsTemplateResource, isHidden, setLabel
-
Constructor Details
-
AppModuleCollectStrategy
public AppModuleCollectStrategy(TextResources textResources, L10N l10n, org.slf4j.Logger log, ModuleManager moduleManager)
-
-
Method Details
-
setModuleName
If module name is not null, only the templates of this module are collected. Otherwise all modules are visited.- Parameters:
moduleName
- The name of module to scan.
-
setRootPath
Sets the path of the root directory to scan.- Parameters:
rootPath
- the path of the root directory.
-
collectTemplates
Description copied from interface:CollectStrategy
Collect the templates.- Parameters:
predicate
- A predicate for filtering the templates.- Returns:
- the collected templates.
-