Search in sources :

Example 1 with Validator

use of org.drools.workbench.screens.guided.dtable.client.widget.Validator in project drools-wb by kiegroup.

the class NewGuidedDecisionTableWizard method setContent.

public void setContent(final Path contextPath, final String baseFileName, final GuidedDecisionTable52.TableFormat tableFormat, final GuidedDecisionTable52.HitPolicy hitPolicy, final AsyncPackageDataModelOracle oracle, final GuidedDecisionTableWizardHandler handler) {
    this.model = new GuidedDecisionTable52();
    this.model.setTableFormat(tableFormat);
    this.model.setHitPolicy(hitPolicy);
    if (GuidedDecisionTable52.HitPolicy.RESOLVED_HIT.equals(hitPolicy)) {
        final MetadataCol52 metadataCol52 = new MetadataCol52();
        metadataCol52.setMetadata(GuidedDecisionTable52.HitPolicy.RESOLVED_HIT_METADATA_NAME);
        this.model.getMetadataCols().add(metadataCol52);
    }
    this.contextPath = contextPath;
    this.oracle = oracle;
    this.handler = handler;
    final Validator validator = new Validator(model.getConditions());
    for (WizardPage page : pages) {
        final AbstractGuidedDecisionTableWizardPage dtp = (AbstractGuidedDecisionTableWizardPage) page;
        dtp.setContent(contextPath, baseFileName, tableFormat, hitPolicy, oracle, model, validator);
        dtp.initialise();
    }
}
Also used : MetadataCol52(org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52) GuidedDecisionTable52(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52) AbstractGuidedDecisionTableWizardPage(org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.AbstractGuidedDecisionTableWizardPage) WizardPage(org.uberfire.ext.widgets.core.client.wizards.WizardPage) AbstractGuidedDecisionTableWizardPage(org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.AbstractGuidedDecisionTableWizardPage) Validator(org.drools.workbench.screens.guided.dtable.client.widget.Validator)

Aggregations

GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)1 MetadataCol52 (org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52)1 Validator (org.drools.workbench.screens.guided.dtable.client.widget.Validator)1 AbstractGuidedDecisionTableWizardPage (org.drools.workbench.screens.guided.dtable.client.wizard.table.pages.AbstractGuidedDecisionTableWizardPage)1 WizardPage (org.uberfire.ext.widgets.core.client.wizards.WizardPage)1