- Timestamp:
- 2008-02-12T16:13:13+13:00 (16 years ago)
- Location:
- gli/trunk/src/org/greenstone/gatherer
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/Configuration.java
r14302 r14974 69 69 /** The name of the general Gatherer configuration file for running with GS3. */ 70 70 static public String GS3_CONFIG_XML = "config3.xml"; 71 static public String FEDORA_CONFIG_PREFIX = "fedora-"; 71 72 72 73 /** The name of the root element of the subtree containing gatherer configuration options. This is required as the document itself may contain several other subtrees of settings (such as in the case of a '.col' file). */ … … 101 102 /** If we are using GLI in Greenstone 3, the path to gsdl3 src directory (== gsdl3 dir)*/ 102 103 static public String gsdl3_src_path = ""; 104 105 static public FedoraInfo fedora_info = null; 106 103 107 /** The path to the PERL executable, up to and including Perl.exe. */ 104 108 static public String perl_path = ""; … … 134 138 * @param site_name The name of the Greenstone 3 site currently in use. 135 139 */ 136 public Configuration(String gli_user_directory_path, String gsdl_path, String gsdl3_path, String gsdl3_src_path, String site_name) 140 public Configuration(String gli_user_directory_path, String gsdl_path, String gsdl3_path, String gsdl3_src_path, String site_name, 141 FedoraInfo fedora_info) 137 142 { 138 143 super(); … … 145 150 this.site_name = site_name; 146 151 152 this.fedora_info = fedora_info; 153 147 154 // Try to load the configuration file from the user specific location 148 155 String config_xml_file_name = CONFIG_XML; … … 151 158 } 152 159 160 if (fedora_info.isActive()) { 161 config_xml_file_name = FEDORA_CONFIG_PREFIX + config_xml_file_name; 162 } 163 153 164 // If the existing user config.xml file isn't recent enough, backup the old version and update it 154 165 File config_xml_file = new File(gli_user_directory_path + config_xml_file_name); 166 155 167 if (config_xml_file != null && config_xml_file.exists()) { 156 168 just_updated_config_xml_file = updateUserConfigXMLFileIfNecessary(config_xml_file); … … 597 609 } 598 610 611 static public String getApplicationTitle() { 612 String gli_title = getString("GLI.Title", GENERAL_SETTING); 613 String title = (gli_title=="") ? Gatherer.PROGRAM_NAME : gli_title; 614 615 return title; 616 } 617 618 599 619 static public String getServletPath() { 600 620 return servlet_path; … … 688 708 File user_config_xml = null; 689 709 String config_xml_name = CONFIG_XML; 710 690 711 if (gsdl3_path!=null) { 691 712 config_xml_name = GS3_CONFIG_XML; 692 713 } 693 714 694 715 if (Gatherer.isGsdlRemote) { 695 716 if (Gatherer.GS3){ … … 699 720 } 700 721 } 722 723 if (fedora_info.isActive()) { 724 config_xml_name = FEDORA_CONFIG_PREFIX + config_xml_name; 725 } 726 701 727 try { 702 728 user_config_xml = new File(gli_user_directory_path + config_xml_name); -
gli/trunk/src/org/greenstone/gatherer/GAuthenticator.java
r14567 r14974 42 42 import java.util.*; 43 43 import javax.swing.*; 44 45 44 46 import org.greenstone.gatherer.gui.GLIButton; 47 45 48 46 49 /** Provides a graphic authenticator for network password requests. … … 75 78 * @see org.greenstone.gatherer.GAuthenticator.RequestFocusListener 76 79 */ 77 protected PasswordAuthentication getPasswordAuthentication( ) {80 protected PasswordAuthentication getPasswordAuthentication(String username_str, String password_str) { 78 81 // Component definition. 79 82 dialog = new JDialog (Gatherer.g_man, Dictionary.get("GAuthenticator.Title"), true); … … 82 85 JPanel content_pane = (JPanel) dialog.getContentPane(); 83 86 JLabel title_label = new JLabel(getMessageString()); 87 84 88 JPanel user_panel = new JPanel(); 85 89 JLabel username_label = new JLabel(Dictionary.get("GAuthenticator.Username")); 86 90 JTextField username = new JTextField(); 87 91 username.setToolTipText(Dictionary.get("GAuthenticator.Username_Tooltip")); 92 if (username_str != null) { 93 username.setText(username_str); 94 } 95 88 96 JPanel password_panel = new JPanel(); 89 97 JLabel password_label = new JLabel(Dictionary.get("GAuthenticator.Password")); … … 91 99 password.setEchoChar('*'); 92 100 password.setToolTipText(Dictionary.get("GAuthenticator.Password_Tooltip")); 101 if (password_str != null) { 102 password.setText(password_str); 103 } 104 93 105 JPanel button_panel = new JPanel(); 94 106 ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip")); … … 134 146 } 135 147 148 protected PasswordAuthentication getPasswordAuthentication() { 149 return getPasswordAuthentication(null,null); 150 } 136 151 137 152 /** This is defined so it can be overridden by subclasses (getRequestingPrompt is final). */ -
gli/trunk/src/org/greenstone/gatherer/Gatherer.java
r14605 r14974 36 36 import javax.swing.plaf.*; 37 37 import javax.swing.text.*; 38 39 38 40 import org.greenstone.gatherer.Configuration; 39 41 import org.greenstone.gatherer.GAuthenticator; 42 import org.greenstone.gatherer.FedoraInfo; 40 43 import org.greenstone.gatherer.collection.CollectionManager; 41 44 import org.greenstone.gatherer.feedback.ActionRecorderDialog; … … 51 54 import org.greenstone.gatherer.gui.URLField; 52 55 import org.greenstone.gatherer.gui.WarningDialog; 56 import org.greenstone.gatherer.gui.FedoraLogin; 53 57 import org.greenstone.gatherer.remote.RemoteGreenstoneServer; 54 58 import org.greenstone.gatherer.util.JarTools; … … 77 81 * change the regex in the gs3-release-maker code and in this message 78 82 */ 79 static final public String PROGRAM_VERSION = " trunk";83 static final public String PROGRAM_VERSION = "1.0"; 80 84 81 85 static private Dimension size = new Dimension(800, 540); … … 186 190 // More special code for running with a remote Greenstone 187 191 if (isGsdlRemote) { 188 Configuration.TEMPLATE_CONFIG_XML = "xml/configRemote.xml"; 192 if (go.fedora_info.isActive()) { 193 Configuration.TEMPLATE_CONFIG_XML = "xml/" + Configuration.FEDORA_CONFIG_PREFIX + "configRemote.xml"; 194 } 195 else { 196 Configuration.TEMPLATE_CONFIG_XML = "xml/configRemote.xml"; 197 } 198 189 199 if (!go.run_gsdl3){ 190 200 Configuration.CONFIG_XML = "configRemote.xml"; … … 198 208 } 199 209 } 200 201 init(go.gsdl_path, go.gsdl3_path, go.gsdl3_src_path, go.local_library_path, go.library_url_string, 210 else { 211 if (go.fedora_info.isActive()) { 212 Configuration.TEMPLATE_CONFIG_XML = "xml/" + Configuration.FEDORA_CONFIG_PREFIX + Configuration.CONFIG_XML; 213 214 } 215 } 216 217 init(go.gsdl_path, go.gsdl3_path, go.gsdl3_src_path, 218 go.fedora_info, 219 go.local_library_path, go.library_url_string, 202 220 go.gliserver_url_string, go.debug, go.perl_path, go.no_load, go.filename, go.site_name, 203 221 go.servlet_path); … … 205 223 206 224 207 public void init(String gsdl_path, String gsdl3_path, String gsdl3_src_path, String local_library_path, 225 public void init(String gsdl_path, String gsdl3_path, String gsdl3_src_path, 226 FedoraInfo fedora_info, 227 String local_library_path, 208 228 String library_url_string, String gliserver_url_string, boolean debug_enabled, 209 229 String perl_path, boolean no_load, String open_collection, … … 245 265 try { 246 266 // Load GLI config file 247 new Configuration(getGLIUserDirectoryPath(), gsdl_path, gsdl3_path, gsdl3_src_path, site_name); 267 new Configuration(getGLIUserDirectoryPath(), gsdl_path, gsdl3_path, gsdl3_src_path, site_name, 268 fedora_info); 248 269 249 270 // Check we know where Perl is … … 278 299 } 279 300 301 if (fedora_info.isActive()) { 302 popupFedoraInfo(); 303 } 304 305 280 306 // Start up the local library server, if that's what we want 281 307 if (Utility.isWindows() && local_library_path != null && !isGsdlRemote && !GS3) { … … 298 324 if (Configuration.library_url == null) { 299 325 missingEXEC(); 326 300 327 if ((Configuration.library_url!=null) && isGsdlRemote && (gliserver_url_string==null)){ 301 328 if (GS3){ 302 329 default_gliserver_url = new URL(Configuration.library_url.toString() + "/cgi-bin/gliserver4gs3.pl"); 303 330 }else{ 304 default_gliserver_url = new URL(Configuration.library_url.toString().substring(0,Configuration.library_url.toString().lastIndexOf("/library")) + "/gliserver.pl"); 331 String default_gliserver_str = ""; 332 String library_url_str = Configuration.library_url.toString(); 333 int cut_pos = library_url_str.lastIndexOf("/library"); 334 335 if (cut_pos>0) { 336 default_gliserver_str = library_url_str.substring(0,cut_pos) + "/gliserver.pl"; 337 } 338 else { 339 cut_pos = library_url_str.lastIndexOf("/"); 340 if (cut_pos>0) { 341 default_gliserver_str = library_url_str.substring(0,cut_pos) + "/gliserver.pl"; 342 } 343 else { 344 default_gliserver_str = library_url_str + "/gliserver.pl"; 345 } 346 } 347 348 default_gliserver_url = new URL(default_gliserver_str); 305 349 } 306 350 missingGLIServer(); … … 327 371 default_gliserver_url = new URL(Configuration.library_url.toString() + "/cgi-bin/gliserver4gs3.pl"); 328 372 }else{ 329 default_gliserver_url = new URL(Configuration.library_url.toString().substring(0,Configuration.library_url.toString().lastIndexOf("/library")) + "/gliserver.pl"); 373 String library_url = Configuration.library_url.toString(); 374 default_gliserver_url = new URL(library_url.substring(0,library_url.lastIndexOf("/library")) + "/gliserver.pl"); 330 375 } 331 376 } … … 787 832 } 788 833 } 834 835 836 837 /** Prints a warning message about a missing library path, which means the final collection cannot be previewed in the Gatherer. 838 */ 839 static private void popupFedoraInfo() { 840 841 FedoraLogin dialog = new FedoraLogin("Fedora Login", false); 842 843 if (Configuration.library_url == null) { 844 845 String library_url_string = dialog.getLibraryURL(); 846 if (!library_url_string.equals("")) { 847 try { 848 Configuration.library_url = new URL(library_url_string); 849 } 850 catch (MalformedURLException exception) { 851 DebugStream.printStackTrace(exception); 852 } 853 } 854 } 855 856 if (dialog.loginRequested()) { 857 858 String hostname = dialog.getHostname(); 859 String port = dialog.getPort(); 860 String username = dialog.getUsername(); 861 String password = dialog.getPassword(); 862 String protocol = dialog.getProtocol(); 863 864 Configuration.fedora_info.setHostname(hostname); 865 Configuration.fedora_info.setPort(port); 866 Configuration.fedora_info.setUsername(username); 867 Configuration.fedora_info.setPassword(password); 868 Configuration.fedora_info.setProtocol(protocol); 869 870 String ping_url_str = protocol + "://" + hostname + ":" + port + "/fedora"; 871 String login_str = username + ":" + password; 872 873 String login_encoding = new sun.misc.BASE64Encoder().encode(login_str.getBytes()); 874 875 876 try { 877 URL ping_url = new URL(ping_url_str); 878 URLConnection uc = ping_url.openConnection(); 879 uc.setRequestProperty ("Authorization", "Basic " + login_encoding); 880 // Attempt to access some content ... 881 InputStream content = (InputStream)uc.getInputStream(); 882 883 } 884 catch (Exception exception) { 885 System.err.println("****"); 886 System.err.println("* Failed to connect to Fedora server."); 887 System.err.println("* Server might not be running, or incorrect username and/or password."); 888 System.err.println("***"); 889 DebugStream.printStackTrace(exception); 890 System.exit(1); 891 } 892 } 893 else { 894 System.exit(0); 895 } 896 897 898 dialog.dispose(); 899 dialog = null; 900 901 902 } 903 789 904 790 905 -
gli/trunk/src/org/greenstone/gatherer/GathererProg.java
r13599 r14974 55 55 // Ensure platform specific LAF 56 56 try { 57 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 57 // UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 58 UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); 58 59 } 59 60 catch (Exception exception) { -
gli/trunk/src/org/greenstone/gatherer/GetOpt.java
r14303 r14974 55 55 public String metadata_path = null; 56 56 57 protected FedoraInfo fedora_info = null; 58 57 59 public GetOpt(String[] args) 58 60 { 59 61 // Default dictionary. Only used for starting error messages. 60 62 Dictionary dictionary = new Dictionary(null, null); 63 64 fedora_info = new FedoraInfo(); 61 65 62 66 // Parse arguments … … 142 146 use_remote_greenstone = true; 143 147 //Use a remote Greenstone 144 145 }else if (argument_name.equals(StaticStrings.GSDL3_ARGUMENT)){148 } 149 else if (argument_name.equals(StaticStrings.GSDL3_ARGUMENT)){ 146 150 //Use a remote Greenstone3 147 151 run_gsdl3=true; … … 243 247 } 244 248 } 249 250 // Fedora home 251 if(argument_name.equals(StaticStrings.FEDORA_HOME)) { 252 if(argument_value.endsWith(File.separator)) { 253 fedora_info.setHome(argument_value); 254 } 255 else { 256 fedora_info.setHome(argument_value + File.separator); 257 } 258 } 259 260 // Fedora hostname 261 if(argument_name.equals(StaticStrings.FEDORA_HOSTNAME)) { 262 if(argument_value.endsWith(File.separator)) { 263 fedora_info.setHostname(argument_value); 264 } 265 else { 266 fedora_info.setHostname(argument_value + File.separator); 267 } 268 } 269 // Fedora port 270 if(argument_name.equals(StaticStrings.FEDORA_PORT)) { 271 if(argument_value.endsWith(File.separator)) { 272 fedora_info.setPort(argument_value); 273 } 274 else { 275 fedora_info.setPort(argument_value + File.separator); 276 } 277 } 278 // Fedora username 279 if(argument_name.equals(StaticStrings.FEDORA_USERNAME)) { 280 if(argument_value.endsWith(File.separator)) { 281 fedora_info.setUsername(argument_value); 282 } 283 else { 284 fedora_info.setUsername(argument_value + File.separator); 285 } 286 } 287 // Fedora password 288 if(argument_name.equals(StaticStrings.FEDORA_PASSWORD)) { 289 if(argument_value.endsWith(File.separator)) { 290 fedora_info.setPassword(argument_value); 291 } 292 else { 293 fedora_info.setPassword(argument_value + File.separator); 294 } 295 } 296 // Fedora protocol, e.g. http or https 297 if(argument_name.equals(StaticStrings.FEDORA_PROTOCOL)) { 298 if(argument_value.endsWith(File.separator)) { 299 fedora_info.setProtocol(argument_value); 300 } 301 else { 302 fedora_info.setProtocol(argument_value + File.separator); 303 } 304 } 305 306 307 308 245 309 246 310 } -
gli/trunk/src/org/greenstone/gatherer/collection/Collection.java
r13819 r14974 86 86 /** The name of the import element. */ 87 87 static final private String IMPORT = "Import"; 88 /** The name of the import element. */ 89 static final private String EXPORT = "Export"; 88 90 /** The name of the imported attribute. */ 89 91 static final private String IMPORTED = "imported"; … … 111 113 } 112 114 // Finally create all of the child managers that are directly dependant on a collection 113 build_options = new ScriptOptions(getBuildValues(), "buildcol.pl"); 114 import_options = new ScriptOptions(getImportValues(), "import.pl"); 115 116 if (Configuration.fedora_info.isActive()) { 117 build_options = new ScriptOptions(getValues(BUILD), "g2f-buildcol.pl"); 118 import_options = new ScriptOptions(getValues(IMPORT), "g2f-import.pl"); 119 } 120 else { 121 build_options = new ScriptOptions(getBuildValues(), "buildcol.pl"); 122 import_options = new ScriptOptions(getImportValues(), "import.pl"); 123 } 115 124 } 116 125 … … 334 343 335 344 345 /** Method to retrieve the current import/build/export/whatever options associated with this Collection. */ 346 private Element getValues(String val_type) { 347 Element values_element = null; 348 try { 349 Element document_element = document.getDocumentElement(); 350 Element config_element = (Element) XMLTools.getNodeFromNamed(document_element, BUILD_CONFIG); 351 values_element = (Element) XMLTools.getNodeFromNamed(config_element, val_type); 352 config_element = null; 353 document_element = null; 354 } 355 catch (Exception error) { 356 DebugStream.printStackTrace(error); 357 } 358 return values_element; 359 } 360 336 361 337 362 /** Method to retrieve the current build options associated with this Collection. */ … … 350 375 return build_values_element; 351 376 } 377 352 378 353 379 /** Count either documents or folders, depending on the state of the given boolean. */ -
gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java
r14817 r14974 159 159 command_parts_list.add("-S"); 160 160 } 161 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "buildcol.pl"); 161 162 if (Configuration.fedora_info.isActive()) { 163 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "g2f-buildcol.pl"); 164 165 command_parts_list.add("-hostname"); 166 command_parts_list.add(Configuration.fedora_info.getHostname()); 167 168 command_parts_list.add("-port"); 169 command_parts_list.add(Configuration.fedora_info.getPort()); 170 171 command_parts_list.add("-username"); 172 command_parts_list.add(Configuration.fedora_info.getUsername()); 173 174 command_parts_list.add("-password"); 175 command_parts_list.add(Configuration.fedora_info.getPassword()); 176 177 command_parts_list.add("-protocol"); 178 command_parts_list.add(Configuration.fedora_info.getProtocol()); 179 180 } 181 else { 182 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "buildcol.pl"); 183 } 162 184 command_parts_list.add("-gli"); 163 185 command_parts_list.add("-language"); … … 193 215 public boolean built() { 194 216 if(collection != null) { 195 // Determine if the collection has been built by looking for the build.cfg or buildConfig.xml file 196 String file_name = (Gatherer.GS3)? Utility.BUILD_CONFIG_XML : Utility.BUILD_CFG; 197 File build_cfg_file = new File(getLoadedCollectionIndexDirectoryPath() + file_name); 198 return build_cfg_file.exists(); 217 // Determine if the collection has been built by looking for the build.cfg (gs20 buildConfig.xml (gs3) or export.inf (fedora) file 218 String file_name = ""; 219 220 if (Gatherer.GS3) { 221 file_name = getLoadedCollectionIndexDirectoryPath() + Utility.BUILD_CONFIG_XML; 222 } 223 else { 224 if (Configuration.fedora_info.isActive()) { 225 // Fedora build 226 //file_name = getLoadedCollectionArchivesDirectoryPath() + "import.inf"; 227 file_name = getLoadedCollectionExportDirectoryPath() + "export.inf"; 228 } 229 else { 230 file_name = getLoadedCollectionIndexDirectoryPath() + Utility.BUILD_CFG; 231 } 232 } 233 234 File test_file = new File(file_name); 235 return test_file.exists(); 199 236 } 200 237 return false; … … 592 629 } 593 630 631 /** Returns the absolute filename of the loaded collection's export directory. 632 */ 633 static public String getLoadedCollectionExportDirectoryPath() 634 { 635 return getLoadedCollectionDirectoryPath() + "export" + File.separator; 636 } 637 638 594 639 595 640 /** Returns the absolute filename of the loaded collection's building directory. … … 764 809 command_parts_list.add("-S"); 765 810 } 766 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "import.pl"); 811 812 if (Configuration.fedora_info.isActive()) { 813 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "g2f-import.pl"); 814 815 command_parts_list.add("-hostname"); 816 command_parts_list.add(Configuration.fedora_info.getHostname()); 817 818 command_parts_list.add("-port"); 819 command_parts_list.add(Configuration.fedora_info.getPort()); 820 821 command_parts_list.add("-username"); 822 command_parts_list.add(Configuration.fedora_info.getUsername()); 823 824 command_parts_list.add("-password"); 825 command_parts_list.add(Configuration.fedora_info.getPassword()); 826 827 command_parts_list.add("-protocol"); 828 command_parts_list.add(Configuration.fedora_info.getProtocol()); 829 } 830 else { 831 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "import.pl"); 832 } 833 767 834 command_parts_list.add("-gli"); 768 835 command_parts_list.add("-language"); … … 1339 1406 private boolean installCollection() 1340 1407 { 1408 if (Configuration.fedora_info.isActive()) { 1409 DebugStream.println("Fedora build complete. No need to move files."); 1410 return true; 1411 } 1412 1413 1341 1414 DebugStream.println("Build complete. Moving files."); 1342 1415 -
gli/trunk/src/org/greenstone/gatherer/collection/ScriptOptions.java
r13753 r14974 247 247 } 248 248 249 249 250 // Create the process. 250 251 Runtime runtime = Runtime.getRuntime(); 251 252 Process process = runtime.exec(args); 253 254 /* 255 for (int i=0; i<args.length; i++) { 256 System.err.print(args[i] + " "); 257 } 258 System.err.println(""); 259 */ 260 261 252 262 document = XMLTools.parseXML(process.getErrorStream()); 263 264 if (document == null) { 265 // command has not generated XML, script has probably failed in some way 266 for (int i=0; i<args.length; i++) { 267 DebugStream.print(args[i] + " "); 268 } 269 DebugStream.println(""); 270 } 253 271 } 254 272 -
gli/trunk/src/org/greenstone/gatherer/gems/MetadataSetManager.java
r13680 r14974 82 82 } 83 83 84 new Configuration(gli_user_directory_path, gsdl_path, gsdl3_path, null, null );84 new Configuration(gli_user_directory_path, gsdl_path, gsdl3_path, null, null, null); 85 85 current_language = Configuration.getLanguage(); 86 86 -
gli/trunk/src/org/greenstone/gatherer/gui/DesignPane.java
r12144 r14974 39 39 import org.greenstone.gatherer.cdm.CollectionDesignManager; 40 40 import org.greenstone.gatherer.cdm.Control; 41 42 import org.greenstone.gatherer.Configuration; 43 41 44 public class DesignPane 42 45 extends BaseConfigPane { … … 45 48 public DesignPane() { 46 49 super(); 47 contents = new String [] { "CDM.GUI.Plugins", "CDM.GUI.Indexes", "CDM.GUI.Subcollections", "CDM.GUI.Classifiers" }; 50 if (Configuration.fedora_info.isActive()) { 51 contents = new String [] { "CDM.GUI.Plugins" }; 52 } 53 else { 54 contents = new String [] { "CDM.GUI.Plugins", "CDM.GUI.Indexes", "CDM.GUI.Subcollections", "CDM.GUI.Classifiers" }; 55 } 48 56 49 57 } -
gli/trunk/src/org/greenstone/gatherer/gui/GUIManager.java
r13944 r14974 387 387 if (Configuration.get("workflow.design", true)) { 388 388 // "GUI.Design_Tooltip" is used automatically 389 tab_pane.addTab(Dictionary.get("GUI.Design"), JarTools.getImage("design.gif"), design_pane, Dictionary.get("GUI.Design_Tooltip")); 389 if (Configuration.fedora_info.isActive()) { 390 tab_pane.addTab("Plugins", JarTools.getImage("design.gif"), design_pane, Dictionary.get("GUI.Design_Tooltip")); 391 } 392 else { 393 tab_pane.addTab(Dictionary.get("GUI.Design"), JarTools.getImage("design.gif"), design_pane, Dictionary.get("GUI.Design_Tooltip")); 394 } 395 390 396 tab_pane.setEnabledAt(tab_pane.indexOfComponent(design_pane), false); 391 397 } … … 641 647 public void setTitle(String title, String name) { 642 648 // Finally display the collection name in the title bar. 643 StringBuffer title_buffer = new StringBuffer( Gatherer.PROGRAM_NAME);649 StringBuffer title_buffer = new StringBuffer(Configuration.getApplicationTitle()); 644 650 title_buffer.append(StaticStrings.SPACE_CHARACTER); 645 651 title_buffer.append(Gatherer.PROGRAM_VERSION); -
gli/trunk/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java
r14601 r14974 37 37 import org.greenstone.gatherer.DebugStream; 38 38 import org.greenstone.gatherer.Dictionary; 39 import org.greenstone.gatherer.FedoraInfo; 39 40 import org.greenstone.gatherer.GAuthenticator; 40 41 import org.greenstone.gatherer.Gatherer; … … 854 855 public void run() 855 856 { 856 remote_greenstone_server_authentication = new RemoteGreenstoneServerAuthenticator().getAuthentication(); 857 858 if (Configuration.fedora_info.isActive()) { 859 860 FedoraInfo fedora_info = Configuration.fedora_info; 861 862 String username = fedora_info.getUsername(); 863 String password = fedora_info.getPassword(); 864 865 //remote_greenstone_server_authentication.setUsername(fedora_info.getUsername()); 866 //remote_greenstone_server_authentication.setPassword(fedora_info.getPassword()); 867 868 remote_greenstone_server_authentication = new RemoteGreenstoneServerAuthenticator().getAuthentication(username,password); 869 870 871 } 872 else { 873 remote_greenstone_server_authentication = new RemoteGreenstoneServerAuthenticator().getAuthentication(); 874 875 } 857 876 } 858 877 … … 861 880 extends GAuthenticator 862 881 { 882 public PasswordAuthentication getAuthentication(String username, String password) 883 { 884 return getPasswordAuthentication(username,password); 885 } 886 863 887 public PasswordAuthentication getAuthentication() 864 888 { -
gli/trunk/src/org/greenstone/gatherer/shell/GShell.java
r14818 r14974 192 192 System.err.println("Collection name: " + collection_name); 193 193 194 194 195 String script_args = ""; 195 196 for (int i = 1; i < (args.length - 1); i++) { … … 404 405 else if(type == BUILD) { 405 406 // download the building directory (if gsdl server is remote) 406 if ( Gatherer.isGsdlRemote) {407 if ((Gatherer.isGsdlRemote) && (!Configuration.fedora_info.isActive())) { 407 408 if (progress!=null) { 408 409 progress.messageOnProgressBar("Downloading index data from server"); 409 410 } 410 411 411 412 if (!Gatherer.GS3){ 412 413 // Only need to download build.cfg file -
gli/trunk/src/org/greenstone/gatherer/util/StaticStrings.java
r14241 r14974 114 114 static final public String FORMAT_END_TAG = "</format>"; 115 115 static final public String FURTHER_DIALOG_INDICATOR = "..."; 116 static final public String FEDORA_HOME = "-fedora_home"; 117 static final public String FEDORA_HOSTNAME = "-fedora_hostname"; 118 static final public String FEDORA_PORT = "-fedora_port"; 119 static final public String FEDORA_USERNAME = "-fedora_username"; 120 static final public String FEDORA_PASSWORD = "-fedora_password"; 121 static final public String FEDORA_PROTOCOL = "-fedora_protocol"; 116 122 static final public String GLI_ATTRIBUTE = "gli"; 117 123 static final public String GLISERVER_URL_ARGUMENT = "-gliserver_url";
Note:
See TracChangeset
for help on using the changeset viewer.