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

    r10387 r10726  
    8686    private JTextArea mode_description_textarea;
    8787    private JTextField font_field;
     88    private JTextField gliserver_url_field;
    8889    private JTextField library_path_field;
    8990    private JTextField program_field;
     
    197198        Dictionary.registerTooltip(library_path_field, "Preferences.Connection.Library_Path_Tooltip");
    198199    }
    199    
     200
     201    JPanel gliserver_url_pane = null;
     202    JLabel gliserver_url_label = null;
     203    if (Gatherer.isGsdlRemote) {
     204        gliserver_url_pane = new JPanel();
     205        gliserver_url_pane.setPreferredSize(ROW_SIZE);
     206        gliserver_url_label = new JLabel();
     207        gliserver_url_label.setPreferredSize(LABEL_SIZE);
     208        String gliserver_url_string = "";
     209        if (Configuration.gliserver_url != null) {
     210        gliserver_url_string = Configuration.gliserver_url.toString();
     211        }
     212        gliserver_url_field = new JTextField(gliserver_url_string);
     213        gliserver_url_field.setCaretPosition(0);
     214        Dictionary.registerText(gliserver_url_label, "Preferences.Connection.GLIServer_URL");
     215        Dictionary.registerTooltip(gliserver_url_field, "Preferences.Connection.GLIServer_URL_Tooltip");
     216    }
    200217
    201218    JPanel site_pane = null;
     
    291308        site_combobox.addActionListener(new SiteComboboxListener());
    292309    }
     310
    293311    // Layout
    294312    program_pane.setLayout(new BorderLayout());
     
    300318    library_path_pane.add(library_path_field, BorderLayout.CENTER);
    301319
     320    if (Gatherer.isGsdlRemote) {
     321        gliserver_url_pane.setLayout(new BorderLayout());
     322        gliserver_url_pane.add(gliserver_url_label, BorderLayout.WEST);
     323        gliserver_url_pane.add(gliserver_url_field, BorderLayout.CENTER);
     324    }
     325
    302326    if (Gatherer.GS3) {
    303327        site_pane.setLayout(new BorderLayout());
     
    309333        servlet_pane.add(servlet_combobox, BorderLayout.CENTER);
    310334    }
     335
    311336    proxy_host_pane.setLayout(new BorderLayout());
    312337    proxy_host_pane.add(proxy_host_label, BorderLayout.WEST);
     
    321346    connection_pane.add(program_pane);
    322347    connection_pane.add(library_path_pane);
     348    if (Gatherer.isGsdlRemote) {
     349        connection_pane.add(gliserver_url_pane);
     350    }
    323351    if (Gatherer.GS3) {
    324352        connection_pane.add(site_pane);
     
    636664        Configuration.setString("general.library_url", true, library_url_string);
    637665
     666        if (Gatherer.isGsdlRemote) {
     667        String gliserver_url_string = gliserver_url_field.getText();
     668        if (gliserver_url_string.equals("")) {
     669            Configuration.gliserver_url = null;
     670        }
     671        else {
     672            try {
     673            Configuration.gliserver_url = new URL(gliserver_url_string);
     674            }
     675            catch (MalformedURLException exception) {
     676            DebugStream.printStackTrace(exception);
     677            }
     678        }
     679        Configuration.setString("general.gliserver_url", true, gliserver_url_string);
     680        }
     681
    638682        boolean site_changed = false;
    639683        if (Gatherer.GS3) {
Note: See TracChangeset for help on using the changeset viewer.