- Timestamp:
- 2006-09-21T14:17:38+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r12800 r12803 35 35 import org.greenstone.gatherer.DebugStream; 36 36 import org.greenstone.gatherer.Gatherer; 37 import org.greenstone.gatherer.LocalLibraryServer; 37 38 import org.greenstone.gatherer.gui.GLIButton; 38 39 import org.greenstone.gatherer.metadata.MetadataElement; … … 427 428 } 428 429 429 public void save() { 430 431 public void save() 432 { 433 // If we're using the Local Library we must release the collection before writing to the collect.cfg file 434 String collection_name = Gatherer.c_man.getCollection().getName(); 435 boolean collection_released = false; 436 if (Gatherer.c_man.built() && LocalLibraryServer.isRunning() == true) { 437 // Release the collection 438 LocalLibraryServer.releaseCollection(collection_name); 439 collection_released = true; 440 } 441 430 442 if(collect_cfg_file.exists()) { 431 443 File original_file = new File(collect_cfg_file.getParentFile(), COLLECT_CFG); … … 477 489 // If we're using a remote Greenstone server, upload the new collect.cfg file 478 490 if (Gatherer.isGsdlRemote) { 479 String collection_name = Gatherer.c_man.getCollection().getName();480 491 RemoteGreenstoneServer.uploadCollectionFile(collection_name, collect_cfg_file); 481 492 } … … 485 496 DebugStream.printStackTrace(exception); 486 497 } 487 488 } 498 499 // Now re-add the collection to the Local Library server 500 if (collection_released) { 501 LocalLibraryServer.addCollection(collection_name); 502 } 503 } 504 489 505 490 506 /** ************************** Private Methods ***************************/
Note:
See TracChangeset
for help on using the changeset viewer.