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

public class AppModuleCollectStrategy extends AbstractCollectStrategy
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 Details

    • AppModuleCollectStrategy

      public AppModuleCollectStrategy(TextResources textResources, L10N l10n, org.slf4j.Logger log, ModuleManager moduleManager)
  • Method Details

    • setModuleName

      public void setModuleName(String moduleName)
      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

      public void setRootPath(String rootPath)
      Sets the path of the root directory to scan.
      Parameters:
      rootPath - the path of the root directory.
    • collectTemplates

      public Map<String,CmsTemplate> collectTemplates(Predicate<CmsTemplate> predicate)
      Description copied from interface: CollectStrategy
      Collect the templates.
      Parameters:
      predicate - A predicate for filtering the templates.
      Returns:
      the collected templates.