Package org.kie.api.runtime.rule

Examples of org.kie.api.runtime.rule.AccumulateFunction


    }

    private void processAccumulateFunctions(PackageRegistry pkgRegistry,
                                            PackageDescr packageDescr) {
        for (final AccumulateImportDescr aid : packageDescr.getAccumulateImports() ) {
            AccumulateFunction af = loadAccumulateFunction(pkgRegistry,
                                                           aid.getFunctionName(),
                                                           aid.getTarget());
            pkgRegistry.getPackage().addAccumulateFunction(aid.getFunctionName(), af);
        }
    }
View Full Code Here


        int index = 0;
        Pattern pattern = (Pattern) context.getBuildStack().peek();
        for ( AccumulateFunctionCallDescr fc : funcCalls ) {
            // find the corresponding function
            AccumulateFunction function = context.getConfiguration().getAccumulateFunction( fc.getFunction() );
            if( function == null ) {
                // might have been imported in the package
                function = context.getPackageBuilder().getPackage().getAccumulateFunctions().get(fc.getFunction());
            }
            if ( function == null ) {
View Full Code Here

        int index = 0;
        Pattern pattern = (Pattern) context.getBuildStack().peek();
        for ( AccumulateFunctionCallDescr func : functions ) {
            // build an external function executor
            AccumulateFunction function = context.getConfiguration().getAccumulateFunction( func.getFunction() );
            if( function == null ) {
                // might have been imported in the package
                function = context.getPackageBuilder().getPackage().getAccumulateFunctions().get(func.getFunction());
            }
            if ( function == null ) {
View Full Code Here

            return getDefaultDialect();
        } else if ( name.equals( DefaultPackageNameOption.PROPERTY_NAME ) ) {
            return getDefaultPackageName();
        } else if ( name.startsWith( AccumulateFunctionOption.PROPERTY_NAME ) ) {
            int index = AccumulateFunctionOption.PROPERTY_NAME.length();
            AccumulateFunction function = this.accumulateFunctions.get( name.substring( index ) );
            return function != null ? function.getClass().getName() : null;
        } else if ( name.startsWith( EvaluatorOption.PROPERTY_NAME ) ) {
            String key = name.substring( name.lastIndexOf( '.' ) + 1 );
            EvaluatorDefinition evalDef = this.evaluatorRegistry.getEvaluatorDefinition( key );
            return evalDef != null ? evalDef.getClass().getName() : null;
        } else if ( name.equals( DumpDirOption.PROPERTY_NAME ) ) {
View Full Code Here

    }

    private void processAccumulateFunctions(PackageRegistry pkgRegistry,
            PackageDescr packageDescr) {
        for (final AccumulateImportDescr aid : packageDescr.getAccumulateImports() ) {
            AccumulateFunction af = loadAccumulateFunction( pkgRegistry,
                    aid.getFunctionName(),
                    aid.getTarget() );
            pkgRegistry.getPackage().addAccumulateFunction(aid.getFunctionName(), af);
        }
    }
View Full Code Here

    }

    private void processAccumulateFunctions(PackageRegistry pkgRegistry,
                                            PackageDescr packageDescr) {
        for (final AccumulateImportDescr aid : packageDescr.getAccumulateImports() ) {
            AccumulateFunction af = loadAccumulateFunction(pkgRegistry,
                                                           aid.getFunctionName(),
                                                           aid.getTarget());
            pkgRegistry.getPackage().addAccumulateFunction(aid.getFunctionName(), af);
        }
    }
View Full Code Here

        int index = 0;
        Pattern pattern = (Pattern) context.getBuildStack().peek();
        for ( AccumulateFunctionCallDescr fc : funcCalls ) {
            // find the corresponding function
            AccumulateFunction function = context.getConfiguration().getAccumulateFunction( fc.getFunction() );
            if ( function == null ) {
                context.addError( new DescrBuildError( accumDescr,
                                                              context.getRuleDescr(),
                                                              null,
                                                              "Unknown accumulate function: '" + fc.getFunction() + "' on rule '" + context.getRuleDescr().getName() + "'. All accumulate functions must be registered before building a resource." ) );
View Full Code Here

            return getDefaultDialect();
        } else if ( name.equals( DefaultPackageNameOption.PROPERTY_NAME ) ) {
            return getDefaultPackageName();
        } else if ( name.startsWith( AccumulateFunctionOption.PROPERTY_NAME ) ) {
            int index = AccumulateFunctionOption.PROPERTY_NAME.length();
            AccumulateFunction function = this.accumulateFunctions.get( name.substring( index ) );
            return function != null ? function.getClass().getName() : null;
        } else if ( name.startsWith( EvaluatorOption.PROPERTY_NAME ) ) {
            String key = name.substring( name.lastIndexOf( '.' ) + 1 );
            EvaluatorDefinition evalDef = this.evaluatorRegistry.getEvaluatorDefinition( key );
            return evalDef != null ? evalDef.getClass().getName() : null;
        } else if ( name.equals( DumpDirOption.PROPERTY_NAME ) ) {
View Full Code Here

        int index = 0;
        Pattern pattern = (Pattern) context.getBuildStack().peek();
        for ( AccumulateFunctionCallDescr func : functions ) {
            // build an external function executor
            AccumulateFunction function = context.getConfiguration().getAccumulateFunction( func.getFunction() );
            if ( function == null ) {
                context.addError( new DescrBuildError( accumDescr,
                                                              context.getRuleDescr(),
                                                              null,
                                                              "Unknown accumulate function: '" + func.getFunction() + "' on rule '" + context.getRuleDescr().getName()
View Full Code Here

            return getDefaultDialect();
        } else if ( name.equals( DefaultPackageNameOption.PROPERTY_NAME ) ) {
            return getDefaultPackageName();
        } else if ( name.startsWith( AccumulateFunctionOption.PROPERTY_NAME ) ) {
            int index = AccumulateFunctionOption.PROPERTY_NAME.length();
            AccumulateFunction function = this.accumulateFunctions.get( name.substring( index ) );
            return function != null ? function.getClass().getName() : null;
        } else if ( name.startsWith( EvaluatorOption.PROPERTY_NAME ) ) {
            String key = name.substring( name.lastIndexOf( '.' ) + 1 );
            EvaluatorDefinition evalDef = this.evaluatorRegistry.getEvaluatorDefinition( key );
            return evalDef != null ? evalDef.getClass().getName() : null;
        } else if ( name.equals( DumpDirOption.PROPERTY_NAME ) ) {
View Full Code Here

TOP

Related Classes of org.kie.api.runtime.rule.AccumulateFunction

Copyright © 2018 www.massapicom. 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.