public class SpreadsheetCompiler extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
Constructor and Description |
---|
SpreadsheetCompiler() |
Modifier and Type | Method and Description |
---|---|
String |
compile(boolean showPackage,
InputStream xlsStream,
InputType type)
Generates DRL from the input stream containing the spreadsheet.
|
String |
compile(InputStream xlsStream,
InputType type)
Generates DRL from the input stream containing the spreadsheet.
|
String |
compile(InputStream xlsStream,
InputType type,
RuleSheetListener listener)
Generates DRL from the input stream containing the spreadsheet.
|
String |
compile(InputStream stream,
String worksheetName)
Looks for a named worksheet to find the decision tables on.
|
String |
compile(org.kie.api.io.Resource resource,
InputType type) |
String |
compile(org.kie.api.io.Resource resource,
InputType type,
RuleSheetListener listener) |
String |
compile(org.kie.api.io.Resource resource,
String worksheetName) |
String |
compile(String classPathResource,
InputType inputType)
Convenience implementation, taking rules from the classpath.
|
String |
listenerToString(RuleSheetListener listener) |
public String compile(boolean showPackage, InputStream xlsStream, InputType type)
showPackage
- tells it to print or not print any package statements in the spreadsheet.xlsStream
- The stream to the spreadsheet. Uses the first worksheet found
for the decision tables, ignores others.public String compile(InputStream xlsStream, InputType type)
xlsStream
- The stream to the spreadsheet. Uses the first worksheet found
for the decision tables, ignores others.public String compile(InputStream xlsStream, InputType type, RuleSheetListener listener)
xlsStream
- The stream to the spreadsheet. Uses the first worksheet found
for the decision tables, ignores others.type
- The type of the file - InputType.CSV or InputType.XLSlistener
- public String compile(org.kie.api.io.Resource resource, InputType type, RuleSheetListener listener)
public String listenerToString(RuleSheetListener listener)
public String compile(String classPathResource, InputType inputType)
classPathResource
- full class path to the spreadsheet you wish to convert to DRL.
Uses the first worksheet for the decision tables.public String compile(InputStream stream, String worksheetName)
stream
- The stream of the decision tables (spreadsheet) IN XLS format !!worksheetName
- The name of the worksheet that the decision tables live on.Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.