Package net.sf.jasperreports.engine
Class SimpleJasperReportsContext
- java.lang.Object
-
- net.sf.jasperreports.engine.SimpleJasperReportsContext
-
- All Implemented Interfaces:
JasperReportsContext
- Direct Known Subclasses:
LocalJasperReportsContext
public class SimpleJasperReportsContext extends Object implements JasperReportsContext
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description SimpleJasperReportsContext()Constructs a SimpleJasperReportsContext instance that has the DefaultJasperReportsContext.getInstance() as parent.SimpleJasperReportsContext(JasperReportsContext parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> List<T>getExtensions(Class<T> extensionType)Returns a list of extension objects for a specific extension type.StringgetOwnProperty(String key)ObjectgetOwnValue(String key)JasperReportsContextgetParent()Map<String,String>getProperties()Map<String,String>getPropertiesMap()StringgetProperty(String key)Returns the value of the property.ObjectgetValue(String key)voidremoveProperty(String key)voidremoveValue(String key)<T> voidsetExtensions(Class<T> extensionType, List<? extends T> extensions)voidsetExtensions(Map<Class<?>,List<?>> extensions)voidsetParent(JasperReportsContext parent)voidsetPropertiesMap(Map<String,String> propertiesMap)voidsetProperty(String key, String value)voidsetValue(String key, Object value)
-
-
-
Constructor Detail
-
SimpleJasperReportsContext
public SimpleJasperReportsContext()
Constructs a SimpleJasperReportsContext instance that has the DefaultJasperReportsContext.getInstance() as parent.
-
SimpleJasperReportsContext
public SimpleJasperReportsContext(JasperReportsContext parent)
-
-
Method Detail
-
setParent
public void setParent(JasperReportsContext parent)
-
getParent
public JasperReportsContext getParent()
-
getValue
public Object getValue(String key)
- Specified by:
getValuein interfaceJasperReportsContext
-
getOwnValue
public Object getOwnValue(String key)
- Specified by:
getOwnValuein interfaceJasperReportsContext
-
setValue
public void setValue(String key, Object value)
- Specified by:
setValuein interfaceJasperReportsContext
-
removeValue
public void removeValue(String key)
-
getExtensions
public <T> List<T> getExtensions(Class<T> extensionType)
Returns a list of extension objects for a specific extension type.- Specified by:
getExtensionsin interfaceJasperReportsContext- 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:
getPropertyin interfaceJasperReportsContext- Parameters:
key- the key- Returns:
- the property value
-
getOwnProperty
public String getOwnProperty(String key)
- Specified by:
getOwnPropertyin interfaceJasperReportsContext
-
setProperty
public void setProperty(String key, String value)
- Specified by:
setPropertyin interfaceJasperReportsContext
-
removeProperty
public void removeProperty(String key)
- Specified by:
removePropertyin interfaceJasperReportsContext
-
getProperties
public Map<String,String> getProperties()
- Specified by:
getPropertiesin interfaceJasperReportsContext
-
-