[hieos~subversion:362] Added "com.vangent.hieos.xconfig" system property capability.
- From: adeolaO@kenai.com
- To: commits@hieos.kenai.com
- Subject: [hieos~subversion:362] Added "com.vangent.hieos.xconfig" system property capability.
- Date: Mon, 25 Jan 2010 23:01:42 +0000
Project: hieos
Repository: subversion
Revision: 362
Author: adeolaO
Date: 2010-01-25 23:01:39 UTC
Link:
Log Message:
------------
Added "com.vangent.hieos.xconfig" system property capability.
Revisions:
----------
362
Modified Paths:
---------------
trunk/src/xutil/src/com/vangent/hieos/xutil/xconfig/XConfig.java
Diffs:
------
Index: trunk/src/xutil/src/com/vangent/hieos/xutil/xconfig/XConfig.java
===================================================================
--- trunk/src/xutil/src/com/vangent/hieos/xutil/xconfig/XConfig.java
(revision 361)
+++ trunk/src/xutil/src/com/vangent/hieos/xutil/xconfig/XConfig.java
(revision 362)
@@ -11,7 +11,7 @@
* limitations under the License.
*/
- /*
+/*
* XConfig.java
*
* Created on January 14, 2009
@@ -43,12 +43,11 @@
*
*/
public class XConfig {
+
private final static Logger logger = Logger.getLogger(XConfig.class);
-
// Location of XDS.b / XCA configuration file (looks in environment
variable first.
static private String _configURL =
"http://localhost:8080/xref/config/xconfig.xml";
static XConfig _instance = null; // Singleton instance.
-
// Internal data structure starts here.
private XConfigHomeCommunity homeCommunity = null;
private HashMap respondingGateways = new HashMap(); // Key =
homeCommunityId, Value = XConfigGateway
@@ -56,7 +55,7 @@
private HashMap repositories = new HashMap(); // Key =
repository unique id, XConfigRepository
private HashMap assigningAuthorities = new HashMap(); // Key = AA
unique ID, XConfigAssigningAuthority
private XConfigXUAProperties xuaProperties = null;
-
+
/**
* Returns Singleton instance of XConfig.
*
@@ -228,8 +227,12 @@
*/
private void loadConfiguration() throws XdsInternalException {
- // Look for environment variable first.
- String configLocation = System.getenv("HIEOSxConfigFile");
+ // First see if a system property is set.
+ String configLocation =
System.getProperty("com.vangent.hieos.xconfig");
+ if (configLocation == null) {
+ // Look in environment variable next.
+ configLocation = System.getenv("HIEOSxConfigFile");
+ }
String configXML = null;
if (configLocation != null) {
try {
@@ -374,8 +377,7 @@
* @param propKey
* @return
*/
- public String getXUAProperty(String propKey)
- {
+ public String getXUAProperty(String propKey) {
return this.xuaProperties.getProperty(propKey);
}
@@ -384,8 +386,7 @@
* @param propKey
* @return
*/
- public boolean getXUAPropertyAsBoolean(String propKey)
- {
+ public boolean getXUAPropertyAsBoolean(String propKey) {
return this.xuaProperties.getPropertyAsBoolean(propKey);
}
@@ -393,8 +394,7 @@
*
* @return
*/
- public XConfigXUAProperties getXUAConfigProperties()
- {
+ public XConfigXUAProperties getXUAConfigProperties() {
return this.xuaProperties;
}
|
[hieos~subversion:362] Added "com.vangent.hieos.xconfig" system property capability. |
adeolaO | 01/25/2010 |





