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/cdm/PluginManager.java

    r10576 r10726  
    4747import org.greenstone.gatherer.gui.ModalDialog;
    4848import org.greenstone.gatherer.gui.WarningDialog;
     49import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
    4950import org.greenstone.gatherer.util.JarTools;
    5051import org.greenstone.gatherer.util.StaticStrings;
     
    443444        StringBuffer xml = null;
    444445        if (Gatherer.isGsdlRemote) {
    445         String launch  = Gatherer.cgiBase + "launch";
    446         launch += "?cmd=pluginfo.pl";
    447         launch += "&xml=&language="+lang;
    448         launch += "&plug=" + getPluginName(plugin);
    449        
    450         System.err.println("*** launch = " + launch);
    451        
    452         URL launch_url = new URL(launch);
    453         URLConnection launch_connection = launch_url.openConnection();
    454         input_stream = launch_connection.getInputStream();
    455         xml = Utility.readXMLStream(input_stream);
     446        String pluginfo_output = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", "&plugin=" + plugin);
     447        xml = new StringBuffer(pluginfo_output);
    456448        }
    457449        else {
     
    514506    if(library == null) {
    515507        library = new ArrayList();
     508
    516509        if (Gatherer.isGsdlRemote) {
    517 
    518         String lang = Configuration.getLanguage();
    519 
    520         String launch  = Gatherer.cgiBase + "launch";
    521         launch += "?cmd=pluginfo.pl";
    522         launch += "&xml=&language="+lang;
    523         launch += "&listall=";
    524 
    525         System.err.println("*** launch = " + launch);
    526 
    527         try {
    528             URL launch_url = new URL(launch);
    529             URLConnection launch_connection = launch_url.openConnection();
    530             InputStream input_stream = launch_connection.getInputStream();
    531             StringBuffer xml = Utility.readXMLStream(input_stream);
    532             loadPlugins(xml);
    533         }
    534         catch (Exception error) {
    535             System.err.println("Failed when trying to connect to : " + launch);
    536             error.printStackTrace();
    537         }
    538 
    539         }
     510        String pluginfo_output = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", "&listall=");
     511        loadPlugins(new StringBuffer(pluginfo_output));
     512        }
     513
    540514        else {
    541515        // Retrieve the gsdl home directory...
Note: See TracChangeset for help on using the changeset viewer.