RunData is an interface to run-time information that is passed
within Turbine. This provides the threading mechanism for the
entire system because multiple requests can potentially come in
at the same time. Thus, there is only one RunData implementation
for each request that is being serviced.
author: Ilkka Priha author: Jon S. Stevens author: Bernie Hoeneisen author: Daniel Rall author: Quinton McCombs version: $Id: RunData.java 534527 2007-05-02 16:10:59Z tv $
Adds the string to message. If message has prior messages from
other actions or screens, this method can be used to chain them.
Parameters: msg - a string.
Adds the ECS element to message. If message has prior messages from
other actions or screens, this method can be used to chain them.
Parameters: msg - an element.
Declares that output will be direct to the response stream,
even though getOut() may never be called. Useful for response
mechanisms that may call res.getWriter() themselves
(such as JSP.)
Gets the action. It returns an empty string if null so
that it is easy to do conditionals on it based on the
equalsIgnoreCase() method.
a string, "" if null.
Gets the charset. If it has not already been defined with
setCharSet(), then a property named "locale.default.charset"
is checked from the Resource Service and returned. If this
property is undefined, the default charset of the locale
is returned. If the locale is undefined, null is returned.
the name of the charset or null.
Gets the HTTP content type to return. If a charset
has been specified, it is included in the content type.
If the charset has not been specified and the main type
of the content type is "text", the default charset is
included. If the default charset is undefined, but the
default locale is defined and it is not the US locale,
a locale specific charset is included.
the content type or an empty string.
If the Layout has not been defined by the screen then set the
layout to be "DefaultLayout". The screen object can also
override this method to provide intelligent determination of
the Layout to execute. You can also define that logic here as
well if you want it to apply on a global scale. For example,
if you wanted to allow someone to define layout "preferences"
where they could dynamicially change the layout for the entire
site.
a string.
Gets the locale. If it has not already been defined with
setLocale(), then properties named "locale.default.lang"
and "locale.default.country" are checked from the Resource
Service and the corresponding locale is returned. If these
properties are undefined, JVM's default locale is returned.
the locale.
Sets a name/value pair in an internal Map that is accessible from the
Error screen. This is a good way to get debugging information
when an exception is thrown.
Parameters: name - name of the variable Parameters: value - value of the variable.
Modifies the layout template for the screen. This convenience
method allows for a layout to be modified from within a
template. For example;
$data.setLayoutTemplate("NewLayout.vm")
Parameters: layout - a layout template.