Class AbstractChecker

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static Channel CHANNEL  
      protected static org.apache.commons.io.filefilter.SuffixFileFilter PROP_SUFFIX_FILE_FILTER  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractChecker()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static CheckedFile getCheckedFile​(java.io.File webappDir, java.io.File file)  
      protected static java.util.List<java.io.File> getFileList​(java.io.File webappDir, java.lang.String extension)  
      protected static java.util.List<java.io.File> getFileList​(java.io.File webappDir, java.lang.String extension, java.util.List<java.util.regex.Pattern> ignoreFilePatterns, java.util.List<java.lang.String> ignoredDirectories)  
      static LangProperties loadLanguageProperties​(java.io.File webappDir)  
      static LangProperties loadProperties​(java.io.File webappDir)
      Loads all plugins' plugin.prop, custom.prop, and jcms.prop.
      static LangProperties loadProperties​(java.io.File webappDir, org.apache.commons.io.filefilter.IOFileFilter fileFilter)
      Loads all plugins' plugin.prop, custom.prop, and jcms.prop, filtering on given fileFilter.
      Only accept *.prop file.
      protected static void saveError​(CheckResult result, java.lang.String msg, org.apache.log4j.Logger logger)
      Logs the msg as warning Level, and append it to the global CheckResult object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CHANNEL

        protected static final Channel CHANNEL
      • PROP_SUFFIX_FILE_FILTER

        protected static final org.apache.commons.io.filefilter.SuffixFileFilter PROP_SUFFIX_FILE_FILTER
    • Constructor Detail

      • AbstractChecker

        public AbstractChecker()
    • Method Detail

      • saveError

        protected static void saveError​(CheckResult result,
                                        java.lang.String msg,
                                        org.apache.log4j.Logger logger)
        Logs the msg as warning Level, and append it to the global CheckResult object.
        Parameters:
        result - the global check result.
        msg - the error description
        logger - the logger to use for warning
        Since:
        jcms-8.0.3, jcms-9.0.0
      • loadProperties

        public static LangProperties loadProperties​(java.io.File webappDir)
                                             throws java.io.IOException
        Loads all plugins' plugin.prop, custom.prop, and jcms.prop.
        Parameters:
        webappDir - the webapp dir to load properties from.
        Returns:
        loaded properties
        Throws:
        java.io.IOException - if an exception occurs while loading properties
      • loadProperties

        public static LangProperties loadProperties​(java.io.File webappDir,
                                                    org.apache.commons.io.filefilter.IOFileFilter fileFilter)
                                             throws java.io.IOException
        Loads all plugins' plugin.prop, custom.prop, and jcms.prop, filtering on given fileFilter.
        Only accept *.prop file.
        Parameters:
        webappDir - the webapp dir to load properties from.
        fileFilter - an optional user FileFilter to escape property file(s) (add is not possible since we use a AndFileFilter computation)
        Returns:
        loaded properties
        Throws:
        java.io.IOException - if an exception occurs while loading properties
      • loadLanguageProperties

        public static LangProperties loadLanguageProperties​(java.io.File webappDir)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getCheckedFile

        protected static CheckedFile getCheckedFile​(java.io.File webappDir,
                                                    java.io.File file)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • getFileList

        protected static java.util.List<java.io.File> getFileList​(java.io.File webappDir,
                                                                  java.lang.String extension)
      • getFileList

        protected static java.util.List<java.io.File> getFileList​(java.io.File webappDir,
                                                                  java.lang.String extension,
                                                                  java.util.List<java.util.regex.Pattern> ignoreFilePatterns,
                                                                  java.util.List<java.lang.String> ignoredDirectories)