public class LexUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
beanSeparator
The separator (backslash) used in host\mailbox\action and local listener\service paths
|
| Constructor and Description |
|---|
LexUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
convert(int type,
java.lang.String path) |
static java.lang.String |
convert(int type,
java.lang.String[] path) |
static boolean |
getAutoCommit()
Get the default auto-commit for all connections returned from LexUtil
|
static java.sql.Connection |
getDatabaseConnection()
Get a connection from the VersaLex database connection pool.
|
static java.sql.Connection |
getDatabaseConnection(boolean commit)
Get a connection from the VersaLex database connection pool.
|
static javax.mail.Session |
getSession()
Vends a Java mail session object for use in sending an email out through VersaLex
|
static java.io.BufferedOutputStream |
getSystemDebugOut()
Gets the system debug output stream
|
static java.io.BufferedWriter |
getSystemDebugWriter()
Gets the system debug writer
|
static boolean |
isCommand(org.w3c.dom.Element event)
Check if log event is a Command element
|
static boolean |
isCopyFile(java.lang.String direction)
Check if local copy file
|
static boolean |
isDetail(org.w3c.dom.Element event)
Check if log event is a Detail element
|
static boolean |
isEnd(org.w3c.dom.Element event)
Check if log event is an End element
|
static boolean |
isFailureResult(java.lang.String status)
Check if Result status is a failure
|
static boolean |
isFile(org.w3c.dom.Element event)
Check if log event is a File element
|
static boolean |
isIncomingFile(java.lang.String direction)
Check if receiving file
|
static boolean |
isOutgoingFile(java.lang.String direction)
Check if sending file
|
static boolean |
isResponse(org.w3c.dom.Element event)
Check if log event is a Result element
|
static boolean |
isResult(org.w3c.dom.Element event)
Check if log event is a Result element
|
static boolean |
isThread(org.w3c.dom.Element event)
Check if log event is a Thread element
|
static void |
putDatabaseConnection(java.sql.Connection connection)
Put back a database connection into the VersaLex connection pool.
|
static void |
putDatabaseConnection(java.sql.Connection connection,
boolean commit)
Put back a database connection into the VersaLex connection pool.
|
static void |
sendMail(javax.mail.Session session,
javax.mail.internet.MimeMessage message)
Sends an email out through VersaLex
|
static void |
sendMail(javax.mail.Session session,
javax.mail.internet.MimeMessage message,
int timeout)
Sends an email out through VersaLex
|
static void |
setAutoCommit(boolean autoCommit)
Set the auto-commit status of all connections returned to auto-commit (
true)
or rollback (false). |
static void |
setDatabaseConnectionPoolSize(int poolsize)
Set the database connection poolsize (defaults to 1).
|
public static final java.lang.String beanSeparator
public static final java.io.BufferedWriter getSystemDebugWriter()
public static final java.io.BufferedOutputStream getSystemDebugOut()
public static final javax.mail.Session getSession()
throws java.lang.Exception
java.lang.Exceptionpublic static final void sendMail(javax.mail.Session session,
javax.mail.internet.MimeMessage message)
throws java.lang.Exception
session - Java mail sessionmessage - Java mail message originating from new MimeMessage(session)java.lang.Exceptionpublic static final void sendMail(javax.mail.Session session,
javax.mail.internet.MimeMessage message,
int timeout)
throws java.lang.Exception
session - Java mail sessionmessage - Java mail message originating from new MimeMessage(session)timeout - Timeout in seconds for sending email (defaults to 150 seconds)java.lang.Exceptionpublic static final boolean isThread(org.w3c.dom.Element event)
event - VersaLex Log eventpublic static final boolean isCommand(org.w3c.dom.Element event)
event - VersaLex Log eventpublic static final boolean isDetail(org.w3c.dom.Element event)
event - VersaLex Log eventpublic static final boolean isEnd(org.w3c.dom.Element event)
event - VersaLex Log eventpublic static final boolean isFile(org.w3c.dom.Element event)
event - VersaLex Log eventpublic static final boolean isResult(org.w3c.dom.Element event)
event - VersaLex Log eventpublic static final boolean isResponse(org.w3c.dom.Element event)
event - VersaLex Log eventpublic static final boolean isFailureResult(java.lang.String status)
status - Result text valuepublic static final boolean isOutgoingFile(java.lang.String direction)
direction - Result direction valuepublic static final boolean isIncomingFile(java.lang.String direction)
direction - Result direction valuepublic static final boolean isCopyFile(java.lang.String direction)
direction - Result direction valuepublic static final void setAutoCommit(boolean autoCommit)
true)
or rollback (false).autoCommit - true = auto commit, false = rollbackpublic static final boolean getAutoCommit()
public static final java.sql.Connection getDatabaseConnection()
throws java.lang.Exception
java.lang.Exceptionpublic static final java.sql.Connection getDatabaseConnection(boolean commit)
throws java.lang.Exception
commit - passing in a boolean overrides the default.
true returns an auto commit connection, false
returns a rollback connectionjava.lang.Exceptionpublic static final void putDatabaseConnection(java.sql.Connection connection)
throws java.lang.Exception
connection - database connection being returned to pooljava.lang.Exceptionpublic static final void putDatabaseConnection(java.sql.Connection connection,
boolean commit)
throws java.lang.Exception
connection - database connection being returned to poolcommit - if connection.getAutoCommit() returns false, then passing true
will commit the connection before adding it back to the pool. If connection.getAutoCommit() returns
false and commit is false, then the
connection is rolled back before returning to the pooljava.lang.Exceptionpublic static final void setDatabaseConnectionPoolSize(int poolsize)
throws java.lang.Exception
poolsize - (must be >= 1)java.lang.Exceptionpublic static final java.lang.String convert(int type,
java.lang.String[] path)
public static final java.lang.String[] convert(int type,
java.lang.String path)