Package org.drools.repository

Examples of org.drools.repository.RulesRepositoryException


    public byte[] exportPackageFromRepository(String packageName) {
        try {
            return this.repository.exportModuleFromRepository( packageName );
        } catch ( RepositoryException e ) {
            throw new RulesRepositoryException( e );
        } catch ( IOException e ) {
            throw new RulesRepositoryException( e );
        }
    }
View Full Code Here


                MigrateRepository.migrateRuleflows( repository );
            }
            RuleBaseCache.getInstance().clearCache();
        } catch ( RepositoryException e ) {
            e.printStackTrace();
            throw new RulesRepositoryException( e );
        }
    }
View Full Code Here

            if ( MigrateRepository.needsRuleflowMigration( repository ) ) {
                MigrateRepository.migrateRuleflows( repository );
            }
        } catch ( RepositoryException e ) {
            e.printStackTrace();
            throw new RulesRepositoryException( e );
        }
    }
View Full Code Here

        log.info( "USER:" + getCurrentUserName() + " export module [name: " + moduleName + "] " );

        try {
            return rulesRepository.dumpModuleFromRepositoryXml( moduleName );
        } catch (PathNotFoundException e) {
            throw new RulesRepositoryException( e );
        } catch (IOException e) {
            throw new RulesRepositoryException( e );
        } catch (RepositoryException e) {
            throw new RulesRepositoryException( e );
        }
    }
View Full Code Here

     * @param assetName
     * @return a JSR-170 complaint path
     */
    public static String makeJSR170ComplaintName(String assetName) {
        if ( assetName == null || assetName.length() == 0 ) {
            throw new RulesRepositoryException( "An Asset's name cannot be null or empty." );
        }
        assetName = assetName.replaceAll( "[/:/*\\[\\]'\"|]", "_" );
        return assetName;
    }
View Full Code Here

                if (targets == null) targets = new ArrayList<String>();
                permsNode.setProperty(perm, targets.toArray(new String[targets.size()]));
            }
            this.repository.save();
        } catch (RepositoryException e) {
            throw new RulesRepositoryException(e);
        }
    }
View Full Code Here

        }
    }

    public void createUser(String userName) {
        if (!isValideUserName(userName)) {
            throw new RulesRepositoryException("Invalide user name");
        }
        if (containsUser(userName)) {
            throw new RulesRepositoryException("User name [" + userName + "] already exists");
        }
        try {
            Node permsNode = getUserPermissionNode(userName);
            permsNode.remove(); //remove this so we get a fresh set
            permsNode = getUserPermissionNode(userName).addNode("jcr:content", "nt:unstructured");
            this.repository.save();
        } catch (RepositoryException e) {
            throw new RulesRepositoryException(e);
        }
    }
View Full Code Here

                    }
                }
            }
            return result;
        } catch (RepositoryException e) {
            throw new RulesRepositoryException(e);
        }
    }
View Full Code Here

                Node userNode = (Node) users.next();
                listing.put(userNode.getName(), listOfPermTypes(userNode));
            }
            return listing;
        } catch (RepositoryException e) {
            throw new RulesRepositoryException(e);
        }
    }
View Full Code Here

        try {
            Node permsNode = getUserPermissionNode(userName);
            permsNode.getParent().remove(); //remove this so we get a fresh set
        } catch (RepositoryException e) {
            throw new RulesRepositoryException(e);
        }

    }
View Full Code Here

TOP

Related Classes of org.drools.repository.RulesRepositoryException

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.