org.pentaho.reporting.engine.classic.core.parameters
Interface ParameterDefinitionEntry

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
ListParameter
All Known Implementing Classes:
AbstractParameter, DefaultListParameter, PlainParameter, StaticListParameter

public interface ParameterDefinitionEntry
extends Serializable, Cloneable

Contains the definition of a single parameter, along with means to validate the parameter on the server side and means to attach arbitrary data to the parameter.

Author:
Thomas Morgner

Method Summary
 Object clone()
           
 Object getDefaultValue(ParameterContext context)
           
 String getName()
          The internal parameter name.
 String getParameterAttribute(String domain, String name, ParameterContext parameterContext)
          Returns the parameter label.
 String[] getParameterAttributeNames(String domainName)
           
 String[] getParameterAttributeNamespaces()
           
 Class getValueType()
          Returns the parameter value type.
 boolean isMandatory()
          Provides a hint to the parameter validator, whether this value needs to have a selected value.
 

Method Detail

getName

String getName()
The internal parameter name. This will be the name of the data-row field by which the parameter's value can be accessed.

Returns:
the parameter name.

getParameterAttribute

String getParameterAttribute(String domain,
                             String name,
                             ParameterContext parameterContext)
Returns the parameter label. This is optional, but provides a sensible default for auto-generated parameter pages.

Parameters:
domain - the parameter domain (namespace)
name - the name of the parameter attribute
parameterContext - the context from where to aquire the locale for the label.
Returns:
the label.

getParameterAttributeNamespaces

String[] getParameterAttributeNamespaces()

getParameterAttributeNames

String[] getParameterAttributeNames(String domainName)

isMandatory

boolean isMandatory()
Provides a hint to the parameter validator, whether this value needs to have a selected value.

Returns:
true, if the parameter must have a valid value, false otherwise.

getValueType

Class getValueType()
Returns the parameter value type. This is used to perform a simple validation on the incoming untrusted data and converts any incoming text value into a sensible default.

Returns:
the expected value type.

getDefaultValue

Object getDefaultValue(ParameterContext context)
                       throws ReportDataFactoryException
Throws:
ReportDataFactoryException

clone

Object clone()
             throws CloneNotSupportedException
Throws:
CloneNotSupportedException