Changeset 6622 for trunk/gli/src/org/greenstone/gatherer/Configuration.java
- Timestamp:
- 2004-01-27T16:35:34+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Configuration.java
r6593 r6622 102 102 /** The screen size of the desktop the Gatherer will be displayed on. */ 103 103 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; 104 107 /** Collection level configuration (which in some cases overrides general configuration. */ 105 108 private Document collection_config; … … 112 115 private int cache_hit = 0; 113 116 private int cache_miss = 0; 117 118 private String wget_path = null; 119 private String wget_version_str = StaticStrings.NO_WGET_STR; 120 114 121 public URL exec_address = null; 115 122 … … 119 126 * @param perl_path The path to the PERL executable, as a <strong>String</strong>. 120 127 */ 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) { 122 129 super(); 123 130 this.gsdl_path = gsdl_path; 124 131 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 125 136 // 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. 126 137 Gatherer.println("EXEC_PATH = " + exec_path); … … 256 267 /** The default get action retrieves the named property from the desired configuration, and returns a true or false. */ 257 268 public boolean get(String property, boolean general) { 269 if(general && mirroring_enabled && property.equals(StaticStrings.WORKFLOW_MIRROR)) { 270 return mirroring_enabled; 271 } 258 272 String raw = getString(property, general); 259 273 return (raw != null && raw.equalsIgnoreCase("true")); … … 574 588 575 589 public String getWGetPath() { 576 return "/usr/bin/wget"; 590 return wget_path; 591 } 592 593 public String getWGetVersion() { 594 return wget_version_str; 577 595 } 578 596
Note:
See TracChangeset
for help on using the changeset viewer.