- Timestamp:
- 2004-11-18T14:31:40+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.