Search in sources :

Example 1 with ParameterUtilities

use of org.drools.workbench.screens.dtablexls.backend.server.conversion.builders.ParameterUtilities in project drools-wb by kiegroup.

the class GuidedDecisionTableGeneratorListener method initRuleTable.

/**
 * This gets called each time a "new" rule table is found.
 */
private void initRuleTable(final int row, final int column, final String value) {
    preInitRuleTable(row, column, value);
    this._isInRuleTable = true;
    this._actions = new HashMap<Integer, ActionType>();
    this._ruleStartColumn = column;
    this._ruleEndColumn = column;
    this._ruleStartRow = row;
    this._ruleRow = row + LABEL_ROW + 1;
    this._isNewDataRow = false;
    // setup stuff for the rules to come.. (the order of these steps are important !)
    this._currentSequentialFlag = getSequentialFlag();
    this._currentEscapeQuotesFlag = getEscapeQuotesFlag();
    this._parameterUtilities = new ParameterUtilities();
    // Setup new Decision Table
    this._dtable = new GuidedDecisionTable52();
    this._dtable.setTableFormat(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY);
    this._dtable.setTableName(RuleSheetParserUtil.getRuleName(value));
    this._dtable.setPackageName(_dmo.getPackageName());
    this._sourceBuilders = new ArrayList<GuidedDecisionTableSourceBuilder>();
    ROW_NUMBER_BUILDER.clearValues();
    DEFAULT_DESCRIPTION_BUILDER.clearValues();
    this._sourceBuilders.add(ROW_NUMBER_COLUMN_INDEX, ROW_NUMBER_BUILDER);
    this._sourceBuilders.add(DESCRIPTION_COLUMN_INDEX, DEFAULT_DESCRIPTION_BUILDER);
    postInitRuleTable(row, column, value);
}
Also used : ActionType(org.drools.decisiontable.parser.ActionType) ParameterUtilities(org.drools.workbench.screens.dtablexls.backend.server.conversion.builders.ParameterUtilities) GuidedDecisionTable52(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52) GuidedDecisionTableSourceBuilder(org.drools.workbench.screens.dtablexls.backend.server.conversion.builders.GuidedDecisionTableSourceBuilder)

Aggregations

ActionType (org.drools.decisiontable.parser.ActionType)1 GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)1 GuidedDecisionTableSourceBuilder (org.drools.workbench.screens.dtablexls.backend.server.conversion.builders.GuidedDecisionTableSourceBuilder)1 ParameterUtilities (org.drools.workbench.screens.dtablexls.backend.server.conversion.builders.ParameterUtilities)1