Changeset 3644


Ignore:
Timestamp:
2003-01-06T14:47:34+13:00 (21 years ago)
Author:
kjdon
Message:

tidying up

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

Legend:

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

    r3569 r3644  
    5353 * @see ModuleInterface
    5454 * @see Collection
    55  * @see ServicesImpl
     55 * @see ServiceRack
    5656 * @see Communicator
    5757 *
     
    302302   
    303303    Node module_list = GSXML.getChildByTagName(config,
    304                            GSXML.SERVICE_IMPL_ELEM+GSXML.LIST_MODIFIER);
     304                           GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER);
    305305    if (module_list == null) {
    306306        System.out.println("... none to be loaded");
     
    316316       
    317317        for(int i=0; i<service_impls.getLength(); i++) {
    318             if (service_impls.item(i).getNodeName().equals(GSXML.SERVICE_IMPL_ELEM)) {
     318            if (service_impls.item(i).getNodeName().equals(GSXML.SERVICE_CLASS_ELEM)) {
    319319            Element n = (Element)service_impls.item(i);
    320320            String service_name = n.getAttribute(GSXML.NAME_ATT);
    321321            System.out.println("..."+service_name);
    322322            try {
    323                 ServicesImpl s = (ServicesImpl)Class.forName("org.greenstone.gsdl3.service."+service_name).newInstance();
     323                ServiceRack s = (ServiceRack)Class.forName("org.greenstone.gsdl3.service."+service_name).newInstance();
    324324                s.setSiteHome(site_home_);
    325325                s.setMessageRouter(this);
     
    343343                }
    344344            } catch (Exception e ) {
    345                 System.err.println("MessageRouter configure exception:  in ServicesImpl class specification:  "+ e.getMessage());
     345                System.err.println("MessageRouter configure exception:  in ServiceRack class specification:  "+ e.getMessage());
    346346               
    347347            }
     
    502502    }
    503503
    504     protected boolean activateServicesImpl(String module_name) {
     504    protected boolean activateServiceRack(String module_name) {
    505505    return false;
    506506    }
     
    558558            if (module_type.equals(GSXML.COLLECTION_ELEM)) {
    559559            activateCollection(module_name);
    560             } else if (module_type.equals(GSXML.SERVICE_IMPL_ELEM)) {
    561             activateServicesImpl(module_name);
     560            } else if (module_type.equals(GSXML.SERVICE_CLASS_ELEM)) {
     561            activateServiceRack(module_name);
    562562            } else if (module_type.equals(GSXML.CLUSTER_ELEM)) {
    563563            activateServiceCluster(module_name);
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/core/Receptionist.java

    r3581 r3644  
    2626
    2727    /** the cgi args converter */
    28     protected CGIArgConverter cgi_=null;
     28    protected GSCGI cgi_ = null;
    2929
    3030    /** container Document to create XML Nodes */
     
    4444    doc_ = converter_.newDOM();
    4545    action_map_= new HashMap();
    46     cgi_ = new CGIArgConverter();
     46    cgi_ = new GSCGI();
    4747    }
    4848 
     
    7676    a.setConfigVars(config_);
    7777    a.setMessageRouter(mr_);
    78     a.setCGIConverter(cgi_);
     78    a.setCGI(cgi_);
    7979    a.configure();
    8080    action_map_.put("p", a);
     
    8282    a = new QueryAction();
    8383    a.setConfigVars(config_);
    84     a.setCGIConverter(cgi_);
     84    a.setCGI(cgi_);
    8585    a.setMessageRouter(mr_);
    8686    a.configure();
     
    8989    a = new BrowseAction();
    9090    a.setConfigVars(config_);
    91     a.setCGIConverter(cgi_);
    92     a.setMessageRouter(mr_);
     91    a.setCGI(cgi_);
     92    a.setMessageRouter(mr_);
    9393    a.configure();
    9494    action_map_.put("b", a);
    9595
    96     a = new ResourceAction();
    97     a.setConfigVars(config_);
    98     a.setCGIConverter(cgi_);
    99     a.setMessageRouter(mr_);
    100     a.configure();
    101     action_map_.put("r", a);
     96    a = new DocumentAction();
     97    a.setConfigVars(config_);
     98    a.setCGI(cgi_);
     99    a.setMessageRouter(mr_);
     100    a.configure();
     101    action_map_.put("d", a);
    102102
    103103    a = new AppletAction();
    104104    a.setConfigVars(config_);
    105     a.setCGIConverter(cgi_);
     105    a.setCGI(cgi_);
    106106    a.setMessageRouter(mr_);
    107107    a.configure();
    108108    action_map_.put("a", a);
     109   
     110    a = new ProcessAction();
     111    a.setConfigVars(config_);
     112    a.setCGI(cgi_);
     113    a.setMessageRouter(mr_);
     114    a.configure();
     115    action_map_.put("pr", a);
    109116
    110117
     
    132139    // check that the request type is correct
    133140    String type = request.getAttribute(GSXML.TYPE_ATT); // returns "" if no att of this name
    134     if (!type.equals(GSXML.REQUEST_TYPE_ACTION)) {
    135         System.err.println("Receptionist Error: request type should be '"+GSXML.REQUEST_TYPE_ACTION+"', but it was '"+type+"'!");
     141    if (!type.equals(GSXML.REQUEST_TYPE_CGI)) {
     142        System.err.println("Receptionist Error: request type should be '"+GSXML.REQUEST_TYPE_CGI+"', but it was '"+type+"'!");
    136143        return null;
    137144    }   
     
    145152    Element param_list = (Element)GSXML.getChildByTagName(request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
    146153    if (param_list!=null) {
    147         if (!cgi_.toLong(param_list)) {
     154        if (!cgi_.paramListToLongNames(param_list)) {
    148155        System.err.println("Receptionist Error: couldn't convert short names to long names in the param list!");
    149156        return null;
     
    161168        ac.setConfigVars(config_);
    162169        ac.setMessageRouter(mr_);
    163         ac.setCGIConverter(cgi_);
     170        ac.setCGI(cgi_);
    164171        ac.configure();
    165172        action_map_.put(action, ac);
     
    186193    /** returns an xml element containing all the text strings
    187194     * needed for an interface
    188      * currenlty only uses the current interface - should add in
     195     * currently only uses the current interface - should add in
    189196     * needed ones from the default interface if current != default */
    190197    protected Element getDisplayElement(String lang) {
Note: See TracChangeset for help on using the changeset viewer.