DefaultTurbineRunData is the default implementation of the
TurbineRunData interface, which is distributed by the Turbine
RunData service, if another implementation is not defined in
the default or specified RunData configuration.
TurbineRunData is an extension to RunData, which
is an interface to run-rime 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.
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.
Gets the default charset defined by a property named
"locale.default.charset" or by the specified locale.
If the specified locale is null, the default locale is applied.
the name of the default charset or null.
Gets the default locale defined by properties named
"locale.default.lang" and "locale.default.country".
This changed from earlier Turbine versions that you can
rely on getDefaultLocale() to never return null.
A Locale object.
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.
Get the user agent for the request. The semantics here
are muddled because RunData caches the value after the
first invocation. This is different e.g. from getCharSet().
a string.
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.
Set the layout for the request.
Parameters: layout - a string.
setLayoutTemplate
public void setLayoutTemplate(String layout)(Code)
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.