org.jwall.web.audit
Class DefaultAuditEventFactory

java.lang.Object
  extended by org.jwall.web.audit.DefaultAuditEventFactory
All Implemented Interfaces:
AuditEventFactory

public class DefaultAuditEventFactory
extends Object
implements AuditEventFactory

This is the default implementation of the event factory. It will not provide any recycling or memory optimization, but simply create events in the way they have been created before.

Author:
Christian Bockermann <chris@jwall.org>

Field Summary
 
Fields inherited from interface org.jwall.web.audit.AuditEventFactory
AUDIT_EVENT_FACTORY_CLASS
 
Constructor Summary
DefaultAuditEventFactory()
          The private constructor for this class.
 
Method Summary
static void addValue(Map<String,List<String>> cols, String col, String value)
           
 AuditEvent createAuditEvent(String[] sectionData, AuditEventType type)
          Creates a new audit-event instance from the given section strings.
 AuditEvent createAuditEvent(String id, String[] data, File inputFile, long offset, long size, AuditEventType type)
           
static Long getEventCount()
           
static AuditEventFactory getInstance()
          This method will return the shared instance of this factory.
static Map<String,List<String>> parseAuditTrailer(Map<String,List<String>> cols, String trailer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuditEventFactory

public DefaultAuditEventFactory()
The private constructor for this class. There should only be one instance of this class available.

Method Detail

getInstance

public static AuditEventFactory getInstance()
This method will return the shared instance of this factory.

Returns:
The shared factory instance.

createAuditEvent

public AuditEvent createAuditEvent(String[] sectionData,
                                   AuditEventType type)
                            throws ParseException
Description copied from interface: AuditEventFactory
Creates a new audit-event instance from the given section strings. The string correspond to the sections found within an audit-log file.

Specified by:
createAuditEvent in interface AuditEventFactory
Parameters:
sectionData - The data strings of the sections.
Returns:
An instance corresponding to the given sections.
Throws:
ParseException
See Also:
org.jwall.web.audit.AuditEventFactory#createAuditEvent(java.lang.String[])

createAuditEvent

public AuditEvent createAuditEvent(String id,
                                   String[] data,
                                   File inputFile,
                                   long offset,
                                   long size,
                                   AuditEventType type)
                            throws ParseException
Specified by:
createAuditEvent in interface AuditEventFactory
Throws:
ParseException

parseAuditTrailer

public static Map<String,List<String>> parseAuditTrailer(Map<String,List<String>> cols,
                                                         String trailer)
                                                  throws ParseException
Throws:
ParseException

addValue

public static void addValue(Map<String,List<String>> cols,
                            String col,
                            String value)

getEventCount

public static Long getEventCount()


Copyright © 2012 jwall.org. All Rights Reserved.