Class TransformerLog

  • All Implemented Interfaces:
    org.apache.commons.logging.Log

    @Deprecated
    @AlfrescoPublicApi
    public class TransformerLog
    extends org.alfresco.util.LogAdapter
    Deprecated.
    The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
    Implementation of a Log that logs messages to a structure accessible via TransformerConfigMBean.getTransformationLog(int).

    Author:
    Alan Davis
    • Field Summary

      • Fields inherited from class org.alfresco.util.LogAdapter

        log
    • Constructor Summary

      Constructors 
      Constructor Description
      TransformerLog()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void addOrModify​(java.util.Deque<java.lang.String> entries, java.lang.Object message)
      Deprecated.
      Overridden in sub classes to add a new entry or modify and existing one
      void debug​(java.lang.Object message, java.lang.Throwable throwable)
      Deprecated.
       
      java.lang.String[] getEntries​(int n)
      Deprecated.
      Returns the log entries.
      java.lang.String getPropertyAndValue​(java.util.Properties defaultProperties)
      Deprecated.
      The transformer property and value used to set this logger.
      protected java.lang.String getPropertyName()
      Deprecated.
      Overridden to specify the property name that specifies the maximum number of entries.
      protected int getUpperMaxEntries()
      Deprecated.
      Overridden to specify the maximum value the maxEntries property may set.
      boolean isDebugEnabled()
      Deprecated.
      Enabled if number of transformer debug entries is greater than 0 AND there is not a test function generating output.
      protected void remove​(java.util.Deque<T> entries)
      Deprecated.
      Removes an entry.
      void setTransformerConfig​(TransformerConfig transformerConfig)
      Deprecated.
       
      void setTransformerDebug​(TransformerDebug transformerDebug)
      Deprecated.
       
      • Methods inherited from class org.alfresco.util.LogAdapter

        debug, error, error, fatal, fatal, info, info, isErrorEnabled, isFatalEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, trace, warn, warn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.commons.logging.Log

        debug, error, error, fatal, fatal, info, info, isErrorEnabled, isFatalEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, trace, warn, warn
    • Constructor Detail

      • TransformerLog

        public TransformerLog()
        Deprecated.
    • Method Detail

      • getUpperMaxEntries

        protected int getUpperMaxEntries()
        Deprecated.
        Overridden to specify the maximum value the maxEntries property may set. Generally quite a small number as values are stored in memory.

        Returns 100 as this is currently held in memory.

      • getPropertyName

        protected java.lang.String getPropertyName()
        Deprecated.
        Overridden to specify the property name that specifies the maximum number of entries.
      • addOrModify

        protected void addOrModify​(java.util.Deque<java.lang.String> entries,
                                   java.lang.Object message)
        Deprecated.
        Overridden in sub classes to add a new entry or modify and existing one
      • setTransformerDebug

        public void setTransformerDebug​(TransformerDebug transformerDebug)
        Deprecated.
      • setTransformerConfig

        public void setTransformerConfig​(TransformerConfig transformerConfig)
        Deprecated.
        Parameters:
        transformerConfig - used to access the property.
      • isDebugEnabled

        public boolean isDebugEnabled()
        Deprecated.
        Enabled if number of transformer debug entries is greater than 0 AND there is not a test function generating output.
        Specified by:
        isDebugEnabled in interface org.apache.commons.logging.Log
        Overrides:
        isDebugEnabled in class org.alfresco.util.LogAdapter
      • debug

        public void debug​(java.lang.Object message,
                          java.lang.Throwable throwable)
        Deprecated.
        Specified by:
        debug in interface org.apache.commons.logging.Log
        Overrides:
        debug in class org.alfresco.util.LogAdapter
        Parameters:
        message - to be appended to the log
        throwable - ignored
      • remove

        protected void remove​(java.util.Deque<T> entries)
        Deprecated.
        Removes an entry. By default removes the first (oldest) entry by may be overridden.
      • getEntries

        public java.lang.String[] getEntries​(int n)
        Deprecated.
        Returns the log entries.
        Parameters:
        n - the maximum number of entries to return. All if n is smaller or equal to zero.
      • getPropertyAndValue

        public java.lang.String getPropertyAndValue​(java.util.Properties defaultProperties)
        Deprecated.
        The transformer property and value used to set this logger. This is commented out if the property has not been overridden (default is 0).
        Parameters:
        defaultProperties - the transformer.properties file values that may be overridden.
        Returns:
        the transformer property and value.