net.sf.jasperreports.engine
Class DefaultJasperReportsContext

java.lang.Object
  extended by net.sf.jasperreports.engine.DefaultJasperReportsContext
All Implemented Interfaces:
JasperReportsContext

public class DefaultJasperReportsContext
extends java.lang.Object
implements JasperReportsContext

Version:
$Id: DefaultJasperReportsContext.java 5396 2012-05-21 01:06:15Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
protected  java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> properties
           
static java.lang.String PROPERTIES_FILE
          The name of the system property that specifies the properties file name.
 
Method Summary
protected static java.util.Properties getDefaultProperties()
          Sets the default properties.
<T> java.util.List<T>
getExtensions(java.lang.Class<T> extensionType)
          Returns a list of extension objects for a specific extension type.
static DefaultJasperReportsContext getInstance()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getProperty(java.lang.String key)
          Returns the value of the property.
protected static java.lang.String getSystemProperty(java.lang.String propertyName)
           
 java.lang.Object getValue(java.lang.String key)
           
protected  void initProperties()
          Loads the properties.
protected  void loadSystemProperties()
           
protected  void loadSystemProperty(java.lang.String sysKey, java.lang.String propKey)
           
 void removeProperty(java.lang.String key)
           
 void setProperty(java.lang.String key, java.lang.String value)
           
 void setValue(java.lang.String key, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_FILE

public static final java.lang.String PROPERTIES_FILE
The name of the system property that specifies the properties file name.

See Also:
Constant Field Values

properties

protected volatile java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> properties
Method Detail

getInstance

public static DefaultJasperReportsContext getInstance()

initProperties

protected void initProperties()
Loads the properties.


loadSystemProperties

protected void loadSystemProperties()

getDefaultProperties

protected static java.util.Properties getDefaultProperties()
                                                    throws JRException
Sets the default properties.

Returns:
the default properties
Throws:
JRException

getSystemProperty

protected static java.lang.String getSystemProperty(java.lang.String propertyName)

loadSystemProperty

protected void loadSystemProperty(java.lang.String sysKey,
                                  java.lang.String propKey)

getValue

public java.lang.Object getValue(java.lang.String key)
Specified by:
getValue in interface JasperReportsContext

setValue

public void setValue(java.lang.String key,
                     java.lang.Object value)
Specified by:
setValue in interface JasperReportsContext

getExtensions

public <T> java.util.List<T> getExtensions(java.lang.Class<T> extensionType)
Returns a list of extension objects for a specific extension type.

Specified by:
getExtensions in interface JasperReportsContext
Type Parameters:
T - generic extension type
Parameters:
extensionType - the extension type
Returns:
a list of extension objects

getProperty

public java.lang.String getProperty(java.lang.String key)
Returns the value of the property.

Specified by:
getProperty in interface JasperReportsContext
Parameters:
key - the key
Returns:
the property value

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Specified by:
setProperty in interface JasperReportsContext

removeProperty

public void removeProperty(java.lang.String key)
Specified by:
removeProperty in interface JasperReportsContext

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()
Specified by:
getProperties in interface JasperReportsContext


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com