Class Highlighter

java.lang.Object
org.bgerp.app.servlet.file.Highlighter

public class Highlighter extends Object
File name highlighter using CSS class
  • Field Details

    • LOG_WARN

      public static Highlighter LOG_WARN
      Highlighter for warning log files, which are expected to be empty
    • LOG_UPDATE_EXCEPTION

      public static Highlighter LOG_UPDATE_EXCEPTION
      Highlighter for update log files with errors
  • Method Details

    • match

      public boolean match(File file)
      Does a file name match to the highlighter
      Parameters:
      file - the file name
      Returns:
      does the file match
    • highlight

      public String highlight(File file) throws FileNotFoundException
      CSS class to highlight a file
      Parameters:
      file - the file
      Returns:
      the class name or null
      Throws:
      FileNotFoundException - if the file does not exist
    • hasError

      protected boolean hasError(String line)
      Detect errors in a file line
      Parameters:
      line - the line
      Returns:
      does the line contain an error