net.sf.jasperreports.engine
Class DefaultJasperReportsContext

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

public class DefaultJasperReportsContext
extends 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  ConcurrentHashMap<String,String> properties
           
static String PROPERTIES_FILE
          The name of the system property that specifies the properties file name.
 
Method Summary
protected static Properties getDefaultProperties()
          Sets the default properties.
<T> List<T>
getExtensions(Class<T> extensionType)
          Returns a list of extension objects for a specific extension type.
static DefaultJasperReportsContext getInstance()
           
 Map<String,String> getProperties()
           
 String getProperty(String key)
          Returns the value of the property.
protected static String getSystemProperty(String propertyName)
           
 Object getValue(String key)
           
protected  void initProperties()
          Loads the properties.
protected  void loadSystemProperties()
           
protected  void loadSystemProperty(String sysKey, String propKey)
           
 void removeProperty(String key)
           
 void setProperty(String key, String value)
           
 void setValue(String key, 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 String PROPERTIES_FILE
The name of the system property that specifies the properties file name.

See Also:
Constant Field Values

properties

protected volatile ConcurrentHashMap<String,String> properties
Method Detail

getInstance

public static DefaultJasperReportsContext getInstance()

initProperties

protected void initProperties()
Loads the properties.


loadSystemProperties

protected void loadSystemProperties()

getDefaultProperties

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

Returns:
the default properties
Throws:
JRException

getSystemProperty

protected static String getSystemProperty(String propertyName)

loadSystemProperty

protected void loadSystemProperty(String sysKey,
                                  String propKey)

getValue

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

setValue

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

getExtensions

public <T> List<T> getExtensions(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 String getProperty(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(String key,
                        String value)
Specified by:
setProperty in interface JasperReportsContext

removeProperty

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

getProperties

public Map<String,String> getProperties()
Specified by:
getProperties in interface JasperReportsContext


Copyright © 2012. All Rights Reserved.