Examples of KieComponentFactory


Examples of org.drools.core.reteoo.KieComponentFactory

                                                                            DEFAULT_PHREAK ? RuleEngineOption.PHREAK.toString() : RuleEngineOption.RETEOO.toString())
                                                               .equalsIgnoreCase(RuleEngineOption.PHREAK.toString())));
        setDeclarativeAgendaEnabled( Boolean.valueOf( this.chainedProperties.getProperty( DeclarativeAgendaOption.PROPERTY_NAME,
                                                                                          "false" ) ) );       

        this.componentFactory = new KieComponentFactory();

    }
View Full Code Here

Examples of org.drools.core.reteoo.KieComponentFactory

                                                                            DEFAULT_PHREAK ? RuleEngineOption.PHREAK.toString() : RuleEngineOption.RETEOO.toString())
                                                               .equalsIgnoreCase(RuleEngineOption.PHREAK.toString())));
        setDeclarativeAgendaEnabled( Boolean.valueOf( this.chainedProperties.getProperty( DeclarativeAgendaOption.PROPERTY_NAME,
                                                                                          "false" ) ) );       

        this.componentFactory = new KieComponentFactory();

    }
View Full Code Here

Examples of org.drools.core.reteoo.KieComponentFactory

    private transient ReteooRuleBase ruleBase;


    public static void setMode(VirtualPropertyMode newMode, KnowledgeBase kBase) {
        RuleBase ruleBase = ((KnowledgeBaseImpl) kBase).getRuleBase();
        KieComponentFactory rcf = ((ReteooRuleBase) ruleBase).getConfiguration().getComponentFactory();
        ClassBuilderFactory cbf = rcf.getClassBuilderFactory();
        rcf.getTraitFactory().mode = newMode;
        switch (newMode) {
            case MAP:
                cbf.setPropertyWrapperBuilder(new TraitMapPropertyWrapperClassBuilderImpl());
                cbf.setTraitProxyBuilder(new TraitMapProxyClassBuilderImpl());
                break;
View Full Code Here

Examples of org.drools.core.reteoo.KieComponentFactory

        }

        String proxyName = getProxyName( tdef, cdef );
        String wrapperName = getPropertyWrapperName( tdef, cdef );

        KieComponentFactory rcf = ruleBase.getConfiguration().getComponentFactory();


        TraitPropertyWrapperClassBuilder propWrapperBuilder = (TraitPropertyWrapperClassBuilder) rcf.getClassBuilderFactory().getPropertyWrapperBuilder();
        propWrapperBuilder.init( tdef, ruleBase.getTraitRegistry() );
        try {
            byte[] propWrapper = propWrapperBuilder.buildClass( cdef );
            ruleBase.registerAndLoadTypeDefinition( wrapperName, propWrapper );
        } catch (Exception e) {
            e.printStackTrace();
        }


        TraitProxyClassBuilder proxyBuilder = (TraitProxyClassBuilder) rcf.getClassBuilderFactory().getTraitProxyBuilder();
        proxyBuilder.init( tdef, rcf.getBaseTraitProxyClass(), ruleBase.getTraitRegistry() );
        try {
            byte[] proxy = proxyBuilder.buildClass( cdef );
            ruleBase.registerAndLoadTypeDefinition( proxyName, proxy );
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.