Coinjema
1.7

org.coinjema.context.source
Interface ContextSource

All Known Implementing Classes:
FileContextSource, JdbcContextSource

public interface ContextSource

A context source has to supply a means of retrieving context scripts for creating dependency objects. It has a name which is strictly relative to its parent context, and it knows how to find all its child contexts. For instance, a FileContextSource implementation returns the name of the last directory in the path as its name, returns its subdirectories as its children, and can provide a FileInputStream given a filename.

Author:
mstover

Method Summary
 String getName()
          The relative name of this context.
 Resource getResource(String resourceName)
           
 Resource getResource(String resourceName, String extension)
          A more optimized way to find a specific resource if the caller knows the extension (resource type).
 Collection<ContextSource> getSubContexts()
          Retrieve a collection of direct subcontexts of this context.
 

Method Detail

getSubContexts

Collection<ContextSource> getSubContexts()
Retrieve a collection of direct subcontexts of this context.

Returns:

getName

String getName()
The relative name of this context. The name of this context without the parent context names attached. If the context is file based, this would be the name of the last directory in the path.

Returns:

getResource

Resource getResource(String resourceName)

getResource

Resource getResource(String resourceName,
                     String extension)
A more optimized way to find a specific resource if the caller knows the extension (resource type).

Parameters:
resourceName -
extension -
Returns:

Coinjema
1.7

Public Domain Software.