Class LogEntry

  • All Implemented Interfaces:
    java.lang.Comparable<LogEntry>
    Direct Known Subclasses:
    InnerLogEntry, StorableLogEntry

    public abstract class LogEntry
    extends java.lang.Object
    implements java.lang.Comparable<LogEntry>
    This abstract class represents a Store operation.
    Version:
    $Revision: 28011 $
    Author:
    Olivier Dedieu
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REVISION  
    • Constructor Summary

      Constructors 
      Constructor Description
      LogEntry​(LogEntry entry)
      Creates a new LogEntry by cloning
      LogEntry​(java.lang.String elementName, java.util.Map<java.lang.String,​java.lang.String> attributes)
      Creates a new LogEntry
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(LogEntry logEntry)  
      boolean equals​(java.lang.Object other)  
      java.util.Map<java.lang.String,​java.lang.String> getAttributes()
      Returns the attributes of this LogEntry
      java.lang.Exception getException()
      Get the value of exception.
      int getLineNumber()
      Gets the value of lineNumber.
      java.lang.String getName()
      Returns the name of the element of this LogEntry
      java.util.Map<java.lang.String,​java.lang.String> getSortedAttributeMap()
      Returns the attribute map sorted according natural ordering of String.
      Stamp getStamp()
      Returns the stamp of this LogEntry
      protected java.lang.String openXMLElement()  
      void setAttributes​(java.util.Map<java.lang.String,​java.lang.String> attributes)
      Sets the attribute map
      void setException​(java.lang.Exception v)
      Sets the value of exception.
      void setLineNumber​(int v)
      Sets the value of lineNumber.
      void setStamp​(Stamp stamp)
      Sets the stamp of this LogEntry
      java.lang.String toString()  
      java.lang.String toXML()
      Returns an XML representation of this LogEntry
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LogEntry

        public LogEntry​(java.lang.String elementName,
                        java.util.Map<java.lang.String,​java.lang.String> attributes)
        Creates a new LogEntry
        Parameters:
        elementName - the name of the element
        attributes - targe attributes of the entry
      • LogEntry

        public LogEntry​(LogEntry entry)
        Creates a new LogEntry by cloning
        Parameters:
        entry - the LogEntry to clone
    • Method Detail

      • setStamp

        public void setStamp​(Stamp stamp)
        Sets the stamp of this LogEntry
        Parameters:
        stamp - the stamp
      • getStamp

        public Stamp getStamp()
        Returns the stamp of this LogEntry
        Returns:
        the stamp
      • getName

        public java.lang.String getName()
        Returns the name of the element of this LogEntry
        Returns:
        the name of the element
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getAttributes()
        Returns the attributes of this LogEntry
        Returns:
        the attributes
      • setAttributes

        public void setAttributes​(java.util.Map<java.lang.String,​java.lang.String> attributes)
        Sets the attribute map
        Parameters:
        attributes -
        Since:
        jcms-5.5.0
      • getLineNumber

        public int getLineNumber()
        Gets the value of lineNumber.
        Returns:
        Value of lineNumber.
      • setLineNumber

        public void setLineNumber​(int v)
        Sets the value of lineNumber.
        Parameters:
        v - Value to assign to lineNumber.
      • getException

        public java.lang.Exception getException()
        Get the value of exception.
        Returns:
        Value of exception.
      • setException

        public void setException​(java.lang.Exception v)
        Sets the value of exception.
        Parameters:
        v - Value to assign to exception.
      • getSortedAttributeMap

        public java.util.Map<java.lang.String,​java.lang.String> getSortedAttributeMap()
        Returns the attribute map sorted according natural ordering of String. This method is called by toXML when writing the logEntry
        Returns:
        a sorted map
        Since:
        jcms-4.1
      • toXML

        public java.lang.String toXML()
        Returns an XML representation of this LogEntry
        Returns:
        a String containing the XML representation
        Since:
        jcms-4.1
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • openXMLElement

        protected java.lang.String openXMLElement()
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • compareTo

        public int compareTo​(LogEntry logEntry)
        Specified by:
        compareTo in interface java.lang.Comparable<LogEntry>