org.jboss.dna.repository
Class DnaConfiguration.ConfigurationDefinition

java.lang.Object
  extended by org.jboss.dna.repository.DnaConfiguration.ConfigurationDefinition
Enclosing class:
DnaConfiguration

@Immutable
public static class DnaConfiguration.ConfigurationDefinition
extends Object

Representation of the current configuration content.


Method Summary
 ClassLoaderFactory getClassLoaderFactory()
           
 ExecutionContext getContext()
           
 Path getPath()
          Get the path in the configuration repository where the configuration content may be found
 RepositorySource getRepositorySource()
          Get the repository source where the configuration content may be found
 String getWorkspace()
          Get the name of the workspace used for the configuration repository.
 Graph graph()
          Obtain a graph to this configuration repository.
 DnaConfiguration.ConfigurationDefinition with(ClassLoaderFactory classLoaderFactory)
          Return a copy of this configuration that uses the supplied class loader factory instead of this object's class loader factory.
 DnaConfiguration.ConfigurationDefinition with(Path path)
          Return a copy of this configuration that uses the supplied path instead of this object's path.
 DnaConfiguration.ConfigurationDefinition withWorkspace(String workspace)
          Return a copy of this configuration that uses the supplied workspace name instead of this object's workspace.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRepositorySource

public RepositorySource getRepositorySource()
Get the repository source where the configuration content may be found

Returns:
the source for the configuration repository; never null

getPath

public Path getPath()
Get the path in the configuration repository where the configuration content may be found

Returns:
the path to the configuration content; never null

getWorkspace

public String getWorkspace()
Get the name of the workspace used for the configuration repository.

Returns:
the name of the workspace, or null if the default workspace should be used

getContext

public ExecutionContext getContext()
Returns:
context

getClassLoaderFactory

public ClassLoaderFactory getClassLoaderFactory()
Returns:
classLoaderFactory

with

public DnaConfiguration.ConfigurationDefinition with(Path path)
Return a copy of this configuration that uses the supplied path instead of this object's path.

Parameters:
path - the desired path for the new configuration; if null, then "/" is used
Returns:
the new configuration

withWorkspace

public DnaConfiguration.ConfigurationDefinition withWorkspace(String workspace)
Return a copy of this configuration that uses the supplied workspace name instead of this object's workspace.

Parameters:
workspace - the desired workspace name for the new configuration; if null, then the default workspace will be used
Returns:
the new configuration

with

public DnaConfiguration.ConfigurationDefinition with(ClassLoaderFactory classLoaderFactory)
Return a copy of this configuration that uses the supplied class loader factory instead of this object's class loader factory.

Parameters:
classLoaderFactory - the classloader factory, or null if the default factory should be used
Returns:
the new configuration

graph

public Graph graph()
Obtain a graph to this configuration repository. This method will always return the same graph instance.

Returns:
the graph; never null


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