public abstract class LenskitConfigScript
extends groovy.lang.Script
Base class for LensKit configuration scripts. This class mixes in LenskitConfigDSL
, so all methods on that class are directly available in configuraiton scripts.
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Modifier | Constructor and Description |
---|---|
protected |
LenskitConfigScript() |
protected |
LenskitConfigScript(groovy.lang.Binding binding) |
Modifier and Type | Method and Description |
---|---|
LenskitConfiguration |
configure()
Run this script and produce a new configuration.
|
void |
configure(LenskitConfiguration config)
Run this script against an existing configuration.
|
LenskitConfiguration |
getConfig() |
LenskitConfigDSL |
getDelegate()
Get the delegate.
|
Object |
methodMissing(String name,
Object args)
Groovy override to pass things off to the delegate.
|
Object |
propertyMissing(String name)
Groovy override to provide usage hints with missing properties.
|
void |
setDelegate(LenskitConfigDSL dsl)
Set the delegate.
|
protected LenskitConfigScript()
protected LenskitConfigScript(groovy.lang.Binding binding)
public LenskitConfiguration getConfig()
public LenskitConfigDSL getDelegate()
Get the delegate.
public void setDelegate(LenskitConfigDSL dsl)
Set the delegate.
dsl
- The delegate.public Object methodMissing(String name, Object args)
Groovy override to pass things off to the delegate.
name
- The name of the method.args
- The method arguments.public Object propertyMissing(String name)
Groovy override to provide usage hints with missing properties.
name
- The name of the missing propertypublic void configure(LenskitConfiguration config) throws RecommenderConfigurationException
Run this script against an existing configuration.
RecommenderConfigurationException
- if an error occurs.public LenskitConfiguration configure() throws RecommenderConfigurationException
Run this script and produce a new configuration.
RecommenderConfigurationException
- if an error occurs.