From d8a508c55ea9f682892ccc23a1f1b2b36bc95a4f Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 7 Nov 2005 14:42:46 +0000 Subject: [PATCH] * Implement getDbProperties() for db.properties introspection. * Implement getDbSource(). --- src/helma/framework/core/ApplicationBean.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/helma/framework/core/ApplicationBean.java b/src/helma/framework/core/ApplicationBean.java index 43ee7345..297cd091 100644 --- a/src/helma/framework/core/ApplicationBean.java +++ b/src/helma/framework/core/ApplicationBean.java @@ -17,6 +17,7 @@ package helma.framework.core; import helma.objectmodel.INode; +import helma.objectmodel.db.DbSource; import helma.util.CronJob; import helma.util.SystemMap; import helma.util.WrappedMap; @@ -391,9 +392,9 @@ public class ApplicationBean implements Serializable { } /** + * Get a wrapper around the app's properties * - * - * @return ... + * @return a readonly wrapper around the application's app properties */ public Map getProperties() { if (properties == null) { @@ -402,6 +403,22 @@ public class ApplicationBean implements Serializable { return properties; } + /** + * Get a wrapper around the app's db properties + * + * @return a readonly wrapper around the application's db properties + */ + public Map getDbProperties() { + return new WrappedMap(app.getDbProperties(), true); + } + + /** + * Return a DbSource object for a given name. + */ + public DbSource getDbSource(String name) { + return app.getDbSource(name); + } + /** * *