Package org.drools.repository

Examples of org.drools.repository.JackrabbitRepositoryConfigurator


                  System.out.println("DELETE test repo dir: " + repoDir.getAbsolutePath());
                  RepositorySessionUtil.deleteDir( repoDir );
                  System.out.println("TEST repo dir deleted.");
              }

              JCRRepositoryConfigurator config = new JackrabbitRepositoryConfigurator();
                String home = System.getProperty("guvnor.repository.dir");
              repository = config.getJCRRepository(home);

              Session testSession = repository.login(new SimpleCredentials("alan_parsons", "password".toCharArray()));

              RulesRepositoryAdministrator admin = new RulesRepositoryAdministrator(testSession);
              if (erase && admin.isRepositoryInitialized()) {
                  admin.clearRulesRepository( );
              }
              config.setupRulesRepository( testSession );
              PrintWriter out = new PrintWriter(new FileOutputStream("/tmp/pepe.txt"));
        //dump(testSession.getRootNode(), out);
//              OutputStream out = new FileOutputStream("/tmp/pepe.txt");
//              testSession.exportSystemView("/", out, true, false);
        out.close();
View Full Code Here


                  System.out.println("DELETE test repo dir: " + repoDir.getAbsolutePath());
                  RepositorySessionUtil.deleteDir( repoDir );
                  System.out.println("TEST repo dir deleted.");
              }

              JCRRepositoryConfigurator config = new JackrabbitRepositoryConfigurator();
                String home = System.getProperty("guvnor.repository.dir");
              repository = config.getJCRRepository(home);

              Session testSession = repository.login(new SimpleCredentials("alan_parsons", "password".toCharArray()));

              RulesRepositoryAdministrator admin = new RulesRepositoryAdministrator(testSession);
              if (erase && admin.isRepositoryInitialized()) {
                  admin.clearRulesRepository( );
              }
              config.setupRulesRepository( testSession );
              File file = File.createTempFile( "pete", "txt" );
              file.deleteOnExit();
              PrintWriter out = new PrintWriter(new FileOutputStream(file));
        //dump(testSession.getRootNode(), out);
//              OutputStream out = new FileOutputStream("/tmp/pepe.txt");
View Full Code Here

                  System.out.println("DELETE test repo dir: " + repoDir.getAbsolutePath());
                  RepositorySessionUtil.deleteDir( repoDir );
                  System.out.println("TEST repo dir deleted.");
              }

              JCRRepositoryConfigurator config = new JackrabbitRepositoryConfigurator();
                String home = System.getProperty("guvnor.repository.dir");
              repository = config.getJCRRepository(home);

              Session testSession = repository.login(
                                                                       new SimpleCredentials("alan_parsons", "password".toCharArray()));

              RulesRepositoryAdministrator admin = new RulesRepositoryAdministrator(testSession);
              if (erase && admin.isRepositoryInitialized()) {

                  admin.clearRulesRepository( );
              }
              config.setupRulesRepository( testSession );
              return testSession;
          } else {
              return repository.login(
                               new SimpleCredentials("alan_parsons", "password".toCharArray()));
          }
View Full Code Here

TOP

Related Classes of org.drools.repository.JackrabbitRepositoryConfigurator

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.