org.jboss.dna.repository.util
Class JcrExecutionContext

java.lang.Object
  extended by org.jboss.dna.graph.ExecutionContext
      extended by org.jboss.dna.repository.util.JcrExecutionContext
All Implemented Interfaces:
Cloneable, ClassLoaderFactory

public class JcrExecutionContext
extends ExecutionContext

The context of an execution within a JCR environment.

Author:
Randall Hauch

Constructor Summary
JcrExecutionContext(ExecutionContext context, SessionFactory sessionFactory, String repositoryWorkspaceForNamespaceRegistry)
           
JcrExecutionContext(SessionFactory sessionFactory, String repositoryWorkspaceForNamespaceRegistry)
           
 
Method Summary
 JcrExecutionContext clone()
          
 void close()
          This this context and release all resources (including any Session instances created).
 SessionFactory getSessionFactory()
          Get the session factory, which can be used to obtain sessions temporarily for this context.
 JcrTools getTools()
          Get a set of utilities for working with JCR.
 
Methods inherited from class org.jboss.dna.graph.ExecutionContext
create, create, getAccessControlContext, getClassLoader, getLogger, getLogger, getLoginContext, getMimeTypeDetector, getNamespaceRegistry, getPropertyFactory, getSubject, getValueFactories, toString, with, with, with, with, with, with, with
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JcrExecutionContext

public JcrExecutionContext(ExecutionContext context,
                           SessionFactory sessionFactory,
                           String repositoryWorkspaceForNamespaceRegistry)

JcrExecutionContext

public JcrExecutionContext(SessionFactory sessionFactory,
                           String repositoryWorkspaceForNamespaceRegistry)
Method Detail

getSessionFactory

public SessionFactory getSessionFactory()
Get the session factory, which can be used to obtain sessions temporarily for this context. Any session obtained from this factory should be closed before the execution finishes.

Returns:
the session factory

getTools

public JcrTools getTools()
Get a set of utilities for working with JCR.

Returns:
the tools

clone

public JcrExecutionContext clone()

Overrides:
clone in class ExecutionContext
See Also:
ExecutionContext.clone()

close

public void close()
This this context and release all resources (including any Session instances created).



Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.