Ignore:
Timestamp:
2005-10-14T15:19:36+13:00 (19 years ago)
Author:
mdewsnip
Message:

(MAJOR CHANGE) This is the remote Greenstone building functionality implemented for the West Yorkshire Fire and Rescue Service. It allows collections to be built without having a local version of Greenstone, using either a stand-alone version of the GLI or the applet.

The collections are stored on the server (allowing people to collaborate on collections -- but not at the same time), and only what is necessary to let the user edit the collection is downloaded. Any changes to the collection are uploaded to the server.

An access restriction mechanism is implemented which uses the standard Greenstone user database to control who has access to collections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r10587 r10726  
    5454import org.greenstone.gatherer.Gatherer;
    5555import org.greenstone.gatherer.collection.Collection;
     56import org.greenstone.gatherer.collection.CollectionManager;
    5657import org.greenstone.gatherer.file.FileOpenActionListener;
    5758import org.greenstone.gatherer.file.WorkspaceTree;
     
    394395        content_pane.add(tab_pane, BorderLayout.CENTER);
    395396
     397        // Add an extra progress bar at the bottom of every screen when using a remote Greenstone server
     398        if (Gatherer.isGsdlRemote) {
     399        JPanel remote_greenstone_server_progress_panel = new JPanel();
     400        JLabel remote_greenstone_server_progress_label = new JLabel(Dictionary.get("RemoteGreenstoneServer.Progress"));
     401        remote_greenstone_server_progress_panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
     402        remote_greenstone_server_progress_panel.setLayout(new BorderLayout());
     403        remote_greenstone_server_progress_panel.add(remote_greenstone_server_progress_label, BorderLayout.WEST);
     404        remote_greenstone_server_progress_panel.add(RemoteGreenstoneServer.getProgressBar(), BorderLayout.CENTER);
     405        content_pane.add(remote_greenstone_server_progress_panel, BorderLayout.SOUTH);
     406        }
     407
    396408        // Call refresh to update all controls to reflect current collection status.
    397409        refresh(-1, Gatherer.c_man.ready());
     
    641653    {
    642654        // If using a remote Greenstone check if the collection configurations have been downloaded; do so if not
    643         if (Gatherer.isGsdlRemote) {
    644         File collect_directory = new File(Gatherer.getCollectDirectoryPath());
    645         if (!collect_directory.exists() || collect_directory.listFiles().length == 0) {
    646             if (!RemoteGreenstoneServer.downloadCollectionConfigurations()) {
    647             // Something went wrong downloading the collection configurations
    648             return;
    649             }
    650         }
     655        if (Gatherer.isGsdlRemote && !CollectionManager.downloaded_collection_configurations) {
     656        if (RemoteGreenstoneServer.downloadCollectionConfigurations().equals("")) {
     657            // Something went wrong downloading the collection configurations
     658            return;
     659        }
     660
     661        CollectionManager.downloaded_collection_configurations = true;
    651662        }
    652663
     
    712723    public void run()
    713724    {
     725        // If using a remote Greenstone check if the collection configurations have been downloaded; do so if not
     726        if (Gatherer.isGsdlRemote && !CollectionManager.downloaded_collection_configurations) {
     727        if (RemoteGreenstoneServer.downloadCollectionConfigurations().equals("")) {
     728            // Something went wrong downloading the collection configurations
     729            return;
     730        }
     731
     732        CollectionManager.downloaded_collection_configurations = true;
     733        }
     734
     735        // Create the collection details prompt from new collection prompt
    714736        NewCollectionMetadataPrompt ncm_prompt = null;
    715         // Create the collection details prompt from new collection prompt
    716737        NewCollectionDetailsPrompt ncd_prompt = new NewCollectionDetailsPrompt();
    717738        // If no previous collection was indicated as a model design, then show the metadata selection prompt from new collection prompt
Note: See TracChangeset for help on using the changeset viewer.