use of org.drools.workbench.screens.dtablexls.backend.server.conversion.builders.GuidedDecisionTableNoLoopBuilder in project drools-wb by kiegroup.
the class GuidedDecisionTableGeneratorListener method doActionTypeCell.
private void doActionTypeCell(final int row, final int column, final String trimVal) {
_ruleEndColumn = column;
ActionType.addNewActionType(this._actions, trimVal, column, row);
final ActionType actionType = getActionForColumn(row, column);
GuidedDecisionTableSourceBuilder sb = null;
switch(actionType.getCode()) {
case CONDITION:
case ACTION:
// SourceBuilders for ACTIONs are set when processing the Object row
break;
case NAME:
sb = new GuidedDecisionTableNameBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case DESCRIPTION:
// Remove default Description Column builder and add that provided
this._sourceBuilders.remove(DEFAULT_DESCRIPTION_BUILDER);
sb = new GuidedDecisionTableDescriptionBuilder(row - 1, column, this._conversionResult);
// Description column must always be at position 1
this._sourceBuilders.add(DESCRIPTION_COLUMN_INDEX, sb);
actionType.setSourceBuilder(sb);
break;
case SALIENCE:
sb = new GuidedDecisionTableSalienceBuilder(row - 1, column, this._currentSequentialFlag, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case DURATION:
sb = new GuidedDecisionTableDurationBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case TIMER:
sb = new GuidedDecisionTableTimerBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case CALENDARS:
sb = new GuidedDecisionTableCalendarsBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case NOLOOP:
sb = new GuidedDecisionTableNoLoopBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case LOCKONACTIVE:
sb = new GuidedDecisionTableLockonActiveBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case AUTOFOCUS:
sb = new GuidedDecisionTableAutoFocusBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case ACTIVATIONGROUP:
sb = new GuidedDecisionTableActivationGroupBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case AGENDAGROUP:
sb = new GuidedDecisionTableAgendaGroupBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case RULEFLOWGROUP:
sb = new GuidedDecisionTableRuleflowGroupBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case DATEEFFECTIVE:
sb = new GuidedDecisionTableDateEffectiveBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case DATEEXPIRES:
sb = new GuidedDecisionTableDateExpiresBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
case METADATA:
sb = new GuidedDecisionTableMetadataBuilder(row - 1, column, this._conversionResult);
actionType.setSourceBuilder(sb);
this._sourceBuilders.add(sb);
break;
}
}
Aggregations