Package org.drools.repository

Examples of org.drools.repository.PackageItem.updateBinaryUpToDate()


        handler.storeAssetContent( asset,
                                   repoAsset );

        if ( !(asset.getMetaData().getFormat().equals( AssetFormats.TEST_SCENARIO )) || asset.getMetaData().getFormat().equals( AssetFormats.ENUMERATION ) ) {
            PackageItem pkg = repoAsset.getPackage();
            pkg.updateBinaryUpToDate( false );
            RuleBaseCache.getInstance().remove( pkg.getUUID() );
        }
        repoAsset.checkin( asset.getCheckinComment() );

        return repoAsset.getUUID();
View Full Code Here


        serviceSecurity.checkSecurityIsPackageAdminWithAdminType();

        AssetItem asset = getRulesRepository().loadAssetByUUID( uuid );

        PackageItem packageItem = asset.getPackage();
        packageItem.updateBinaryUpToDate( false );

        asset.remove();

        getRulesRepository().save();
        push( "packageChange",
View Full Code Here

        rule1.updateContent( "Junk" );
        rule1.checkin( "" );

        RuleBaseCache.getInstance().clearCache();
        pkg.updateBinaryUpToDate( false );
        repo.save();
        res = repositoryPackageService.runScenario( pkg.getName(),
                                                    sc ).result;
        assertNotNull( res.getErrors() );
        assertNull( res.getScenario() );
View Full Code Here

        AssetItem assetItem = packageItem.addAsset( "temp",
                                                    "" );

        assertNotNull( packageItem.getName() );
        packageItem.updateBinaryUpToDate( true );
        assertTrue( packageItem.isBinaryUpToDate() );

        serviceImplementation.deleteUncheckedRule( assetItem.getUUID() );

        PackageItem reloadedPackage = serviceImplementation.getRulesRepository().loadPackage( packageItem.getName() );
View Full Code Here

        AssetItem asset = pkg.addAsset( "MyModel",
                                        "" );
        asset.updateFormat( AssetFormats.MODEL );
        asset.checkin( "" );

        pkg.updateBinaryUpToDate( true );
        repo.save();

        assertTrue( pkg.isBinaryUpToDate() );
        assertEquals( "",
                      DroolsHeader.getDroolsHeader( pkg ) );
View Full Code Here

        AssetItem asset = pkg.addAsset( "MyModel",
                                        "" );
        asset.updateFormat( AssetFormats.MODEL );
        asset.checkin( "" );

        pkg.updateBinaryUpToDate( true );
        repo.save();

        assertTrue( pkg.isBinaryUpToDate() );
        assertEquals( "",
                      ServiceImplementation.getDroolsHeader( pkg ) );
View Full Code Here

                item );

        item.updateExternalURI( data.getExternalURI() );
        item.updateDescription( data.getDescription() );
        item.archiveItem( data.isArchived() );
        item.updateBinaryUpToDate( false );
        if(!data.getFormat().equals("")) {
            item.updateFormat(data.getFormat());
        }
        RuleBaseCache.getInstance().remove( data.getUuid() );
        item.checkin( data.getDescription() );
View Full Code Here

            //Throws RulesRepositoryException if the package or asset does not exist
            AssetItem ai = repository.loadPackage(packageName).loadAsset( assetName );
            PackageItem packageItem = ai.getPackage();
            // assetService.archiveAsset(ai.getUUID());
            assetService.removeAsset(ai.getUUID());
            packageItem.updateBinaryUpToDate(false);
            repository.save();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

                        e);
            }

            item.archiveItem(archive);
            PackageItem pkg = item.getPackage();
            pkg.updateBinaryUpToDate(false);
            RuleBaseCache.getInstance().remove(pkg.getUUID());
            if (archive) {
                item.checkin("archived");
            } else {
                item.checkin("unarchived");
View Full Code Here

        rule1.updateContent( "Junk" );
        rule1.checkin( "" );

        impl.ruleBaseCache.clear();
        pkg.updateBinaryUpToDate( false );
        repo.save();
        res = impl.runScenario( pkg.getName(),
                                sc ).result;
        assertNotNull( res.errors );
        assertNull( res.scenario );
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.