Search in sources :

Example 1 with GuidedScoreCardModelVisitor

use of org.drools.workbench.models.guided.scorecard.backend.GuidedScoreCardModelVisitor in project drools-wb by kiegroup.

the class GuidedScoreCardEditorServiceImpl method constructContent.

@Override
protected ScoreCardModelContent constructContent(Path path, Overview overview) {
    final ScoreCardModel model = load(path);
    final PackageDataModelOracle oracle = dataModelService.getDataModel(path);
    final PackageDataModelOracleBaselinePayload dataModel = new PackageDataModelOracleBaselinePayload();
    final GuidedScoreCardModelVisitor visitor = new GuidedScoreCardModelVisitor(model);
    DataModelOracleUtilities.populateDataModel(oracle, dataModel, visitor.getConsumedModelClasses());
    // Signal opening to interested parties
    resourceOpenedEvent.fire(new ResourceOpenedEvent(path, safeSessionInfo));
    return new ScoreCardModelContent(model, overview, dataModel);
}
Also used : ScoreCardModelContent(org.drools.workbench.screens.guided.scorecard.model.ScoreCardModelContent) ScoreCardModel(org.drools.workbench.models.guided.scorecard.shared.ScoreCardModel) PackageDataModelOracleBaselinePayload(org.kie.workbench.common.services.datamodel.model.PackageDataModelOracleBaselinePayload) PackageDataModelOracle(org.kie.soup.project.datamodel.oracle.PackageDataModelOracle) GuidedScoreCardModelVisitor(org.drools.workbench.models.guided.scorecard.backend.GuidedScoreCardModelVisitor) ResourceOpenedEvent(org.uberfire.workbench.events.ResourceOpenedEvent)

Aggregations

GuidedScoreCardModelVisitor (org.drools.workbench.models.guided.scorecard.backend.GuidedScoreCardModelVisitor)1 ScoreCardModel (org.drools.workbench.models.guided.scorecard.shared.ScoreCardModel)1 ScoreCardModelContent (org.drools.workbench.screens.guided.scorecard.model.ScoreCardModelContent)1 PackageDataModelOracle (org.kie.soup.project.datamodel.oracle.PackageDataModelOracle)1 PackageDataModelOracleBaselinePayload (org.kie.workbench.common.services.datamodel.model.PackageDataModelOracleBaselinePayload)1 ResourceOpenedEvent (org.uberfire.workbench.events.ResourceOpenedEvent)1