Changeset 8921


Ignore:
Timestamp:
2005-01-20T16:43:16+13:00 (19 years ago)
Author:
kjdon
Message:

fixed up the receptionist option handling stuff

Location:
trunk/gsdl3/src/java/org/greenstone/gsdl3/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/core/Receptionist.java

    r8831 r8921  
    8484    String base_interface = config_doc.getAttribute("baseInterface");
    8585    setUpBaseInterface(base_interface);
    86 
    87     // get any interface options
    88     Element option_list = (Element)GSXML.getChildByTagName(config_doc, "optionList");
    89     if (option_list != null) {
    90         // we set any options in the config params
    91         NodeList options = option_list.getElementsByTagName("option");
    92         for (int i=0; i<options.getLength(); i++) {
    93         Element option = (Element)options.item(i);
    94         String name = option.getAttribute(GSXML.NAME_ATT);
    95         String value = option.getAttribute(GSXML.VALUE_ATT);
    96         if (!name.equals("") && !value.equals("")) {
    97             this.config_params.put(name, value);
    98         }
    99         }
    100     }
     86    setUpInterfaceOptions(config_doc);
    10187
    10288    // load up the actions
     
    248234    return true;
    249235    }
     236
     237    protected boolean setUpInterfaceOptions(Element config_doc) {
     238    Element option_list = (Element)GSXML.getChildByTagName(config_doc, "optionList");
     239    if (option_list != null) {
     240        System.err.println("found an option list");
     241        // we set any options in the config params
     242        NodeList options = option_list.getElementsByTagName("option");
     243        for (int i=0; i<options.getLength(); i++) {
     244        Element option = (Element)options.item(i);
     245        String name = option.getAttribute(GSXML.NAME_ATT);
     246        String value = option.getAttribute(GSXML.VALUE_ATT);
     247        System.err.println("option: "+name+", "+value);
     248        if (!name.equals("") && !value.equals("")) {
     249            this.config_params.put(name, value);
     250        }
     251        }
     252    }
     253
     254    return true;
     255    }
     256
    250257    protected void preProcessRequest(Element request) {
    251258    return;
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r8611 r8921  
    5656    String base_interface = config_doc.getAttribute("baseInterface");
    5757    setUpBaseInterface(base_interface);
     58    setUpInterfaceOptions(config_doc);
     59
    5860    Element action_list = (Element)GSXML.getChildByTagName(config_doc, GSXML.ACTION_ELEM+GSXML.LIST_MODIFIER);
    5961    NodeList actions = action_list.getElementsByTagName(GSXML.ACTION_ELEM);
Note: See TracChangeset for help on using the changeset viewer.