Ticket #487: 0001-ticket-487-included-rasadmin-credentials-in-config-m.patch

File 0001-ticket-487-included-rasadmin-credentials-in-config-m.patch, 4.5 KB (added by abeccati, 11 years ago)

re-updated to current master

  • applications/petascope/nbproject/genfiles.properties

    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  
    33build.xml.stylesheet.CRC32=651128d4@1.36.1.1
    44# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    55# 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
     6nbproject/build-impl.xml.data.CRC32=eb40e283
     7nbproject/build-impl.xml.script.CRC32=d807bd6b
    88nbproject/build-impl.xml.stylesheet.CRC32=4e9cae83@1.38.1.1
  • applications/petascope/src/main/java/petascope/ConfigManager.java

    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;  
    4242/**
    4343 * Configuration Manager class: a single entry point for all server settings.
    4444 * 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 *
    4651 * @author Andrei Aiordachioaie
    4752 * @author Dimitar Misev
    4853 */
    public class ConfigManager {  
    8691    public static String RASDAMAN_DATABASE = "RASBASE";
    8792    public static String RASDAMAN_USER = "rasguest";
    8893    public static String RASDAMAN_PASS = "rasguest";
     94    public static String RASDAMAN_ADMIN_USER = "rasadmin";
     95    public static String RASDAMAN_ADMIN_PASS = "rasadmin";
    8996    public static String RASDAMAN_VERSION = "8";
    9097   
    9198    //Time in seconds between each re-connect attempt
    public class ConfigManager {  
    142149    private static final String KEY_RASDAMAN_URL = "rasdaman_url";
    143150    private static final String KEY_RASDAMAN_USER = "rasdaman_user";
    144151    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";
    145154    private static final String KEY_RASDAMAN_VERSION = "rasdaman_version";
    146155    private static final String KEY_METADATA_DRIVER = "metadata_driver";
    147156    private static final String KEY_METADATA_URL = "metadata_url";
    public class ConfigManager {  
    257266        RASDAMAN_URL            = get(KEY_RASDAMAN_URL);
    258267        RASDAMAN_USER           = get(KEY_RASDAMAN_USER);
    259268        RASDAMAN_PASS           = get(KEY_RASDAMAN_PASS);
     269        RASDAMAN_ADMIN_USER     = get(KEY_RASDAMAN_ADMIN_USER);
     270        RASDAMAN_ADMIN_PASS     = get(KEY_RASDAMAN_ADMIN_PASS);
    260271        RASDAMAN_VERSION        = get(KEY_RASDAMAN_VERSION);
    261272        METADATA_DRIVER         = get(KEY_METADATA_DRIVER);
    262273        METADATA_URL            = get(KEY_METADATA_URL);
    public class ConfigManager {  
    299310        log.info("Metadata Username: " + METADATA_USER);
    300311        log.info("");
    301312        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);
    306318        log.info("");
    307319        log.info("       *** SECORE ***       ");
    308320        log.info("SECORE URL       : " + SECORE_URLS);