Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.repo.content.transform
Class TransformerLog
java.lang.Object
  org.alfresco.util.LogAdapter
      org.alfresco.repo.content.transform.TransformerLog
All Implemented Interfaces:
org.apache.commons.logging.Log

public class TransformerLog
extends LogAdapter
implements org.apache.commons.logging.Log
Implementation of a org.apache.commons.logging.Log that logs messages to a structure accessible via TransformerConfigMBean.getTransformationLog(int).

Author:
Alan Davis

Fields inherited from class org.alfresco.util.LogAdapter
log
Constructor Summary
TransformerLog()
Method Summary
protected void
addOrModify(Deque<String> entries, Object message)
          Overridden in sub classes to add a new entry or modify and existing one
void
debug(Object message, Throwable throwable)
getEntries(int n)
          Returns the log entries.
getPropertyAndValue(Properties defaultProperties)
          The transformer property and value used to set this logger.
protected String
getPropertyName()
          Overridden to specify the property name that specifies the maximum number of entries.
protected int
getUpperMaxEntries()
          Overridden to specify the maximum value the maxEntries property may set.
boolean
isDebugEnabled()
          Enabled if number of transformer debug entries is greater than 0 AND there is not a test function generating output.
protected void
remove(Deque<String> entries)
          Removes an entry.
void
setTransformerConfig(TransformerConfig transformerConfig)
void
setTransformerDebug(TransformerDebug transformerDebug)
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
Constructor Detail
TransformerLog
public TransformerLog()
Method Detail
getUpperMaxEntries
protected int getUpperMaxEntries()
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 String getPropertyName()
Overridden to specify the property name that specifies the maximum number of entries.

addOrModify
protected void addOrModify(Deque<String> entries,
                           Object message)
Overridden in sub classes to add a new entry or modify and existing one

setTransformerDebug
public void setTransformerDebug(TransformerDebug transformerDebug)

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

isDebugEnabled
public boolean isDebugEnabled()
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 LogAdapter

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

remove
protected void remove(Deque<String> entries)
Removes an entry. By default removes the first (oldest) entry by may be overridden.

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

getPropertyAndValue
public String getPropertyAndValue(Properties defaultProperties)
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.

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2016 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.