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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CellFormattercellFormatter(String scriptText, String scriptLanguage) Creates an implementation of theCellFormatterSPI based on a script.static DataSourceChangeListenerCreates an implementation of theDataSourceChangeListenerSPI based on a script.static DataSourceResolverCreates an implementation of theDataSourceResolverSPI based on a script.static DynamicSchemaProcessorCreates an implementation of theDynamicSchemaProcessorSPI based on a script.static MemberFormattermemberFormatter(String scriptText, String scriptLanguage) Creates an implementation of theMemberFormatterSPI based on a script.static PropertyFormatterpropertyFormatter(String scriptText, String scriptLanguage) Creates an implementation of thePropertyFormatterSPI based on a script.static UserDefinedFunctionuserDefinedFunction(Scripts.ScriptDefinition script, String name) Creates an implementation of theUserDefinedFunctionSPI based on a script.
-
Constructor Details
-
Scripts
public Scripts()
-
-
Method Details
-
propertyFormatter
Creates an implementation of thePropertyFormatterSPI based on a script.- Parameters:
scriptText- Script textscriptLanguage- Script language- Returns:
- property formatter
-
memberFormatter
Creates an implementation of theMemberFormatterSPI based on a script.- Parameters:
scriptText- Script textscriptLanguage- Script language- Returns:
- member formatter
-
cellFormatter
Creates an implementation of theCellFormatterSPI based on a script.- Parameters:
scriptText- Script textscriptLanguage- Script language- Returns:
- cell formatter
-
dataSourceChangeListener
Creates an implementation of theDataSourceChangeListenerSPI based on a script.- Parameters:
script- Script- Returns:
- data source change listener
-
dataSourceResolver
Creates an implementation of theDataSourceResolverSPI based on a script.- Parameters:
script- Script- Returns:
- data source resolver
-
dynamicSchemaProcessor
Creates an implementation of theDynamicSchemaProcessorSPI based on a script.- Parameters:
script- Script- Returns:
- dynamic schema processor
-
userDefinedFunction
Creates an implementation of theUserDefinedFunctionSPI 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
-