Package org.drools.repository

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


                                String[] selectedModules,
                                String[] unselectedModules) {
        for ( String moduleName : selectedModules ) {
            ModuleItem module = rulesRepository.loadModule( moduleName );
            module.addWorkspace( workspace );
            module.checkin( "Add workspace" );
        }
        for ( String moduleName : unselectedModules ) {
            ModuleItem module = rulesRepository.loadModule( moduleName );
            module.removeWorkspace( workspace );
            module.checkin( "Remove workspace" );
View Full Code Here


            module.checkin( "Add workspace" );
        }
        for ( String moduleName : unselectedModules ) {
            ModuleItem module = rulesRepository.loadModule( moduleName );
            module.removeWorkspace( workspace );
            module.checkin( "Remove workspace" );
        }
    }

    /**
     * This will create a new asset. It will be saved, but not checked in. The
View Full Code Here

    @LoggedIn
    public void updateDependency(String uuid,
                                 String dependencyPath) {
        ModuleItem item = rulesRepository.loadModuleByUUID(uuid);
        item.updateDependency(dependencyPath);
        item.checkin("Update dependency");
    }

    public String[] getDependencies(String uuid) {
        ModuleItem item = rulesRepository.loadModuleByUUID(uuid);
        return item.getDependencies();
View Full Code Here

        moduleItem.updateBinaryUpToDate( false );
        if(!data.getFormat().equals("")) {
            moduleItem.updateFormat(data.getFormat());
        }
        RuleBaseCache.getInstance().remove( data.getUuid() );
        moduleItem.checkin( data.getDescription() );

        // If module is archived, archive all the assets under it
        if ( data.isArchived() ) {
            handleArchivedForSaveModule( data,
                    moduleItem );
View Full Code Here

                 * p.updateState(stateExtension.getSimpleExtension
                 * (Translator.STATE)); }
                 */
            }

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

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

                throw new UnsupportedOperationException( "Can't nest packages." );
            }
            if ( rulesRepository.containsModule( path[1] ) ) {
                ModuleItem pkg = loadPackageFromRepository( path[1] );
                pkg.archiveItem( false );
                pkg.checkin( "restored by webdav" );
            } else {
                rulesRepository.createModule( path[1],
                                              "from webdav" );
            }
        } else {
View Full Code Here

                item.archiveItem( true );
                item.checkin( "" );
            } else {
                //delete package
                packageItem.archiveItem( true );
                packageItem.checkin( "" );
            }
        } else if ( isGlobalAreas( path ) ) {
            if ( path.length == 2 ) {
                //delete asset
                if ( path[1].startsWith( "._" ) ) {
View Full Code Here

            }
        }

        DroolsHeader.updateDroolsHeader( header.toString(),
                                         pkg );
        pkg.checkin( "Imports setup automatically on model import." );

    }

    public void onAttachmentRemoved(AssetItem item) throws IOException {
View Full Code Here

        }

        DroolsHeader.updateDroolsHeader( header.toString(),
                                                  pkg );

        pkg.checkin( "Imports removed automatically on model archiving." );

    }

    private StringBuilder removeImportIfItExists(StringBuilder header,
                                                 String importLine) {
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.