Package org.drools.repository

Examples of org.drools.repository.AssetItem.archiveItem()


        PackageAssembler asm = new PackageAssembler(pkg);
        asm.compile();
        assertTrue(asm.hasErrors());

        rule2.archiveItem(true);
        rule2.checkin("");

        assertTrue(rule2.isArchived());
        asm = new PackageAssembler(pkg);
        asm.compile();
View Full Code Here


                        null);
                return;
            }
            if (packageItem.containsAsset(resource[0])) {
                AssetItem lazarus = packageItem.loadAsset(resource[0]);
                lazarus.archiveItem(false);
            } else {
                AssetItem asset = packageItem.addAsset(resource[0],
                        "");
                asset.updateFormat(resource[1]);
            }
View Full Code Here

                        null);
                return;
            }
            if (packageItem.containsAsset(resource[0])) {
                AssetItem lazarus = packageItem.loadAsset(resource[0]);
                lazarus.archiveItem(false);
            } else {
                AssetItem asset = packageItem.addAsset(resource[0],
                        "");
                asset.updateFormat(resource[1]);
            }
View Full Code Here

                return;
            }
            if ( pkg.containsAsset( resource[0] ) ) {

                AssetItem lazarus = pkg.loadAsset( resource[0] );
                lazarus.archiveItem( false );
                //lazarus.checkin("<from webdav>");
            } else {
                AssetItem asset = pkg.addAsset( resource[0],
                                                "" );
                asset.updateFormat( resource[1] );
View Full Code Here

                    osxDoubleData.remove( uri );
                    return;
                }
                String asset = AssetItem.getAssetNameFromFileName( path[2] )[0];
                AssetItem item = pkg.loadAsset( asset );
                item.archiveItem( true );
                item.checkin( "" );
            } else {
                //delete package
                pkg.archiveItem( true );
                pkg.checkin( "" );
View Full Code Here

                }
            } catch ( IOException e ) {
                log.error( e );
            }

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

        // If package is archived, archive all the assets under it
        if ( data.archived ) {
            for ( Iterator<AssetItem> iter = item.getAssets(); iter.hasNext(); ) {
                AssetItem assetItem = iter.next();
                if ( !assetItem.isArchived() ) {
                    assetItem.archiveItem( true );
                    assetItem.checkin( data.description );
                }
            }
        } else if ( unarchived ) {
            for ( Iterator<AssetItem> iter = item.getAssets(); iter.hasNext(); ) {
View Full Code Here

            for ( Iterator<AssetItem> iter = item.getAssets(); iter.hasNext(); ) {
                AssetItem assetItem = iter.next();
                // Unarchive the assets archived after the package
                // ( == at the same time that the package was archived)
                if ( assetItem.getLastModified().compareTo( packageLastModified ) >= 0 ) {
                    assetItem.archiveItem( false );
                    assetItem.checkin( data.description );
                }
            }
        }
View Full Code Here

        repo.save();

        ContentPackageAssembler asm = new ContentPackageAssembler( pkg );
        assertTrue( asm.hasErrors() );

        rule2.archiveItem( true );
        rule2.checkin( "" );

        assertTrue( rule2.isArchived() );
        asm = new ContentPackageAssembler( pkg );
        assertFalse( asm.hasErrors() );
View Full Code Here

        PackageAssembler asm = new PackageAssembler();
        asm.init(pkg, null);
        asm.compile();
        assertTrue( asm.hasErrors() );

        rule2.archiveItem( true );
        rule2.checkin( "" );

        assertTrue( rule2.isArchived() );
        asm = new PackageAssembler();
        asm.init(pkg, null);
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.