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/DeleteCollectionPrompt.java

    r9863 r10726  
    5050import org.greenstone.gatherer.collection.BasicCollectionConfiguration;
    5151import org.greenstone.gatherer.file.WorkspaceTree;  // !!! Don't like this here
     52import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
    5253import org.greenstone.gatherer.util.ArrayTools;
    5354import org.greenstone.gatherer.util.StaticStrings;
     
    293294    public void actionPerformed(ActionEvent event) {
    294295        // Delete the selected collection.
     296        // !! This should all go into CollectionManager !!
    295297
    296298        // First we must release it from the local library
     
    300302
    301303        if (Gatherer.isGsdlRemote) {
    302                
    303         String launch_cgi  = Gatherer.cgiBase + "launch?cmd=deldir";
    304 
    305         String col_name = collection.getShortName();
    306         String dir = ".";
    307 
    308         try {
    309 
    310             String col_name_encoded = URLEncoder.encode(col_name,"UTF-8");
    311             String dir_encoded = URLEncoder.encode(dir,"UTF-8");
    312 
    313             launch_cgi += "&c=" + col_name_encoded;
    314             launch_cgi += "&dir=" + dir_encoded;
    315        
    316             URL launch_url = new URL(launch_cgi);
    317             URLConnection launch_connection = launch_url.openConnection();
    318             InputStream stdis = launch_connection.getInputStream();
    319             InputStreamReader stdisr = new InputStreamReader(stdis, "UTF-8"  );
    320            
    321             BufferedReader stdbr = new BufferedReader(stdisr);
    322            
    323             while(true) {
    324             String line = stdbr.readLine();
    325             // ignore output of running lauch command
    326            
    327             if (line == null) { break; }
    328             }       
    329            
    330             stdbr.close();
    331         }
    332         // Exception
    333         catch (Exception exception) {
    334             DebugStream.println("Exception in GShell.runRemove() - unexpected");
    335             DebugStream.printStackTrace(exception);
    336         }
     304        RemoteGreenstoneServer.deleteCollection(collection.getShortName());
    337305        }
    338306
Note: See TracChangeset for help on using the changeset viewer.