|
Coinjema 1.7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.coinjema.context.source.JdbcContextSource
public class JdbcContextSource
Retrieves configuration data from a database, given a DataSource from which to get Connection objects. The name of the table to talk to can be given as well. The Database table's structure needs to be as follows: name (string): the name of the context represented by the row. The first context path name is "root". data (long string): script file that represents the configuration data. resource (String): name of the resource (like filename). resource_type (String): type of resource (like file extension). metatypes (String, comma separated) : list of metatypes to apply to the resource.
Constructor Summary | |
---|---|
JdbcContextSource(DataSource db)
|
|
JdbcContextSource(DataSource db,
String table)
|
|
JdbcContextSource(DataSource db,
String table,
String name)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcContextSource(DataSource db)
public JdbcContextSource(DataSource db, String table)
public JdbcContextSource(DataSource db, String table, String name)
Method Detail |
---|
public Collection<ContextSource> getSubContexts()
ContextSource
getSubContexts
in interface ContextSource
public String getName()
ContextSource
getName
in interface ContextSource
public Resource getResource(String resourceName, String extension)
ContextSource
getResource
in interface ContextSource
public Resource getResource(String resourceName)
getResource
in interface ContextSource
|
Coinjema 1.7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |