Changeset 37188


Ignore:
Timestamp:
2023-01-28T13:27:39+13:00 (15 months ago)
Author:
kjdon
Message:

added a -webswing argument to Gatherer, so its knows if its webswing, in the same way it knows if its using remote gs

Location:
main/trunk/gli/src/org/greenstone/gatherer
Files:
4 edited

Legend:

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

    r36229 r37188  
    6969  static final public String CONFIG_XML_3 = "config3.xml";
    7070  static final public String CONFIG_REMOTE_XML = "configRemote.xml";
    71 
     71    static final public String CONFIG_WEBSWING_XML = "configWebswing.xml";
    7272    static final public String TEMPLATE_CONFIG_PREFIX = "xml/";
    7373     static final public String FEDORA_CONFIG_PREFIX = "fedora-";
     
    641641    String gli_title = getString("GLI.Title", GENERAL_SETTING);
    642642    String title = (gli_title=="") ? Gatherer.PROGRAM_NAME : gli_title;
    643 
     643    if (Gatherer.isWebswing) {
     644        title += " (webswing)";
     645    }
    644646    return title;
    645647    }
  • main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r36229 r37188  
    128128    static public boolean isGsdlRemote = false;
    129129    static public boolean isLocalLibrary = false;
     130    static public boolean isWebswing = false;
    130131
    131132    // for storing the original proxy settings on GLI startup   
     
    213214            setCollectDirectoryPath(getGLIUserDirectoryPath() + "collect" + File.separator);
    214215        }
     216        if (go.webswing) {
     217            isWebswing = true;
     218        }
    215219        // We have a local Greenstone. OR we have a gs2build folder inside
    216220        // the client-GLI folder (with which the Download panel becomes enabled)
     
    238242                System.err.println("Warning: Unable to make directory: " + collect_directory);
    239243            }
     244        }
     245        else if (isWebswing) {
     246            Configuration.config_xml = Configuration.CONFIG_WEBSWING_XML;
    240247        }
    241248        else {     
     
    415422                Configuration.setString("general.library_url", true, library_url_string);
    416423            }
    417             else { // local greenstone: add shutdown hooks to forcibly stop the server on irregular termination
     424            else if(!isWebswing) { // local greenstone: add shutdown hooks to forcibly stop the server on irregular termination
    418425                // And start up the local library server, if that's what we want
     426                /// but we don't need to do this if we are webswing.
    419427
    420428                // The Java virtual machine shuts down in response to two kinds of events:
  • main/trunk/gli/src/org/greenstone/gatherer/GetOpt.java

    r36091 r37188  
    4040    public boolean no_load = false;
    4141    public boolean use_remote_greenstone = false;
     42    public boolean webswing = false;
    4243    public boolean new_set = false;
    4344    public boolean run_gsdl3 = false;
     
    153154            //Use a remote Greenstone
    154155            }
     156            // We are running inside webswing
     157            else if (argument_name.equals(StaticStrings.WEBSWING_ARGUMENT)) {
     158            webswing = true;
     159            }
    155160            else if (argument_name.equals(StaticStrings.GSDL3_ARGUMENT)){
    156161            //Use a remote Greenstone3
  • main/trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java

    r36262 r37188  
    287287    static final public String USE_METADATA_FILES_ARGUMENT = "use_metadata_files";
    288288    static final public String USE_REMOTE_GREENSTONE_ARGUMENT = "-use_remote_greenstone";
     289    static final public String WEBSWING_ARGUMENT = "-webswing";
    289290    static final public String URL_SEPARATOR_CHARACTER = "/";
    290291    static final public String VALUE_ATTRIBUTE = "value";
Note: See TracChangeset for help on using the changeset viewer.