From: erickson Date: Tue, 20 Nov 2007 17:07:12 +0000 (+0000) Subject: added an optional idlPath param to init plus some docs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=50135fd238cfc89855101967a6fa6139cfbfe058;p=Evergreen.git added an optional idlPath param to init plus some docs git-svn-id: svn://svn.open-ils.org/ILS/trunk@8097 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/java/org/open_ils/Sys.java b/Open-ILS/src/java/org/open_ils/Sys.java index ad93a92741..0d66edca88 100644 --- a/Open-ILS/src/java/org/open_ils/Sys.java +++ b/Open-ILS/src/java/org/open_ils/Sys.java @@ -15,6 +15,19 @@ public class Sys { private static IDLParser idlParser = null; + /** + * Initializes the connection to the OpenSRF network and parses the IDL file. + * @param attrs A map of configuration attributes. Options include:
+ * + */ public static void init(Map attrs) throws ConfigException, SessionException, IOException, IDLException { String configFile = attrs.get("configFile"); @@ -23,6 +36,7 @@ public class Sys { String logFile = attrs.get("logFile"); String logLevel = attrs.get("logLevel"); String syslogFacility = attrs.get("syslogFacility"); + String idlFile = attrs.get("idlFile"); if(idlParser != null) { @@ -42,10 +56,11 @@ public class Sys { /** connect to the opensrf network. */ org.opensrf.Sys.bootstrapClient(configFile, configContext); - /** Grab the IDL file setting */ - SettingsClient client = SettingsClient.instance(); - String idlFile = client.getString("/IDL"); - + /** Grab the IDL file setting if not explicitly provided */ + if(idlFile == null) { + SettingsClient client = SettingsClient.instance(); + idlFile = client.getString("/IDL"); + } /** Parse the IDL if necessary */ idlParser = new IDLParser(idlFile);