Class DrawableURLFieldTemplate
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
-
- org.pentaho.reporting.engine.classic.core.filter.templates.DrawableURLFieldTemplate
-
- All Implemented Interfaces:
Serializable
,Cloneable
,DataSource
,Template
public class DrawableURLFieldTemplate extends AbstractTemplate
An image URL field template, which reads the image from an URL supplied from a column in the DataRow.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DrawableURLFieldTemplate()
Creates a new template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DrawableURLFieldTemplate
clone()
Clones the template.URL
getBaseURL()
Returns the base URL.protected DataRowDataSource
getDataRowDataSource()
Returns the datarow data source used in this template.String
getField()
Returns the name of the field from the data-row that the template gets images from.String
getFormula()
Returns the formula used to compute the value of the data source.Object
getValue(ExpressionRuntime runtime, ReportElement element)
Returns the current value for the data source.void
setBaseURL(URL baseURL)
Sets the base URL.void
setField(String field)
Sets the field name.void
setFormula(String formula)
Defines the formula used to compute the value of this data source.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
getInstance, getName, setName
-
-
-
-
Method Detail
-
getField
public String getField()
Returns the name of the field from the data-row that the template gets images from.- Returns:
- The field name.
-
setField
public void setField(String field)
Sets the field name.- Parameters:
field
- the field name.
-
getFormula
public String getFormula()
Returns the formula used to compute the value of the data source.- Returns:
- the formula.
-
setFormula
public void setFormula(String formula)
Defines the formula used to compute the value of this data source.- Parameters:
formula
- the formula for the data source.
-
getBaseURL
public URL getBaseURL()
Returns the base URL.- Returns:
- The base URL.
-
setBaseURL
public void setBaseURL(URL baseURL)
Sets the base URL.- Parameters:
baseURL
- the base URL.
-
getValue
public Object getValue(ExpressionRuntime runtime, ReportElement element)
Returns the current value for the data source.- Parameters:
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this filter.element
-- Returns:
- the value.
-
clone
public DrawableURLFieldTemplate clone() throws CloneNotSupportedException
Clones the template.- Specified by:
clone
in interfaceDataSource
- Overrides:
clone
in classAbstractTemplate
- Returns:
- the clone.
- Throws:
CloneNotSupportedException
- this should never happen.
-
getDataRowDataSource
protected DataRowDataSource getDataRowDataSource()
Returns the datarow data source used in this template.- Returns:
- the datarow data source.
-
-