consciouscode.seedling.config
Class StandardConfigLayer
java.lang.Object
consciouscode.seedling.config.StandardConfigLayer
- All Implemented Interfaces:
- ConfigLayer
- Direct Known Subclasses:
- MockConfigLayer
public class StandardConfigLayer
- extends Object
- implements ConfigLayer
A ConfigLayer
that reads resources from a ResourceTree
,
using a ConfigLoader
.
StandardConfigLayer
public StandardConfigLayer(ResourceTree resources,
ConfigLoader loader)
StandardConfigLayer
protected StandardConfigLayer()
getResourceTree
public ResourceTree getResourceTree()
getConfigLoader
public ConfigLoader getConfigLoader()
getConfigResources
public Iterable<ConfigResource> getConfigResources(NodeReference nodeRef)
throws ConfigurationException
- Description copied from interface:
ConfigLayer
- Finds all configuration resources in this layer that are relevant to a
specified node.
- Specified by:
getConfigResources
in interface ConfigLayer
- Parameters:
nodeRef
- identifies the desired node.
- Returns:
- a sequence of resources, highest priority first.
Neither the returned
Iterable
nor any of its entries may be
null
.
- Throws:
ConfigurationException
- if there's a problem loading the
relevant configuration resources.
collectNodeNames
public void collectNodeNames(String branchPath,
Collection<String> names)
- Specified by:
collectNodeNames
in interface ConfigLayer
- Parameters:
branchPath
- must be an absolute path.
getResourceUrl
public URL getResourceUrl(String path)
toString
public String toString()
- Overrides:
toString
in class Object
loadConfig
protected ConfigResource loadConfig(NodePath configPath)
throws ConfigLoadingException
- Throws:
ConfigLoadingException
loadImplicitBranchConfig
protected ConfigResource loadImplicitBranchConfig(NodePath configPath)
Copyright © 2001–2012
Todd V. Jonker. All Rights Reserved.