Ignore:
Timestamp:
2004-11-23T09:29:02+13:00 (20 years ago)
Author:
mdewsnip
Message:

Moved all the local library server code in a new LocalLibraryServer class. This will make things a lot cleaner and more easily allow a few bugs and features to be done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java

    r8601 r8620  
    3838import org.greenstone.gatherer.Gatherer;
    3939import org.greenstone.gatherer.GathererApplet;
    40 import org.greenstone.gatherer.util.GSDLSiteConfig;
     40import org.greenstone.gatherer.LocalLibraryServer;
    4141import org.greenstone.gatherer.util.Utility;
    4242import org.w3c.dom.*;
     
    200200    public void save() {
    201201    // Release collection as necessary
     202    String collection_name = Gatherer.c_man.getCollection().getName();
    202203    boolean collection_released = false;
    203     String col_name = Gatherer.c_man.getCollection().getName();
    204204    boolean formats_changed = format_manager.formatsChanged();
    205205
    206     if (formats_changed && Gatherer.c_man.built() && Configuration.exec_file != null) {
     206    if (formats_changed && Gatherer.c_man.built() && LocalLibraryServer.isRunning() == true) {
    207207        // 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("");
     208        LocalLibraryServer.releaseCollection(collection_name);
    211209        collection_released = true;
    212210    }
     
    218216        if (formats_changed && Gatherer.c_man.built()) {
    219217        // 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");
     218        Utility.zipup(collection_name, Utility.CONFIG_FILE);
     219        GathererApplet.upload_url_zip(collection_name, "etc");
    222220        }
    223221    }
     
    226224    if (collection_released) {
    227225        // 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("");
     226        LocalLibraryServer.addCollection(collection_name);
    231227    }
    232228
Note: See TracChangeset for help on using the changeset viewer.