Changeset 8597
- Timestamp:
- 2004-11-18T14:31:40+13:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r8480 r8597 459 459 // The response code is returned immediately -- but this does not mean the local 460 460 // library action has finished! 461 public void configServer(String command)461 static public void configServer(String command) 462 462 { 463 463 try { … … 481 481 482 482 // used to send reload coll messages to the tomcat server 483 public void configGS3Server(String site, String command) {483 static public void configGS3Server(String site, String command) { 484 484 485 485 try { … … 498 498 url = null; 499 499 } 500 catch (Exception exception) {500 catch (Exception exception) { 501 501 DebugStream.printStackTrace(exception); 502 ///ystem.err.println("Bad URL.");503 502 } 504 503 } -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java
r8250 r8597 195 195 } 196 196 197 197 198 /** Cause the current collection configuration to be written out to disk. 198 * @see org.greenstone.gatherer.cdm.ClassifierManager 199 * @see org.greenstone.gatherer.cdm.CollectionMetaManager 200 * @see org.greenstone.gatherer.cdm.FormatManager 201 * @see org.greenstone.gatherer.cdm.IndexManager 202 * @see org.greenstone.gatherer.cdm.LanguageManager 203 * @see org.greenstone.gatherer.cdm.MetadataSetView 204 * @see org.greenstone.gatherer.cdm.PlugInManager 205 * @see org.greenstone.gatherer.cdm.SubcollectionManager 206 */ 207 public void save() { 208 // Release collection as necessary 209 ///ystem.err.println("Would have released collection if necessary."); 210 boolean collection_released = false; 211 String col_name = Gatherer.c_man.getCollection().getName(); 212 boolean formats_changed = format_manager.formatsChanged(); 213 214 if(formats_changed && Gatherer.c_man.built() && Configuration.exec_file != null) { 215 // Release the collection 216 Gatherer.self.configServer(GSDLSiteConfig.RELEASE_COMMAND + col_name); 217 // This is very important -- it ensures that the above command has finished 218 Gatherer.self.configServer(""); 219 collection_released = true; 220 } 221 222 general_manager.loseFocus(); 223 collect_config.save(); 224 225 if (Gatherer.isGsdlRemote) { 226 if(formats_changed && Gatherer.c_man.built()) { 227 // upload etc/collect.cfg to server to reflect changes 228 Utility.zipup(col_name,Utility.CONFIG_FILE); 229 GathererApplet.upload_url_zip(col_name,"etc"); 230 } 231 } 232 233 // Readd collection 234 ///ystem.err.println("Would have added collection if it had been released."); 235 if(collection_released) { 236 // Now re-add collection to server to force format commands to be processed 237 Gatherer.self.configServer(GSDLSiteConfig.ADD_COMMAND + col_name); 238 // This is very important -- it ensures that the above command has finished 239 Gatherer.self.configServer(""); 240 } 241 242 if (formats_changed) { 243 // Unset formats changed 244 format_manager.setFormatsChanged(false); 245 } 246 } 199 */ 200 public void save() { 201 // Release collection as necessary 202 boolean collection_released = false; 203 String col_name = Gatherer.c_man.getCollection().getName(); 204 boolean formats_changed = format_manager.formatsChanged(); 205 206 if (formats_changed && Gatherer.c_man.built() && Configuration.exec_file != null) { 207 // Release the collection 208 Gatherer.configServer(GSDLSiteConfig.RELEASE_COMMAND + col_name); 209 // This is very important -- it ensures that the above command has finished 210 Gatherer.configServer(""); 211 collection_released = true; 212 } 213 214 general_manager.loseFocus(); 215 collect_config.save(); 216 217 if (Gatherer.isGsdlRemote) { 218 if (formats_changed && Gatherer.c_man.built()) { 219 // upload etc/collect.cfg to server to reflect changes 220 Utility.zipup(col_name,Utility.CONFIG_FILE); 221 GathererApplet.upload_url_zip(col_name,"etc"); 222 } 223 } 224 225 // Readd collection 226 if (collection_released) { 227 // Now re-add collection to server to force format commands to be processed 228 Gatherer.configServer(GSDLSiteConfig.ADD_COMMAND + col_name); 229 // This is very important -- it ensures that the above command has finished 230 Gatherer.configServer(""); 231 } 232 233 if (formats_changed) { 234 // Unset formats changed 235 format_manager.setFormatsChanged(false); 236 } 237 } 247 238 248 239 -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r8594 r8597 1137 1137 // If we have a local library running (that we know about) then we ask it to add our newly create collection 1138 1138 if (Configuration.exec_file != null) { 1139 Gatherer. self.configServer(GSDLSiteConfig.ADD_COMMAND + collection.getName());1139 Gatherer.configServer(GSDLSiteConfig.ADD_COMMAND + collection.getName()); 1140 1140 // This is very important -- it ensures that the above command has finished 1141 Gatherer. self.configServer("");1141 Gatherer.configServer(""); 1142 1142 } 1143 1143 else if (Gatherer.GS3) { 1144 1144 convertToGS3Collection(); 1145 Gatherer. self.configGS3Server(Configuration.site_name, ServletConfiguration.ADD_COMMAND + collection.getName());1145 Gatherer.configGS3Server(Configuration.site_name, ServletConfiguration.ADD_COMMAND + collection.getName()); 1146 1146 } 1147 1147 … … 1340 1340 // Ensure that the local library has released this collection so we can delete the index directory 1341 1341 if (!Gatherer.GS3 && Configuration.exec_file != null) { 1342 Gatherer. self.configServer(GSDLSiteConfig.RELEASE_COMMAND + collection.getName());1342 Gatherer.configServer(GSDLSiteConfig.RELEASE_COMMAND + collection.getName()); 1343 1343 1344 1344 // This is very important -- it ensures that the above command has finished 1345 1345 // This prevents the nasty "could not remove index directory" race condition! 1346 Gatherer. self.configServer("");1346 Gatherer.configServer(""); 1347 1347 } 1348 1348 -
trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java
r8243 r8597 310 310 // first of all we must release it from the local library 311 311 if (Configuration.exec_file != null) { 312 ///ystem.err.println("Local Library Found!"); 313 Gatherer.self.configServer(GSDLSiteConfig.RELEASE_COMMAND + collection.getShortName()); 312 Gatherer.configServer(GSDLSiteConfig.RELEASE_COMMAND + collection.getShortName()); 314 313 // This is very important -- it ensures that the above command has finished 315 Gatherer. self.configServer("");314 Gatherer.configServer(""); 316 315 } 317 316
Note:
See TracChangeset
for help on using the changeset viewer.