org.pentaho.reporting.engine.classic.core.function.formula
Class IsExportTypeFunction

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.formula.IsExportTypeFunction
All Implemented Interfaces:
Serializable, org.pentaho.reporting.libraries.formula.function.Function

public class IsExportTypeFunction
extends Object
implements org.pentaho.reporting.libraries.formula.function.Function

Tests, whether a certain export type is currently used. This matches the given export type with the export type that is specified by the output-target. The given export type can be a partial pattern, in which case this expression tests, whether the given export type is a sub-type of the output-target's type.

To test whether a table-export is used, specifiy the export type as "table" and it will match all table exports.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
IsExportTypeFunction()
          Default Constructor.
 
Method Summary
 org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair evaluate(org.pentaho.reporting.libraries.formula.FormulaContext context, org.pentaho.reporting.libraries.formula.function.ParameterCallback parameters)
          Return Boolean.TRUE, if the specified export type matches the used export type, Boolean.FALSE otherwise.
 String getCanonicalName()
          Returns the Canonical Name of the function.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsExportTypeFunction

public IsExportTypeFunction()
Default Constructor. Does nothing.

Method Detail

getCanonicalName

public String getCanonicalName()
Returns the Canonical Name of the function.

Specified by:
getCanonicalName in interface org.pentaho.reporting.libraries.formula.function.Function
Returns:
the constant string "ISEXPORTTYPE"

evaluate

public org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair evaluate(org.pentaho.reporting.libraries.formula.FormulaContext context,
                                                                              org.pentaho.reporting.libraries.formula.function.ParameterCallback parameters)
                                                                       throws org.pentaho.reporting.libraries.formula.EvaluationException
Return Boolean.TRUE, if the specified export type matches the used export type, Boolean.FALSE otherwise.

Specified by:
evaluate in interface org.pentaho.reporting.libraries.formula.function.Function
Parameters:
context - the formula context, which allows access to the runtime.
parameters - the parameter callback is used to retrieve parameter values.
Returns:
the computed result wrapped in a TypeValuePair.
Throws:
org.pentaho.reporting.libraries.formula.EvaluationException - if an error occurs.