|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.EventConstants
org.opennms.netmgt.model.events.Constants
public class Constants
This class contains the constants and methods related to inserting events into the database
| Field Summary | |
|---|---|
static String |
ATTRIB_DELIM
The parser adds the value and attributes of an element to a single element of eventBlock and uses the ATTRIB_DELIM to separate these values |
static char |
DB_ATTRIB_DELIM
The values and the corresponding attributes of an element are added to a single column of the table and delimited by DB_ATTRIB_DELIM |
static char |
MULTIPLE_VAL_DELIM
The delimiter used to delimit multiple values of the same element that are appended and made the value of a single database column |
static char |
NAME_VAL_DELIM
The 'parms' are added to a single column of the DB - the parm name and value are added as delimiter separated list of ' |
static String |
VALUE_TRUNCATE_INDICATOR
Multiple values of any xml element are appended into one value when inserted into the database - if the length of the appended string exceeds the column length, the value is appended with this pattern |
| Constructor Summary | |
|---|---|
Constants()
|
|
| Method Summary | |
|---|---|
static String |
escape(String inStr,
char delimchar)
This method is used to escape required values from strings that may contain those values. |
static String |
format(List<String> strings,
int maxlen)
This method is passed a list of strings and a maximum string size that must not be exceeded by the composite string. |
static String |
format(String[] strings,
int maxlen)
This method is passed an array of strings and a maximum string size that must not be exceeded by the composite string. |
static String |
format(String origString,
int maxlen)
This method is passed a string to be truncated to the maximum string size passed. |
| Methods inherited from class org.opennms.netmgt.EventConstants |
|---|
formatToString, formatToUIString, parseToDate, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char NAME_VAL_DELIM
public static final char MULTIPLE_VAL_DELIM
public static final String ATTRIB_DELIM
public static final char DB_ATTRIB_DELIM
public static final String VALUE_TRUNCATE_INDICATOR
| Constructor Detail |
|---|
public Constants()
| Method Detail |
|---|
public static String escape(String inStr,
char delimchar)
inStr - string that might contain the delimiterdelimchar - delimiter to escape
DB_ATTRIB_DELIM,
MULTIPLE_VAL_DELIM,
DB_ATTRIB_DELIM,
MULTIPLE_VAL_DELIM
public static String format(List<String> strings,
int maxlen)
strings - The list of String objects.maxlen - The maximum length of the composite string
ClassCastException - Thrown if any processed item in the list is not a string
object.
public static String format(String[] strings,
int maxlen)
strings - The list of String objects.maxlen - The maximum length of the composite string
ClassCastException - Thrown if any processed item in the list is not a string
object.
public static String format(String origString,
int maxlen)
maxlen - The maximum length of the composite stringorigString - a String object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||