Package org.drools.rule

Examples of org.drools.rule.PackageCompilationData


        final Map globals = pkg.getGlobals();
        final Set imports = pkg.getImports();

        // First update the binary files
        // @todo: this probably has issues if you add classes in the incorrect order - functions, rules, invokers.
        final PackageCompilationData compilationData = pkg.getPackageCompilationData();
        final PackageCompilationData newCompilationData = newPkg.getPackageCompilationData();
        final String[] files = newCompilationData.list();
        for ( int i = 0, length = files.length; i < length; i++ ) {
            compilationData.write( files[i],
                                   newCompilationData.read( files[i] ) );
        }

        // Merge imports
        imports.addAll( newPkg.getImports() );

        // Add invokers
        compilationData.putAllInvokers( newCompilationData.getInvokers() );

        if ( compilationData.isDirty() ) {
            if ( this.reloadPackageCompilationData == null ) {
                this.reloadPackageCompilationData = new ReloadPackageCompilationData();
            }
View Full Code Here


                lock();
                doUnlock = true;
            }
            this.removalsSinceLock++;

            PackageCompilationData compilationData = null;

            removeRule( pkg,
                        rule );
            compilationData = pkg.removeRule( rule );
            if ( this.reloadPackageCompilationData == null ) {
View Full Code Here

            }

            this.eventSupport.fireBeforeFunctionRemoved( pkg,
                                                         functionName );

            final PackageCompilationData compilationData = pkg.removeFunction( functionName );
            if ( compilationData == null ) {
                throw new IllegalArgumentException( "function name '" + packageName + "' does not exist in the Package '" + packageName + "'." );
            }

            if ( this.reloadPackageCompilationData == null ) {
View Full Code Here

            this.set.add( packageCompilationData );
        }

        public void execute(final InternalRuleBase ruleBase) {
            for ( final Iterator it = this.set.iterator(); it.hasNext(); ) {
                final PackageCompilationData packageCompilationData = (PackageCompilationData) it.next();
                packageCompilationData.reload();
            }
        }
View Full Code Here

TOP

Related Classes of org.drools.rule.PackageCompilationData

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.