Object
Utility helper class for campaigns and scenarios.
Object
ScenarioHelper
Field Summary |
public static final int |
|
public static final long |
|
public static final |
|
public static final boolean |
|
public static final int |
|
Constructor Summary |
Method Summary |
public static |
|
public static |
|
public static |
|
public static void |
|
public static void | |
public static void | |
public static |
|
public static boolean |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static | |
public static |
|
public static |
|
public static void | |
public static void | |
public static void | |
public static void | |
public static void | |
public static void | |
public static void | |
public static void |
|
public static void |
|
public static void |
|
public static void |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static void |
|
Methods from class java.lang. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FALSE
public static final long GOAL_CHECK_TIME
This is always set to 300,000ms (5 minutes).
public static final String
LOG_APP_NAME
public static final boolean LOG_VERBOSE
This is always initialized to false now.
Related Topics
public static final int TRUE
Constructor Detail |
public ScenarioHelper()
Method Detail |
public staticCheck if the value of the element's required attribute is in the list of possible values.String
checkAttribute(Element
e,String
name,String
[] vals)
throwsIllegalArgumentException
IllegalArgumentException
public staticCheck if the value of the element's required attribute is the desired value.String
checkAttribute(Element
e,String
name,String
val)
throwsIllegalArgumentException
IllegalArgumentException
public staticCheck if the value of the element's required attribute is one of the desired values.String
checkAttribute(Element
e,String
name,String
val1,String
val2)
throwsIllegalArgumentException
IllegalArgumentException
public static void close(Connection
con)
Close a connection, ignoring any errors.
Related Topics
public static void close(Statement
stmt)
Close a statement, ignoring any errors.
Related Topics
public static void close(ResultSet
rs)
Close a result set, ignoring any errors.
Related Topics
public staticGet the value of an element's required attribute.String
getAttribute(Element
e,String
name)
throwsIllegalArgumentException
IllegalArgumentException
public static boolean getBoolean(Get a boolean from a numeric column.ResultSet
rs, int index)
throwsSQLException
SQLException
Related Topics
ScenarioHelper.TRUE
ScenarioHelper.FALSE
public staticGet the campaign id from an Event.String
getCampaignId(Event
evt)
This checks the following event attributes, in this order:
public staticGet the character data contained in the element.String
getCharacterData(Element
e)
throwsIllegalArgumentException
If the character data is a CDATA section, it will be returned intact. Otherwise, it will be trimmed of leading and trailing whitespace.
IllegalArgumentException
public staticGet a default DocumentBuilder.DocumentBuilder
getDocumentBuilder()
throwsSAXException
SAXException
public staticGet an either validating or non-validating DocumentBuilder.DocumentBuilder
getDocumentBuilder(boolean validate)
throwsSAXException
SAXException
public staticGet a date from a the ISO 8601 formatted character data contained in an element.Timestamp
getISO8601Date(Element
e)
throwsIllegalArgumentException
IllegalArgumentException
Related Topics
public staticGet the node's type as a string.String
getNodeType(Node
n)
public static String
getNodeType(short type)
Get a string describing the Node type.
public staticGet the request from the event.Request
getRequestFromEvent(Event
evt)
public staticGet the session from the event.Session
getSessionFromEvent(Event
evt)
public staticGet the non-namespace-prefixed tag name of an element.String
getTagName(Element
e)
Related Topics
public staticGet the user id from an Event.String
getUserId(Event
evt)
This checks the following event attributes, in this order:
public staticGet a user profile wrapper for the given user id from the given request.ProfileWrapper
getUserProfileWrapper(String
userId,HttpServletRequest
req)
throwsProfileNotFoundException
,RemoteException
This will first try the profile in the request/session, then it will attempt to retrieve a profile.
ProfileNotFoundException
RemoteException
Related Topics
public staticDetermine if the specified event represent a tracked user registration.String
[] isTrackedUserRegistration(Event
evt)
DEPRECATED Use WLS logging instead
public static void log(int level,Log a verbose campaign/scenario message.String
mesg,Throwable
ex)
DEPRECATED Use Debug instead
public static void logDebug(Log a debug campaign/scenario message.String
mesg,Throwable
ex)
Related Topics
DEPRECATED Use Debug instead
public static void logDebug(String
mesg)
Log a debug campaign/scenario message.
Related Topics
DEPRECATED Use WLS logging instead
public static void logError(Log an error campaign/scenario message.String
mesg,Throwable
ex)
DEPRECATED Use WLS logging instead
public static void logError(String
mesg)
Log an error campaign/scenario message.
DEPRECATED Use WLS logging instead
public static void logInfo(Log an informational campaign/scenario message.String
mesg,Throwable
ex)
DEPRECATED Use WLS logging instead
public static void logInfo(String
mesg)
Log an informational campaign/scenario message.
DEPRECATED Use Debug instead
public static void logVerbose(Log a verbose campaign/scenario message.String
mesg,Throwable
ex)
Related Topics
DEPRECATED Use Debug instead
public static void logVerbose(String
mesg)
Log a verbose campaign/scenario message.
Related Topics
DEPRECATED Use WLS logging instead
public static void logWarning(Log a warning campaign/scenario message.String
mesg,Throwable
ex)
DEPRECATED Use WLS logging instead
public static void logWarning(String
mesg)
Log a warning campaign/scenario message.
public staticParse an input source, using theDocument
parse(DocumentBuilder
parser,InputSource
src)
throwsSAXException
,IOException
DefaultEntityResolver
.
SAXException
IOException
public staticParse an input source, using theDocument
parse(InputSource
src, boolean validate)
throwsSAXException
,IOException
DefaultEntityResolver
.
SAXException
IOException
public staticParse an input source, using theDocument
parse(InputSource
src)
throwsSAXException
,IOException
DefaultEntityResolver
.
SAXException
IOException
public staticParse an input stream, using theDocument
parse(Reader
in, boolean validate)
throwsSAXException
,IOException
DefaultEntityResolver
.
SAXException
IOException
public staticParse an input stream, using theDocument
parse(Reader
in)
throwsSAXException
,IOException
DefaultEntityResolver
.
SAXException
IOException
public static void setBoolean(Set a boolean in a numeric column.PreparedStatement
stmt, int index, boolean b)
throwsSQLException
SQLException
Related Topics