Ignore:
Timestamp:
2022-05-31T10:15:53+12:00 (2 years ago)
Author:
kjdon
Message:

I find it annoying when switching between gs2 and 3 that the gli config file (in .gli/config.xml) gets changed back and forth. In the same way we now have configRemote.xml for when we are running remotely, now locally, config.xml gets saved as config2.xml or config3.xml. they use the same config.xml template though. added final static strings for the filenames, and always use these, so only Configuration now contains the actual text strings. made Configuration.CONFIG_XML and Configuration.TEMPLATE_CONFIG_XML lowercase as they are not final Strings, they get changed by Gatherer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r36110 r36229  
    186186        }
    187187
     188                // Are we greenstone 2 or 3?
     189                if (go.gsdl3_path != null && !go.gsdl3_path.equals("")) {
     190                  this.GS3 = true;
     191                  Configuration.config_xml = Configuration.CONFIG_XML_3;
     192        } else {
     193                  go.gsdl3_path = null;
     194                  go.gsdl3_src_path = null;
     195        }
     196               
    188197        // Are we using a remote Greenstone?
    189198        if (go.use_remote_greenstone) {
     
    217226        if (isGsdlRemote) {
    218227            if (go.fedora_info.isActive()) {
    219                 Configuration.TEMPLATE_CONFIG_XML = "xml/" + Configuration.FEDORA_CONFIG_PREFIX + "configRemote.xml";
     228                          Configuration.template_config_xml = Configuration.TEMPLATE_CONFIG_PREFIX + Configuration.FEDORA_CONFIG_PREFIX + Configuration.CONFIG_REMOTE_XML;
    220229            }
    221230            else {
    222                 Configuration.TEMPLATE_CONFIG_XML = "xml/configRemote.xml";
    223             }
    224 
    225             Configuration.CONFIG_XML = "configRemote.xml";
     231                          Configuration.template_config_xml = Configuration.TEMPLATE_CONFIG_PREFIX +  Configuration.CONFIG_REMOTE_XML;
     232            }
     233
     234            Configuration.config_xml = Configuration.CONFIG_REMOTE_XML;
    226235
    227236            File collect_directory = new File(Gatherer.getCollectDirectoryPath());
     
    232241        else {     
    233242            if (go.fedora_info.isActive()) {
    234                 Configuration.TEMPLATE_CONFIG_XML = "xml/" + Configuration.FEDORA_CONFIG_PREFIX + Configuration.CONFIG_XML;
     243                Configuration.template_config_xml = Configuration.TEMPLATE_CONFIG_PREFIX + Configuration.FEDORA_CONFIG_PREFIX + Configuration.config_xml;
    235244            }
    236245            // else, the CONFIG_XML uses the default config file, which is for the local GS server
     
    256265    String site_name, String servlet_path, String collect_directory_path)
    257266    {
    258         if (gsdl3_path != null && !gsdl3_path.equals("")) {
    259             this.GS3 = true;
    260         } else {
    261             gsdl3_path = null;
    262             gsdl3_src_path = null;
    263         }
     267   
    264268
    265269        // Create the debug stream if required
Note: See TracChangeset for help on using the changeset viewer.