org.jwall.web.audit.io
Class AuditEventParser
java.lang.Object
org.jwall.web.audit.io.AuditEventParser
public class AuditEventParser
- extends Object
|
Method Summary |
static void |
addValue(Map<String,List<String>> cols,
String col,
String value)
|
static Map<String,List<String>> |
parseAuditLogHeader(Map<String,List<String>> collections,
String auditLogHeader)
|
static Map<String,List<String>> |
parseAuditTrailer(Map<String,List<String>> cols,
String trailer)
|
static Date |
parseDate(String s)
|
static Map<String,List<String>> |
parseHttpHeader(Map<String,List<String>> cols,
String header)
This method will read a header section of a ModSecurity event and parse all the http headers. |
static Map<String,String> |
parseMetaInfSection(Map<String,List<String>> collections,
String metaInfSection)
|
static void |
parseParameters(Map<String,List<String>> cols,
String selector,
String qs)
This method parses all parameters (get and post) and fills the appopriate
hashes. |
static Map<String,String> |
readMetaInf(String metaInfSection)
|
static void |
setValue(Map<String,List<String>> cols,
String key,
String value)
|
static String |
storeMetaInf(Map<String,String> data)
|
DATE_FORMAT
public static final SimpleDateFormat DATE_FORMAT
- the format in which the date is printed out
AuditEventParser
public AuditEventParser()
parseHttpHeader
public static Map<String,List<String>> parseHttpHeader(Map<String,List<String>> cols,
String header)
throws ParseException
- This method will read a header section of a ModSecurity event and parse all the http headers.
Depending on the format of the first line, the method will determine whether the header data
is a request or response header and appropriately insert the resulting headers into either
the
REQUEST_HEADERS or the RESPONSE_HEADERS collection.
- Parameters:
cols - The collection mapping which will be filled during the parsing process.header - The data which actually contains the request-/response-header.
- Returns:
- The method will simply return the collection mapping for convenience purposes.
- Throws:
ParseException - In case the header could not be parsed correctly an appropriate
ParseException will be thrown.
parseParameters
public static void parseParameters(Map<String,List<String>> cols,
String selector,
String qs)
- This method parses all parameters (get and post) and fills the appopriate
hashes. It does not implicitly apply any codec (URLdeocde, etc) !!
parseAuditTrailer
public static Map<String,List<String>> parseAuditTrailer(Map<String,List<String>> cols,
String trailer)
throws ParseException
- Parameters:
cols - trailer -
- Returns:
-
- Throws:
ParseException
addValue
public static void addValue(Map<String,List<String>> cols,
String col,
String value)
setValue
public static void setValue(Map<String,List<String>> cols,
String key,
String value)
parseDate
public static Date parseDate(String s)
parseAuditLogHeader
public static Map<String,List<String>> parseAuditLogHeader(Map<String,List<String>> collections,
String auditLogHeader)
throws ParseException
- Parameters:
collections - auditLogHeader -
- Returns:
-
- Throws:
ParseException
parseMetaInfSection
public static Map<String,String> parseMetaInfSection(Map<String,List<String>> collections,
String metaInfSection)
throws ParseException
- Throws:
ParseException
readMetaInf
public static Map<String,String> readMetaInf(String metaInfSection)
throws ParseException
- Throws:
ParseException
storeMetaInf
public static String storeMetaInf(Map<String,String> data)
Copyright © 2012 jwall.org. All Rights Reserved.