Class ModulePresentUtil

java.lang.Object
org.broadleafcommerce.common.module.ModulePresentUtil

public class ModulePresentUtil extends Object

Utility class that checks for the presence of registered Broadleaf modules.

Author:
Nathan Moore (nathanmoore)., Phillip Verheyden (phillipuniverse), Philip Baggett (pbaggett)
  • Field Details

  • Constructor Details

    • ModulePresentUtil

      public ModulePresentUtil()
  • Method Details

    • isPresent

      public static boolean isPresent(@Nonnull BroadleafModuleRegistration.BroadleafModuleEnum moduleInQuestion)
      Checks if the given module is registered
      Parameters:
      moduleInQuestion - the module that should be checked
      Returns:
      whether the module in question has registered itself at runtime
    • allPresent

      public static boolean allPresent(@Nonnull List<String> modulesInQuestion)
      Checks that every module in the list is registered.
      Parameters:
      modulesInQuestion - list of modules that should be checked
      Returns:
      true if all modules in the list are present, false otherwise
      See Also:
    • isPresent

      public static boolean isPresent(@Nonnull String moduleInQuestion)
      This version takes a String instead of a BroadleafModuleRegistration.BroadleafModuleEnum but operates in the same way by checking to see if a particular Broadleaf module has registered itself
      Parameters:
      moduleInQuestion - a String that maps to ModuleLifecycleLoggingBean.getModuleName()