- Timestamp:
- 2009-04-21T18:55:32+12:00 (15 years ago)
- Location:
- gli/trunk/src/org/greenstone/gatherer/remote
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java
r17630 r19173 62 62 // static private PasswordAuthentication remote_greenstone_server_authentication = new PasswordAuthentication(System.getProperty("user.name"), new char[] { }); 63 63 64 // the language and region environment variables (in "lang_REGION" form) 65 // this is necessary in order for the client and server sides to zip and unzip 66 // using the same settings 67 public final String lang_region; 68 64 69 private ActionQueue remote_greenstone_server_action_queue; 65 70 private RemoteGreenstoneServer.ProgressBar progress_bar; … … 70 75 progress_bar = new RemoteGreenstoneServer.ProgressBar(); 71 76 remote_greenstone_server_action_queue = new ActionQueue(); 77 78 String langReg = System.getenv("LANG"); 79 lang_region = (langReg == null) ? "" : langReg; 72 80 } 73 81 … … 481 489 String gliserver_url_string = Configuration.gliserver_url.toString(); 482 490 String command_output = sendCommandToServerInternal(gliserver_url_string, gliserver_args, shell); 483 491 492 // Debugging - print any ok messages to stderr 493 //if(!(command_output.trim().startsWith("<"))) { 494 //System.err.println("**** RECEIVED (sendCommandToServer()): " + command_output); 495 //} 496 484 497 // Check the first line to see if authentication has failed; if so, go around the loop again 485 498 if (command_output.startsWith("ERROR: Authentication failed:")) { -
gli/trunk/src/org/greenstone/gatherer/remote/RemoteGreenstoneServerAction.java
r18646 r19173 179 179 String download_collection_command = "cmd=download-collection"; 180 180 download_collection_command += "&c=" + URLEncoder.encode(collection_name, "UTF-8"); 181 download_collection_command += "&lr=" + remote.lang_region; 181 182 String zip_file_path = Gatherer.getCollectDirectoryPath() + collection_name + ".zip"; 182 183 action_output = remote.downloadFile(download_collection_command, zip_file_path); … … 213 214 String download_collection_archives_command = "cmd=download-collection-archives"; 214 215 download_collection_archives_command += "&c=" + URLEncoder.encode(collection_name, "UTF-8"); 216 download_collection_archives_command += "&lr=" + remote.lang_region; 215 217 String zip_file_path = Gatherer.getCollectDirectoryPath() + collection_name + "-archives.zip"; 216 218 action_output = remote.downloadFile(download_collection_archives_command, zip_file_path); … … 247 249 248 250 String download_collection_configurations_command = "cmd=download-collection-configurations"; 251 download_collection_configurations_command += "&lr=" + remote.lang_region; 249 252 String zip_file_path = Gatherer.getCollectDirectoryPath() + "collections.zip"; 250 253 action_output = remote.downloadFile(download_collection_configurations_command, zip_file_path); … … 346 349 download_collection_file_command += "&c=" + URLEncoder.encode(collection_name, "UTF-8"); 347 350 download_collection_file_command += "&file=" + URLEncoder.encode(collection_file_relative_path, "UTF-8"); 351 download_collection_file_command += "&lr=" + remote.lang_region; 348 352 String zip_file_name = collection_name + "-" + collection_file.getName() + ".zip"; 349 353 String zip_file_path = collection_directory_path + zip_file_name; … … 372 376 String download_web_xml_file_command = "cmd=download-web-xml-file"; 373 377 download_web_xml_file_command += "&file=" + URLEncoder.encode("web.xml", "UTF-8"); 378 download_web_xml_file_command += "&lr=" + remote.lang_region; 374 379 String zip_file_name = "web-xml.zip"; 375 380 String zip_file_path = web_xml_directory_path + zip_file_name; … … 585 590 upload_collection_file_command += "&directory="; 586 591 upload_collection_file_command += "&zip=true"; 592 upload_collection_file_command += "&lr=" + remote.lang_region; 587 593 action_output = remote.uploadFile(upload_collection_file_command, zip_file_path); 588 594 } … … 639 645 upload_collection_file_command += "&directory=" + URLEncoder.encode(target_collection_directory_relative_path, "UTF-8"); 640 646 upload_collection_file_command += "&zip=true"; 647 upload_collection_file_command += "&lr=" + remote.lang_region; 641 648 action_output = remote.uploadFile(upload_collection_file_command, zip_file_path); 642 649 }
Note:
See TracChangeset
for help on using the changeset viewer.