Ignore:
Timestamp:
2004-01-27T16:35:34+13:00 (20 years ago)
Author:
jmt12
Message:

More modifications to mirroring including testing for a valid version of Wget (and complaining if its missing or it is old) and rearranging buttons on the GProgressBar

File:
1 edited

Legend:

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

    r6593 r6622  
    102102    /** The screen size of the desktop the Gatherer will be displayed on. */
    103103    public Dimension screen_size = Toolkit.getDefaultToolkit().getScreenSize();
     104
     105    /** If true, overrides the mirroring enabled setting in the config.xml file. */
     106    private boolean mirroring_enabled = false;
    104107    /** Collection level configuration (which in some cases overrides general configuration. */
    105108    private Document collection_config;
     
    112115    private int cache_hit = 0;
    113116    private int cache_miss = 0;
     117
     118    private String wget_path = null;
     119    private String wget_version_str = StaticStrings.NO_WGET_STR;
     120
    114121    public URL exec_address = null;
    115122
     
    119126     * @param perl_path The path to the PERL executable, as a <strong>String</strong>.
    120127     */
    121     public Configuration(String gsdl_path, String exec_path, String perl_path) {
     128    public Configuration(String gsdl_path, String exec_path, String perl_path, boolean mirroring_enabled, String wget_version_str, String wget_path) {
    122129    super();
    123130    this.gsdl_path = gsdl_path;
    124131    this.exec_path = exec_path;
     132    this.mirroring_enabled = mirroring_enabled;
     133    this.wget_version_str = wget_version_str;
     134    this.wget_path = wget_path;
     135
    125136    // The exec_path may contain an url address, in which case we blindly use that and leave it up to the user to worry about settings and resetting.
    126137    Gatherer.println("EXEC_PATH = " + exec_path);
     
    256267    /** The default get action retrieves the named property from the desired configuration, and returns a true or false. */
    257268    public boolean get(String property, boolean general) {
     269    if(general && mirroring_enabled && property.equals(StaticStrings.WORKFLOW_MIRROR)) {
     270        return mirroring_enabled;
     271    }
    258272    String raw = getString(property, general);
    259273    return (raw != null && raw.equalsIgnoreCase("true"));
     
    574588
    575589    public String getWGetPath() {
    576     return "/usr/bin/wget";
     590    return wget_path;
     591    }
     592
     593    public String getWGetVersion() {
     594    return wget_version_str;
    577595    }
    578596
Note: See TracChangeset for help on using the changeset viewer.