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

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

loads admin credentials from properties

  • applications/petascope/nbproject/genfiles.properties

    From aba1088229bc1bb60f59a3026e5d27ff949e6911 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     |   20 +++++++++++++++-----
     2 files changed, 17 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 cf4d35c..ad046c0 100644
    a b import petascope.wps.server.WpsServer;  
    3838/**
    3939 * Configuration Manager class: a single entry point for all server settings.
    4040 * Implements the singleton design pattern.
    41  *
     41 *
     42 * Note (AB): Although this class implements the singleton pattern, it offers
     43 * public static members that come pre-initialized, allowing use of values that
     44 * are not provided by the configuration file without getting an instance. These
     45 * should be made private and only the get method on the unique instance allowed
     46 *
    4247 * @author Andrei Aiordachioaie
    4348 * @author Dimitar Misev
    4449 */
    public class ConfigManager {  
    8287    public static String RASDAMAN_DATABASE = "RASBASE";
    8388    public static String RASDAMAN_USER = "rasguest";
    8489    public static String RASDAMAN_PASS = "rasguest";
     90    public static String RASDAMAN_ADMIN_USER = "rasadmin";
     91    public static String RASDAMAN_ADMIN_PASS = "rasadmin";
    8592    public static String RASDAMAN_VERSION = "8";
    8693
    8794    // XML validation schema control setting
    public class ConfigManager {  
    233240        RASDAMAN_URL = get("rasdaman_url");
    234241        RASDAMAN_USER = get("rasdaman_user");
    235242        RASDAMAN_PASS = get("rasdaman_pass");
     243        RASDAMAN_ADMIN_USER = get("rasdaman_admin_user");
     244        RASDAMAN_ADMIN_PASS = get("rasdaman_admin_pass");
    236245        RASDAMAN_VERSION = get("rasdaman_version");
    237246        METADATA_DRIVER = get("metadata_driver");
    238247        METADATA_URL = get("metadata_url");
    public class ConfigManager {  
    274283        log.info("Metadata Username: " + METADATA_USER);
    275284        log.info("");
    276285        log.info("       *** RASDAMAN ***       ");
    277         log.info("Rasdaman URL     : " + RASDAMAN_URL);
    278         log.info("Rasdaman DB      : " + RASDAMAN_DATABASE);
    279         log.info("Rasdaman user    : " + RASDAMAN_USER);
    280         log.info("Rasdaman version : " + RASDAMAN_VERSION);
     286        log.info("Rasdaman URL        : " + RASDAMAN_URL);
     287        log.info("Rasdaman DB         : " + RASDAMAN_DATABASE);
     288        log.info("Rasdaman user       : " + RASDAMAN_USER);
     289        log.info("Rasdaman version    : " + RASDAMAN_VERSION);
     290        log.info("Rasdaman admin user : " + RASDAMAN_ADMIN_USER);
    281291        log.info("");
    282292        log.info("       *** WCS-T ***       ");
    283293        log.info("WCS-T Language: " + WCST_LANGUAGE);