From 5047cbeb6d5fe283ec88b2aba1f6f50163b2f3cb Mon Sep 17 00:00:00 2001
From: Alan Beccati <beccati@rasdaman.com>
Date: Tue, 22 Oct 2013 14:34:45 +0200
Subject: [PATCH] ticket:487 included rasadmin credentials in config manager
---
.../petascope/nbproject/genfiles.properties | 4 ++--
.../src/main/java/petascope/ConfigManager.java | 22 +++++++++++++++-----
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/applications/petascope/nbproject/genfiles.properties b/applications/petascope/nbproject/genfiles.properties
index 7393f13..e195df1 100644
a
|
b
|
build.xml.script.CRC32=f0883b4d
|
3 | 3 | build.xml.stylesheet.CRC32=651128d4@1.36.1.1 |
4 | 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. |
5 | 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. |
6 | | nbproject/build-impl.xml.data.CRC32=7fefaa6d |
7 | | nbproject/build-impl.xml.script.CRC32=00f94193 |
| 6 | nbproject/build-impl.xml.data.CRC32=eb40e283 |
| 7 | nbproject/build-impl.xml.script.CRC32=d807bd6b |
8 | 8 | nbproject/build-impl.xml.stylesheet.CRC32=4e9cae83@1.38.1.1 |
diff --git a/applications/petascope/src/main/java/petascope/ConfigManager.java b/applications/petascope/src/main/java/petascope/ConfigManager.java
index d3c2cae..858172a 100644
a
|
b
|
import petascope.wps.server.WpsServer;
|
42 | 42 | /** |
43 | 43 | * Configuration Manager class: a single entry point for all server settings. |
44 | 44 | * Implements the singleton design pattern. |
45 | | * |
| 45 | * |
| 46 | * Note (AB): Although this class implements the singleton pattern, it offers |
| 47 | * public static members that come pre-initialized, allowing use of values that |
| 48 | * are not provided by the configuration file without getting an instance. These |
| 49 | * should be made private and only the get method on the unique instance allowed |
| 50 | * |
46 | 51 | * @author Andrei Aiordachioaie |
47 | 52 | * @author Dimitar Misev |
48 | 53 | */ |
… |
… |
public class ConfigManager {
|
86 | 91 | public static String RASDAMAN_DATABASE = "RASBASE"; |
87 | 92 | public static String RASDAMAN_USER = "rasguest"; |
88 | 93 | public static String RASDAMAN_PASS = "rasguest"; |
| 94 | public static String RASDAMAN_ADMIN_USER = "rasadmin"; |
| 95 | public static String RASDAMAN_ADMIN_PASS = "rasadmin"; |
89 | 96 | public static String RASDAMAN_VERSION = "8"; |
90 | 97 | |
91 | 98 | //Time in seconds between each re-connect attempt |
… |
… |
public class ConfigManager {
|
142 | 149 | private static final String KEY_RASDAMAN_URL = "rasdaman_url"; |
143 | 150 | private static final String KEY_RASDAMAN_USER = "rasdaman_user"; |
144 | 151 | private static final String KEY_RASDAMAN_PASS = "rasdaman_pass"; |
| 152 | private static final String KEY_RASDAMAN_ADMIN_USER = "rasdaman_admin_user"; |
| 153 | private static final String KEY_RASDAMAN_ADMIN_PASS = "rasdaman_admin_pass"; |
145 | 154 | private static final String KEY_RASDAMAN_VERSION = "rasdaman_version"; |
146 | 155 | private static final String KEY_METADATA_DRIVER = "metadata_driver"; |
147 | 156 | private static final String KEY_METADATA_URL = "metadata_url"; |
… |
… |
public class ConfigManager {
|
257 | 266 | RASDAMAN_URL = get(KEY_RASDAMAN_URL); |
258 | 267 | RASDAMAN_USER = get(KEY_RASDAMAN_USER); |
259 | 268 | RASDAMAN_PASS = get(KEY_RASDAMAN_PASS); |
| 269 | RASDAMAN_ADMIN_USER = get(KEY_RASDAMAN_ADMIN_USER); |
| 270 | RASDAMAN_ADMIN_PASS = get(KEY_RASDAMAN_ADMIN_PASS); |
260 | 271 | RASDAMAN_VERSION = get(KEY_RASDAMAN_VERSION); |
261 | 272 | METADATA_DRIVER = get(KEY_METADATA_DRIVER); |
262 | 273 | METADATA_URL = get(KEY_METADATA_URL); |
… |
… |
public class ConfigManager {
|
299 | 310 | log.info("Metadata Username: " + METADATA_USER); |
300 | 311 | log.info(""); |
301 | 312 | log.info(" *** RASDAMAN *** "); |
302 | | log.info("Rasdaman URL : " + RASDAMAN_URL); |
303 | | log.info("Rasdaman DB : " + RASDAMAN_DATABASE); |
304 | | log.info("Rasdaman user : " + RASDAMAN_USER); |
305 | | log.info("Rasdaman version : " + RASDAMAN_VERSION); |
| 313 | log.info("Rasdaman URL : " + RASDAMAN_URL); |
| 314 | log.info("Rasdaman DB : " + RASDAMAN_DATABASE); |
| 315 | log.info("Rasdaman user : " + RASDAMAN_USER); |
| 316 | log.info("Rasdaman version : " + RASDAMAN_VERSION); |
| 317 | log.info("Rasdaman admin user : " + RASDAMAN_ADMIN_USER); |
306 | 318 | log.info(""); |
307 | 319 | log.info(" *** SECORE *** "); |
308 | 320 | log.info("SECORE URL : " + SECORE_URLS); |