Search in sources :

Example 6 with ResourceReference

use of org.kie.workbench.common.services.refactoring.ResourceReference in project drools-wb by kiegroup.

the class GuidedRuleTemplateIndexVisitor method visitConnectiveConstraint.

private void visitConnectiveConstraint(final ConnectiveConstraint cc) {
    ResourceReference resRef = addResourceReference(getFullyQualifiedClassName(cc.getFactType()), ResourceType.JAVA);
    resRef.addPartReference(cc.getFieldName(), PartType.FIELD);
    addResourceReference(getFullyQualifiedClassName(cc.getFieldType()), ResourceType.JAVA);
}
Also used : ResourceReference(org.kie.workbench.common.services.refactoring.ResourceReference)

Example 7 with ResourceReference

use of org.kie.workbench.common.services.refactoring.ResourceReference in project drools-wb by kiegroup.

the class GuidedRuleTemplateIndexVisitor method visitSingleFieldConstraint.

private void visitSingleFieldConstraint(final SingleFieldConstraint sfc) {
    ResourceReference resRef = addResourceReference(getFullyQualifiedClassName(sfc.getFactType()), ResourceType.JAVA);
    resRef.addPartReference(sfc.getFieldName(), PartType.FIELD);
    addResourceReference(getFullyQualifiedClassName(sfc.getFieldType()), ResourceType.JAVA);
    if (sfc.getConnectives() != null) {
        for (int i = 0; i < sfc.getConnectives().length; i++) {
            visit(sfc.getConnectives()[i]);
        }
    }
}
Also used : ResourceReference(org.kie.workbench.common.services.refactoring.ResourceReference) ConnectiveConstraint(org.drools.workbench.models.datamodel.rule.ConnectiveConstraint) CompositeFieldConstraint(org.drools.workbench.models.datamodel.rule.CompositeFieldConstraint) SingleFieldConstraint(org.drools.workbench.models.datamodel.rule.SingleFieldConstraint) FieldConstraint(org.drools.workbench.models.datamodel.rule.FieldConstraint)

Aggregations

ResourceReference (org.kie.workbench.common.services.refactoring.ResourceReference)7 Map (java.util.Map)1 CompositeFieldConstraint (org.drools.workbench.models.datamodel.rule.CompositeFieldConstraint)1 ConnectiveConstraint (org.drools.workbench.models.datamodel.rule.ConnectiveConstraint)1 FieldConstraint (org.drools.workbench.models.datamodel.rule.FieldConstraint)1 SingleFieldConstraint (org.drools.workbench.models.datamodel.rule.SingleFieldConstraint)1 Characteristic (org.drools.workbench.models.guided.scorecard.shared.Characteristic)1 FactData (org.drools.workbench.models.testscenarios.shared.FactData)1 Field (org.drools.workbench.models.testscenarios.shared.Field)1 Fixture (org.drools.workbench.models.testscenarios.shared.Fixture)1 FixtureList (org.drools.workbench.models.testscenarios.shared.FixtureList)1 FixturesMap (org.drools.workbench.models.testscenarios.shared.FixturesMap)1 VerifyFact (org.drools.workbench.models.testscenarios.shared.VerifyFact)1 VerifyField (org.drools.workbench.models.testscenarios.shared.VerifyField)1 VerifyRuleFired (org.drools.workbench.models.testscenarios.shared.VerifyRuleFired)1 Imports (org.kie.soup.project.datamodel.imports.Imports)1 ModelField (org.kie.soup.project.datamodel.oracle.ModelField)1