org.drools.guvnor.server.util
Class TestEnvironmentSessionHelper

java.lang.Object
  extended by org.drools.guvnor.server.util.TestEnvironmentSessionHelper

public class TestEnvironmentSessionHelper
extends Object

This is only to be used for testing, eg in hosted mode, or unit tests. This is deliberately in the src/main path.


Constructor Summary
TestEnvironmentSessionHelper()
           
 
Method Summary
static javax.jcr.Session getSession()
           
static javax.jcr.Session getSession(boolean erase)
           
static javax.jcr.Session getSessionFor(String userName)
          Uses the given user name.
static void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestEnvironmentSessionHelper

public TestEnvironmentSessionHelper()
Method Detail

getSession

public static javax.jcr.Session getSession()

getSession

public static javax.jcr.Session getSession(boolean erase)

getSessionFor

public static javax.jcr.Session getSessionFor(String userName)
                                       throws javax.jcr.RepositoryException
Uses the given user name.

Throws:
javax.jcr.RepositoryException

shutdown

public static void shutdown()


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.