Class CmsModuleLog


  • public class CmsModuleLog
    extends java.lang.Object
    This class is responsible for reading and writing module import/export log messages, to be used by CmsResourceWrapperModules.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CmsModuleLog.Action
      Action type.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DATE_FORMAT_STRING
      Date format for log messages.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsModuleLog()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File getLogFile​(java.lang.String moduleName)
      Gets the log file for the given module name.
      void log​(java.lang.String moduleName, CmsModuleLog.Action action, boolean ok)
      Logs a module action.
      byte[] readLog​(java.lang.String moduleName)
      Reads the log file and returns the data.
      • Methods inherited from class java.lang.Object

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

      • getLogFile

        public java.io.File getLogFile​(java.lang.String moduleName)
        Gets the log file for the given module name.

        Parameters:
        moduleName - the module
        Returns:
        the log file
      • log

        public void log​(java.lang.String moduleName,
                        CmsModuleLog.Action action,
                        boolean ok)
        Logs a module action.

        Parameters:
        moduleName - the module name
        action - the action
        ok - true if the action was successful
      • readLog

        public byte[] readLog​(java.lang.String moduleName)
                       throws java.io.IOException
        Reads the log file and returns the data.

        Parameters:
        moduleName - the module name
        Returns:
        the log contents
        Throws:
        java.io.IOException - if something goes wrong