org.jboss.dna.graph
Class ExecutionContexts

java.lang.Object
  extended by org.jboss.dna.graph.ExecutionContexts

public class ExecutionContexts
extends Object

Utility methods for creating various execution contexts with replacement factories or components.

Author:
Randall Hauch, John Verhaeg

Constructor Summary
ExecutionContexts()
           
 
Method Summary
static ExecutionContext replace(ExecutionContext context, NameFactory nameFactory)
          Create an context that can be used to replace the supplied context but that uses the supplied name factory.
static ExecutionContext replace(ExecutionContext context, NameFactory nameFactory, PathFactory pathFactory)
          Create an context that can be used to replace the supplied context but that uses the supplied name and path factories.
static ExecutionContext replace(ExecutionContext context, NamespaceRegistry namespaceRegistry)
          Create an context that can be used to replace the supplied context but that uses the supplied namespace registry.
static ExecutionContext replace(ExecutionContext context, PathFactory pathFactory)
          Create an context that can be used to replace the supplied context but that uses the supplied path factory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionContexts

public ExecutionContexts()
Method Detail

replace

public static ExecutionContext replace(ExecutionContext context,
                                       PathFactory pathFactory)
Create an context that can be used to replace the supplied context but that uses the supplied path factory.

Parameters:
context - the base context
pathFactory - the new path factory
Returns:
the new execution context
Throws:
IllegalArgumentException - if the context or factory references are null

replace

public static ExecutionContext replace(ExecutionContext context,
                                       NameFactory nameFactory)
Create an context that can be used to replace the supplied context but that uses the supplied name factory.

Parameters:
context - the base context
nameFactory - the new name factory
Returns:
the new execution context
Throws:
IllegalArgumentException - if the context or factory references are null

replace

public static ExecutionContext replace(ExecutionContext context,
                                       NameFactory nameFactory,
                                       PathFactory pathFactory)
Create an context that can be used to replace the supplied context but that uses the supplied name and path factories.

Parameters:
context - the base context
nameFactory - the new name factory
pathFactory - the new path factory
Returns:
the new execution context
Throws:
IllegalArgumentException - if the context or factory references are null

replace

public static ExecutionContext replace(ExecutionContext context,
                                       NamespaceRegistry namespaceRegistry)
Create an context that can be used to replace the supplied context but that uses the supplied namespace registry.

Parameters:
context - the base context
namespaceRegistry - the new namespace registry
Returns:
the new execution context
Throws:
IllegalArgumentException - if the context or registry references are null


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