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.String
getOwnProperty(String key)
Object
getOwnValue(String key)
JasperReportsContext
getParent()
Map<String,String>
getProperties()
Map<String,String>
getPropertiesMap()
String
getProperty(String key)
Returns the value of the property.Object
getValue(String key)
void
removeProperty(String key)
void
removeValue(String key)
<T> void
setExtensions(Class<T> extensionType, List<? extends T> extensions)
void
setExtensions(Map<Class<?>,List<?>> extensions)
void
setParent(JasperReportsContext parent)
void
setPropertiesMap(Map<String,String> propertiesMap)
void
setProperty(String key, String value)
void
setValue(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:
getValue
in interfaceJasperReportsContext
-
getOwnValue
public Object getOwnValue(String key)
- Specified by:
getOwnValue
in interfaceJasperReportsContext
-
setValue
public void setValue(String key, Object value)
- Specified by:
setValue
in 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:
getExtensions
in 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:
getProperty
in interfaceJasperReportsContext
- Parameters:
key
- the key- Returns:
- the property value
-
getOwnProperty
public String getOwnProperty(String key)
- Specified by:
getOwnProperty
in interfaceJasperReportsContext
-
setProperty
public void setProperty(String key, String value)
- Specified by:
setProperty
in interfaceJasperReportsContext
-
removeProperty
public void removeProperty(String key)
- Specified by:
removeProperty
in interfaceJasperReportsContext
-
getProperties
public Map<String,String> getProperties()
- Specified by:
getProperties
in interfaceJasperReportsContext
-
-