Package mondrian.spi.impl
Class Scripts
java.lang.Object
mondrian.spi.impl.Scripts
Provides implementations of a variety of SPIs using scripting.
- Author:
- jhyde
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CellFormatter
cellFormatter
(String scriptText, String scriptLanguage) Creates an implementation of theCellFormatter
SPI based on a script.static DataSourceChangeListener
Creates an implementation of theDataSourceChangeListener
SPI based on a script.static DataSourceResolver
Creates an implementation of theDataSourceResolver
SPI based on a script.static DynamicSchemaProcessor
Creates an implementation of theDynamicSchemaProcessor
SPI based on a script.static MemberFormatter
memberFormatter
(String scriptText, String scriptLanguage) Creates an implementation of theMemberFormatter
SPI based on a script.static PropertyFormatter
propertyFormatter
(String scriptText, String scriptLanguage) Creates an implementation of thePropertyFormatter
SPI based on a script.static UserDefinedFunction
userDefinedFunction
(Scripts.ScriptDefinition script, String name) Creates an implementation of theUserDefinedFunction
SPI based on a script.
-
Constructor Details
-
Scripts
public Scripts()
-
-
Method Details
-
propertyFormatter
Creates an implementation of thePropertyFormatter
SPI based on a script.- Parameters:
scriptText
- Script textscriptLanguage
- Script language- Returns:
- property formatter
-
memberFormatter
Creates an implementation of theMemberFormatter
SPI based on a script.- Parameters:
scriptText
- Script textscriptLanguage
- Script language- Returns:
- member formatter
-
cellFormatter
Creates an implementation of theCellFormatter
SPI based on a script.- Parameters:
scriptText
- Script textscriptLanguage
- Script language- Returns:
- cell formatter
-
dataSourceChangeListener
Creates an implementation of theDataSourceChangeListener
SPI based on a script.- Parameters:
script
- Script- Returns:
- data source change listener
-
dataSourceResolver
Creates an implementation of theDataSourceResolver
SPI based on a script.- Parameters:
script
- Script- Returns:
- data source resolver
-
dynamicSchemaProcessor
Creates an implementation of theDynamicSchemaProcessor
SPI based on a script.- Parameters:
script
- Script- Returns:
- dynamic schema processor
-
userDefinedFunction
Creates an implementation of theUserDefinedFunction
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
-