org.pentaho.reporting.engine.classic.core
Class DefaultReportEnvironment

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.DefaultReportEnvironment
All Implemented Interfaces:
Serializable, Cloneable, ReportEnvironment

public class DefaultReportEnvironment
extends Object
implements ReportEnvironment

A simple implementation that provides static environmental information. The environment properties are mapped against the global report configuration.

Author:
Thomas Morgner
See Also:
Serialized Form

Field Summary
static String ENVIRONMENT_KEY
           
 
Constructor Summary
DefaultReportEnvironment(org.pentaho.reporting.libraries.base.config.Configuration configuration)
           
 
Method Summary
 Object clone()
           
 String encodeURL(String url)
          Servlet support.
 String getEnvironmentProperty(String key)
          Returns a environment property.
 Locale getLocale()
           
 TimeZone getTimeZone()
           
 String getURLEncoding()
          Returns the text encoding that should be used to encode URLs.
 Map<String,String[]> getUrlExtraParameter()
           
 void setLocale(Locale locale)
           
 void setTimeZone(TimeZone timeZone)
           
 void update(org.pentaho.reporting.libraries.base.config.Configuration configuration)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENVIRONMENT_KEY

public static final String ENVIRONMENT_KEY
See Also:
Constant Field Values
Constructor Detail

DefaultReportEnvironment

public DefaultReportEnvironment(org.pentaho.reporting.libraries.base.config.Configuration configuration)
Method Detail

getEnvironmentProperty

public String getEnvironmentProperty(String key)
Description copied from interface: ReportEnvironment
Returns a environment property. These properties are usually defined by the outside world, but default values can be specified inside the report-definition.

Specified by:
getEnvironmentProperty in interface ReportEnvironment
Returns:

getURLEncoding

public String getURLEncoding()
Returns the text encoding that should be used to encode URLs.

Specified by:
getURLEncoding in interface ReportEnvironment
Returns:
the encoding for URLs.

update

public void update(org.pentaho.reporting.libraries.base.config.Configuration configuration)

encodeURL

public String encodeURL(String url)
                 throws UnsupportedEncodingException
Servlet support. Encodes session information (or other additional parameters) into the URL. This is required if the server does not use cookies for its session management.

Specified by:
encodeURL in interface ReportEnvironment
Parameters:
url -
Returns:
Throws:
UnsupportedEncodingException

setLocale

public void setLocale(Locale locale)

setTimeZone

public void setTimeZone(TimeZone timeZone)

getLocale

public Locale getLocale()
Specified by:
getLocale in interface ReportEnvironment

getTimeZone

public TimeZone getTimeZone()
Specified by:
getTimeZone in interface ReportEnvironment

clone

public Object clone()
             throws CloneNotSupportedException
Specified by:
clone in interface ReportEnvironment
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

getUrlExtraParameter

public Map<String,String[]> getUrlExtraParameter()
Specified by:
getUrlExtraParameter in interface ReportEnvironment