mondrian.spi.impl
Class Scripts

java.lang.Object
  extended by mondrian.spi.impl.Scripts

public class Scripts
extends Object

Provides implementations of a variety of SPIs using scripting.

Author:
jhyde

Nested Class Summary
static class Scripts.ScriptDefinition
           
static class Scripts.ScriptLanguage
           
 
Constructor Summary
Scripts()
           
 
Method Summary
static CellFormatter cellFormatter(Scripts.ScriptDefinition script)
          Creates an implementation of the CellFormatter SPI based on a script.
static DataSourceChangeListener dataSourceChangeListener(Scripts.ScriptDefinition script)
          Creates an implementation of the DataSourceChangeListener SPI based on a script.
static DataSourceResolver dataSourceResolver(Scripts.ScriptDefinition script)
          Creates an implementation of the DataSourceResolver SPI based on a script.
static DynamicSchemaProcessor dynamicSchemaProcessor(Scripts.ScriptDefinition script)
          Creates an implementation of the DynamicSchemaProcessor SPI based on a script.
static MemberFormatter memberFormatter(Scripts.ScriptDefinition script)
          Creates an implementation of the MemberFormatter SPI based on a script.
static PropertyFormatter propertyFormatter(Scripts.ScriptDefinition script)
          Creates an implementation of the PropertyFormatter SPI based on a script.
static UserDefinedFunction userDefinedFunction(Scripts.ScriptDefinition script, String name)
          Creates an implementation of the UserDefinedFunction SPI based on a script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scripts

public Scripts()
Method Detail

propertyFormatter

public static PropertyFormatter propertyFormatter(Scripts.ScriptDefinition script)
Creates an implementation of the PropertyFormatter SPI based on a script.

Parameters:
script - Script
Returns:
property formatter

memberFormatter

public static MemberFormatter memberFormatter(Scripts.ScriptDefinition script)
Creates an implementation of the MemberFormatter SPI based on a script.

Parameters:
script - Script
Returns:
member formatter

cellFormatter

public static CellFormatter cellFormatter(Scripts.ScriptDefinition script)
Creates an implementation of the CellFormatter SPI based on a script.

Parameters:
script - Script
Returns:
cell formatter

dataSourceChangeListener

public static DataSourceChangeListener dataSourceChangeListener(Scripts.ScriptDefinition script)
Creates an implementation of the DataSourceChangeListener SPI based on a script.

Parameters:
script - Script
Returns:
data source change listener

dataSourceResolver

public static DataSourceResolver dataSourceResolver(Scripts.ScriptDefinition script)
Creates an implementation of the DataSourceResolver SPI based on a script.

Parameters:
script - Script
Returns:
data source resolver

dynamicSchemaProcessor

public static DynamicSchemaProcessor dynamicSchemaProcessor(Scripts.ScriptDefinition script)
Creates an implementation of the DynamicSchemaProcessor SPI based on a script.

Parameters:
script - Script
Returns:
dynamic schema processor

userDefinedFunction

public static UserDefinedFunction userDefinedFunction(Scripts.ScriptDefinition script,
                                                      String name)
Creates an implementation of the UserDefinedFunction SPI based on a script.

The script must declare an object called "obj" that must have a method "evaluate(evaluator, arguments)" and may have fields "name", "description", "syntax", "parameterTypes" and method "getReturnType(parameterTypes)".

Parameters:
script - Script
Returns:
user-defined function

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads