|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.martealert.martealertUtils
Field Summary | |
protected static java.lang.String |
_
|
Fields inherited from interface com.martealert.martealertConstants |
AMBIGUOUS_FIELDS, ANALYZER, CLASSIFICATION, COMPLETION, FTS, FTSTZ, HOUR_IN_MILLIS, INTERVAL, IPADDRS, LASTJOIN, LTS, LTSTZ, MAXMSGID, MAXSEVERITY, MFTS, MLTS, MSGID, MSOURCEPORT, NALERTS, NOTNULL_FIELDS, NULL_FIELDS, NXCLASSIFICATION, ORDER_BY_ALERTS, ORDER_BY_MAXTIME, ORDER_BY_TIME, PRELUDE_TABLES, PROTOCOL, SENSOR, SEVERITY, SEVERITY_COMPLETION, SOURCE, SOURCEIP, SOURCEPORT, SOURCEUID, TARGET, TARGETIP, TARGETPORT, TARGETPORT_PROTOCOL, TARGETUID, TERMINAL, TIME, TIMETZ, TLAST, TOP, TOTALTIME |
Constructor Summary | |
martealertUtils()
|
Method Summary | |
static void |
beep()
It sounds a speaker beep. |
static int |
confirmDialogYesNo(java.awt.Component parent,
java.lang.String text)
Get confirmation message after having clicked on a confirm dialog window with yes and no options. |
static int |
confirmDialogYesNoCancel(java.awt.Component parent,
java.lang.String text)
Get confirmation message after having clicked on a confirm dialog window with yes, no and cancel options. |
static java.lang.String |
dialog(java.awt.Component parent,
java.lang.String titulo)
Shows a question-message dialog requesting input from the user parented to parentComponent .
|
static java.lang.String |
dialog(java.awt.Component parent,
java.lang.String titulo,
java.lang.String inicial)
Shows a question-message dialog requesting input from the user parented to parentComponent .
|
static void |
error(java.awt.Component parent,
java.lang.String s)
Show an error message passed as param s in advanced filter dialog, with an error icon. |
protected static java.lang.String |
getClassificationFilter(java.lang.String classifValue,
java.lang.String advancedFilter)
Get a filter for classification field, which is the only field whose values can content spaces. |
static java.lang.String |
getSourceAddrFilter(java.lang.String sourceIPaddr,
java.lang.String operator)
Get a filter for source address field, giving sourceIP value and logic operator. |
static java.lang.String |
getTargetAddrFilter(java.lang.String sourceIPaddr,
java.lang.String targetIPaddr,
java.lang.String operator)
Get a filter for target address field, giving targetIP value and logic operator. |
static void |
information(java.awt.Component parent,
java.lang.String s)
Show an info message passed as param s in advanced filter dialog, with an info icon. |
static boolean |
isValidIpAddr(java.lang.String value)
Return if an IPv4 address is valid or not. |
static int |
max(int[] tab)
Calculate maximum value of int[]tab and return it. |
static java.sql.Timestamp |
maxDate(java.util.Vector row)
Return maximum Date in sql.Timestamp format from a Timestamp vector given. |
static java.lang.String |
maxSeverity(java.util.Vector row)
Return maximum severity of a Vector. |
static int |
min(int[] tab)
Calculate minimum value of int[]tab and return it. |
static java.sql.Timestamp |
minDate(java.util.Vector row)
Return minimum Date in sql.Timestamp format from a Timestamp vector given. |
static int |
nOcurrences(java.lang.String str,
java.lang.String c)
Count number of ocurrences of c in string str. |
static java.util.Vector |
toVector(java.lang.String[] st)
Convert an array to Vector. |
protected static java.lang.String |
unComile(java.lang.String s)
Quit comiles of string s, in case that exist. |
static java.lang.String |
unconcatNx(java.lang.String NxClassification)
Return a String from classification field without number of ocurrences. |
static java.lang.String |
uniSpaced(java.lang.String s)
Format a String using regular expressions: [ ]* for 0 or more spaces. |
static java.lang.String |
unSplit(java.lang.String[] st,
java.lang.String separator)
It makes unSplit of String[]st and separator |
static java.lang.String |
unSplit(java.lang.String[] st,
java.lang.String separator,
boolean includesep)
It makes unSplit of String[]st and separator if includesep is True. |
static java.lang.String |
unSplit(java.util.Vector v,
java.lang.String separator)
It makes unSplit of Vector v and separator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String _
Constructor Detail |
public martealertUtils()
Method Detail |
public static java.lang.String getSourceAddrFilter(java.lang.String sourceIPaddr, java.lang.String operator)
sourceIPaddr
- String with source IP value.operator
- Logic operator: AND, OR.
public static java.lang.String getTargetAddrFilter(java.lang.String sourceIPaddr, java.lang.String targetIPaddr, java.lang.String operator)
sourceIPaddr
- String with source IP value.targetIPaddr
- String with target IP value.operator
- Logic operator: AND, OR.
protected static java.lang.String getClassificationFilter(java.lang.String classifValue, java.lang.String advancedFilter)
classifValue
- String with value without comile: "Admin login successful"advancedFilter
- String component of advanced filter.
public static java.sql.Timestamp maxDate(java.util.Vector row)
row
- Vector of Timestamps to calculate maximum date.
public static java.sql.Timestamp minDate(java.util.Vector row)
row
- Vector of Timestamps to calculate minimum date.
protected static java.lang.String unComile(java.lang.String s)
s
- String to be uncomiled
public static int min(int[] tab)
tab
- array of int to calculate minimum value.
public static int max(int[] tab)
tab
- array of int to calculate maximum value.
public static java.lang.String unconcatNx(java.lang.String NxClassification)
NxClassification
- String with number of ocurrences and log type info.
public static java.lang.String maxSeverity(java.util.Vector row)
row
- Vector to calculate max severity among its components.
public static int nOcurrences(java.lang.String str, java.lang.String c)
str
- String where c is counted.c
- String to be found in str for count ocurrences.
public static boolean isValidIpAddr(java.lang.String value)
value
- String with inet address.
public static void error(java.awt.Component parent, java.lang.String s)
parent
- Component parent of martealertAdvancedFilterView dialog.s
- Error message to showpublic static void information(java.awt.Component parent, java.lang.String s)
parent
- Component parent of martealertAdvancedFilterView dialog.s
- Info message to show.public static int confirmDialogYesNoCancel(java.awt.Component parent, java.lang.String text)
parent
- Component parent of advanced filter dialog.text
- Message to be shown.
public static int confirmDialogYesNo(java.awt.Component parent, java.lang.String text)
parent
- Component parent of advanced filter dialog.text
- Message to be shown.
public static java.lang.String dialog(java.awt.Component parent, java.lang.String titulo)
parentComponent
.
The dialog is displayed on top of the Component
's
frame, and is usually positioned below the Component
.
parent
- Component parent object.titulo
- String to show.public static java.lang.String dialog(java.awt.Component parent, java.lang.String titulo, java.lang.String inicial)
parentComponent
.
The dialog is displayed on top of the Component
's
frame, and is usually positioned below the Component
.
parent
- Component parent object.titulo
- String to show.inicial
- Value used to initialize input field.public static void beep()
public static java.lang.String uniSpaced(java.lang.String s)
s
- String to be formatted.
public static java.lang.String unSplit(java.util.Vector v, java.lang.String separator)
v
- Vector with components to join.separator
- String of separator between components of v Vector.
public static java.lang.String unSplit(java.lang.String[] st, java.lang.String separator)
st
- String array with components to join.separator
- String of separator between components of String[]st.
public static java.lang.String unSplit(java.lang.String[] st, java.lang.String separator, boolean includesep)
st
- String array with components to join.separator
- String of separator between components of String[]st.includesep
- boolean which determinate if separator is included or not in String to be returned.
public static java.util.Vector toVector(java.lang.String[] st)
st
- Array to be converted into Vector.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |