public class CEFParser extends Object
| Constructor and Description |
|---|
CEFParser()
Creates a CEFParser instance utilizing the default Bean Validator.
|
CEFParser(javax.validation.Validator validator)
Creates a CEFParser instance utilizing thread-safe Beans Validator.
|
| Modifier and Type | Method and Description |
|---|---|
CommonEvent |
parse(byte[] cefByteArray) |
CommonEvent |
parse(byte[] cefByteArray,
boolean validate) |
CommonEvent |
parse(byte[] cefByteArray,
boolean validate,
boolean allowNulls,
Locale locale) |
CommonEvent |
parse(byte[] cefByteArray,
boolean validate,
Locale locale) |
CommonEvent |
parse(String cefString)
Converts a CEF formatted String into a
CommonEvent object without enforcing strict validation. |
CommonEvent |
parse(String cefString,
boolean validate)
Converts a CEF formatted String into a
CommonEvent object with exposed control over strict validation. |
CommonEvent |
parse(String cefString,
boolean validate,
boolean allowNulls,
Locale locale)
Converts a CEF formatted String into a
CommonEvent object with exposed control over validation and the
Locale used to parse fields containing Dates |
CommonEvent |
parse(String cefString,
boolean validate,
Locale locale)
Converts a CEF formatted String into a
CommonEvent object with exposed control over validation and the
Locale used to parse fields containing Dates |
public CEFParser()
public CEFParser(javax.validation.Validator validator)
validator - A JSR-303 complianceValidator such as Hibernate or Apache bValpublic CommonEvent parse(byte[] cefByteArray)
cefByteArray - byte [] containing the CEF message to be parsed - Array will be converted String using UTF-8public CommonEvent parse(byte[] cefByteArray, boolean validate)
cefByteArray - byte [] containing the CEF message to be parsed - Array will be converted String using UTF-8validate - Boolean if parser should validate values beyond type compatibility (e.g. Values within acceptable lengths, value lists, etc)public CommonEvent parse(byte[] cefByteArray, boolean validate, Locale locale)
cefByteArray - byte [] containing the CEF message to be parsed - Array will be converted String using UTF-8validate - Boolean if parser should validate values beyond type compatibility (e.g. Values within acceptable lengths, value lists, etc)locale - The locale to be used when parsing dates (so that parser can handle both jul (en_US) and juil.(fr_FR)public CommonEvent parse(byte[] cefByteArray, boolean validate, boolean allowNulls, Locale locale)
cefByteArray - byte [] containing the CEF message to be parsed - Array will be converted String using UTF-8validate - Boolean if parser should validate values beyond type compatibility (e.g. Values within acceptable lengths, value lists, etc)allowNulls - If true, extensions with an empty value will be seen as null. If false, parsing may fail depending on extension typeslocale - The locale to be used when parsing dates (so that parser can handle both jul (en_US) and juil.(fr_FR)public CommonEvent parse(String cefString)
Converts a CEF formatted String into a CommonEvent object without enforcing strict validation.
The use of this method is discouraged and future versions may deprecate its use.
cefString - String containing the CEF message to be parsedpublic CommonEvent parse(String cefString, boolean validate)
Converts a CEF formatted String into a CommonEvent object with exposed control over strict validation.
All CEF extension fields containing Dates are processed with the Locale.ENGLISH.
cefString - String containing the CEF message to be parsedvalidate - Boolean if parser should validate values beyond type compatibility (e.g. Values within acceptable lengths, value lists, etc)public CommonEvent parse(String cefString, boolean validate, Locale locale)
CommonEvent object with exposed control over validation and the
Locale used to parse fields containing DatescefString - String containing the CEF message to be parsedvalidate - Boolean if parser should validate values beyond type compatibility (e.g. Values within acceptable lengths, value lists, etc)locale - The locale to be used when parsing dates (so that parser can handle both jul (en_US) and juil.(fr_FR)public CommonEvent parse(String cefString, boolean validate, boolean allowNulls, Locale locale)
CommonEvent object with exposed control over validation and the
Locale used to parse fields containing DatescefString - String containing the CEF message to be parsedvalidate - Boolean if parser should validate values beyond type compatibility (e.g. Values within acceptable lengths, value lists, etc)allowNulls - If true, extensions with an empty value will be seen as null. If false, parsing may fail depending on extension typeslocale - The locale to be used when parsing dates (so that parser can handle both jul (en_US) and juil.(fr_FR)Copyright © 2016–2021 Fluenda. All rights reserved.