Package org.drools.repository

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


                moduleItem );

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


           if ( packageMetadata != null ) {
               existingModuleItem.archiveItem(packageMetadata.isArchived());
               checkinComment = packageMetadata.getCheckinComment();
           }

            existingModuleItem.updateBinaryUpToDate(false);
            existingModuleItem.checkin(checkinComment);
            rulesRepository.save();
       } catch (JAXBException e) {
           throw new WebApplicationException(e);
       } catch (RuntimeException e) {
View Full Code Here

            }
           
            existingModuleItem.updateDescription(module.getDescription());
           
            /* TODO: add more updates to package item from JSON */
            existingModuleItem.updateBinaryUpToDate(false);
            existingModuleItem.checkin(module.getMetadata().getCheckinComment());
            rulesRepository.save();
        } catch (RuntimeException e) {
            throw new WebApplicationException(e);
        }
View Full Code Here

                ai.updateState(assetMetadata.getState());
            }
            ai.updateValid(assetValidator.validate(ai));
            if (AssetFormats.affectsBinaryUpToDate(ai.getFormat())) {
                ModuleItem pkg = ai.getModule();
                pkg.updateBinaryUpToDate(false);
                RuleBaseCache.getInstance().remove(pkg.getUUID());
            }
            ai.checkin("Check-in (summary): " + assetEntry.getSummary());
            rulesRepository.save();
        } catch (JAXBException e) {
View Full Code Here

            ai.updateTitle(asset.getTitle());
            ai.updateDescription(asset.getDescription());
            ai.updateValid(assetValidator.validate(ai));
            if (AssetFormats.affectsBinaryUpToDate(ai.getFormat())) {
                ModuleItem pkg = ai.getModule();
                pkg.updateBinaryUpToDate(false);
                RuleBaseCache.getInstance().remove(pkg.getUUID());
            }
            ai.checkin(asset.getMetadata().getCheckInComment());
            rulesRepository.save();
        } catch (RuntimeException e) {
View Full Code Here

            asset.checkout();
            asset.updateContent(content);
            asset.updateValid(assetValidator.validate(asset));
            if (AssetFormats.affectsBinaryUpToDate(asset.getFormat())) {
                ModuleItem pkg = asset.getModule();
                pkg.updateBinaryUpToDate(false);
                RuleBaseCache.getInstance().remove(pkg.getUUID());
            }
            asset.checkin("Updated asset source from REST interface");
            rulesRepository.save();
        } catch (RuntimeException e) {
View Full Code Here

            asset.checkout();
            asset.updateBinaryContentAttachment(is);
            asset.updateValid(assetValidator.validate(asset));
            if (AssetFormats.affectsBinaryUpToDate(asset.getFormat())) {
                ModuleItem pkg = asset.getModule();
                pkg.updateBinaryUpToDate(false);
                RuleBaseCache.getInstance().remove(pkg.getUUID());
            }
            asset.checkin("Update binary");
            rulesRepository.save();
        } catch (RuntimeException e) {
View Full Code Here

            //Throws RulesRepositoryException if the package or asset does not exist
            AssetItem ai = rulesRepository.loadModule(packageName).loadAsset( assetName );
            ModuleItem module = ai.getModule();
            // assetService.archiveAsset(ai.getUUID());
            repositoryAssetService.removeAsset(ai.getUUID());
            module.updateBinaryUpToDate(false);
            rulesRepository.save();
        } catch (RuntimeException e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

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

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

        assertTrue(pkg.isBinaryUpToDate());
        assertEquals("",
                DroolsHeader.getDroolsHeader(pkg));
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.