public abstract class AbstractJavascriptFilter<HEADER,TYPE> extends Object
Modifier and Type | Field and Description |
---|---|
protected Bindings |
bindings
javascript bindings
|
static String |
DEFAULT_HEADER_KEY |
Modifier | Constructor and Description |
---|---|
protected |
AbstractJavascriptFilter(File scriptFile,
HEADER header)
constructor using a java.io.File script, compiles the script, puts
'header' in the bindings
|
protected |
AbstractJavascriptFilter(Reader scriptReader,
HEADER header)
Constructor, compiles script, put header in the bindings
|
protected |
AbstractJavascriptFilter(String scriptExpression,
HEADER header)
constructor using a java.lang.String script, compiles the script, puts
'header' in the bindings
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(TYPE record)
Evaluates this predicate on the given argument
|
String |
getHeaderKey()
returns key used for header binding
|
abstract String |
getRecordKey()
returns key used for record binding
|
public static final String DEFAULT_HEADER_KEY
protected Bindings bindings
protected AbstractJavascriptFilter(File scriptFile, HEADER header) throws IOException
IOException
protected AbstractJavascriptFilter(String scriptExpression, HEADER header)
public String getHeaderKey()
public abstract String getRecordKey()
protected boolean accept(TYPE record)
record
- the record to test. It will be inject in the javascript
context using getRecordKey()