org.pentaho.reporting.engine.classic.core.filter.templates
Class ResourceLabelTemplate

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
      extended by org.pentaho.reporting.engine.classic.core.filter.templates.ResourceLabelTemplate
All Implemented Interfaces:
Serializable, Cloneable, DataSource, Template

public class ResourceLabelTemplate
extends AbstractTemplate

A resource label template.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
ResourceLabelTemplate()
          Creates a new template.
 
Method Summary
 Object clone()
          Clones the template.
 String getContent()
          Returns the content.
 String getNullValue()
          Returns the string that represents a null value.
 String getResourceIdentifier()
          Returns the resource class name.
 Object getValue(ExpressionRuntime runtime, Element element)
          Returns the current value for the data source.
 void setContent(String content)
          Sets the content.
 void setNullValue(String nullValue)
          Sets the string that represents a null value.
 void setResourceIdentifier(String resourceClassName)
          Sets the resource class name.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.filter.templates.AbstractTemplate
getInstance, getName, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLabelTemplate

public ResourceLabelTemplate()
Creates a new template.

Method Detail

getResourceIdentifier

public String getResourceIdentifier()
Returns the resource class name.

Returns:
The resource class name.

setResourceIdentifier

public void setResourceIdentifier(String resourceClassName)
                           throws MissingResourceException
Sets the resource class name.

Parameters:
resourceClassName - the class name.
Throws:
MissingResourceException - if the resource is missing.
NullPointerException - if the resource class name is null.

setContent

public void setContent(String content)
Sets the content.

Parameters:
content - the content.

getContent

public String getContent()
Returns the content.

Returns:
The content.

getNullValue

public String getNullValue()
Returns the string that represents a null value.

Returns:
The string that represents a null value.

setNullValue

public void setNullValue(String nullValue)
Sets the string that represents a null value.

Parameters:
nullValue - The string that represents a null value.

getValue

public Object getValue(ExpressionRuntime runtime,
                       Element 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 Object clone()
             throws CloneNotSupportedException
Clones the template.

Specified by:
clone in interface DataSource
Overrides:
clone in class AbstractTemplate
Returns:
the clone.
Throws:
CloneNotSupportedException - this should never happen.