From 5c1714d855efe96f6339ad0b627a79476e697ac3 Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 11 May 2006 19:20:31 +0000 Subject: [PATCH] * Implement getRepositories() method that returns an array containing the prototype's repositories * Some minor and/or cosmetic changes --- src/helma/framework/core/Prototype.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/helma/framework/core/Prototype.java b/src/helma/framework/core/Prototype.java index e44bd3a9..80dab7ff 100644 --- a/src/helma/framework/core/Prototype.java +++ b/src/helma/framework/core/Prototype.java @@ -207,6 +207,13 @@ public final class Prototype { return resources; } + /** + * Returns an array of repositories containing code for this prototype. + */ + public Repository[] getRepositories() { + return (Repository[]) repositories.toArray(new Repository[repositories.size()]); + } + /** * Get a checksum over this prototype's repositories. This tells us * if any resources were added or removed. @@ -375,7 +382,7 @@ public final class Prototype { /** * Get a map containing this prototype's skins as strings * - * @return + * @return a scriptable skin map */ public Map getScriptableSkinMap() { return new ScriptableSkinMap(new SkinMap()); @@ -385,7 +392,7 @@ public final class Prototype { * Get a map containing this prototype's skins as strings, overloaded by the * skins found in the given skinpath. * - * @return + * @return a scriptable skin map */ public Map getScriptableSkinMap(Object[] skinpath) { return new ScriptableSkinMap(new SkinMap(skinpath)); @@ -543,10 +550,10 @@ public final class Prototype { } private void loadSkinFiles(String skinDir) { - File dir = new File(skinDir.toString(), Prototype.this.getName()); + File dir = new File(skinDir, Prototype.this.getName()); // if directory does not exist use lower case property name if (!dir.isDirectory()) { - dir = new File(skinDir.toString(), Prototype.this.getLowerCaseName()); + dir = new File(skinDir, Prototype.this.getLowerCaseName()); if (!dir.isDirectory()) { return; }