Changeset 3644 for trunk/gsdl3/src/java/org
- Timestamp:
- 2003-01-06T14:47:34+13:00 (21 years ago)
- 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 53 53 * @see ModuleInterface 54 54 * @see Collection 55 * @see Service sImpl55 * @see ServiceRack 56 56 * @see Communicator 57 57 * … … 302 302 303 303 Node module_list = GSXML.getChildByTagName(config, 304 GSXML.SERVICE_ IMPL_ELEM+GSXML.LIST_MODIFIER);304 GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER); 305 305 if (module_list == null) { 306 306 System.out.println("... none to be loaded"); … … 316 316 317 317 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)) { 319 319 Element n = (Element)service_impls.item(i); 320 320 String service_name = n.getAttribute(GSXML.NAME_ATT); 321 321 System.out.println("..."+service_name); 322 322 try { 323 Service sImpl s = (ServicesImpl)Class.forName("org.greenstone.gsdl3.service."+service_name).newInstance();323 ServiceRack s = (ServiceRack)Class.forName("org.greenstone.gsdl3.service."+service_name).newInstance(); 324 324 s.setSiteHome(site_home_); 325 325 s.setMessageRouter(this); … … 343 343 } 344 344 } catch (Exception e ) { 345 System.err.println("MessageRouter configure exception: in Service sImplclass specification: "+ e.getMessage());345 System.err.println("MessageRouter configure exception: in ServiceRack class specification: "+ e.getMessage()); 346 346 347 347 } … … 502 502 } 503 503 504 protected boolean activateService sImpl(String module_name) {504 protected boolean activateServiceRack(String module_name) { 505 505 return false; 506 506 } … … 558 558 if (module_type.equals(GSXML.COLLECTION_ELEM)) { 559 559 activateCollection(module_name); 560 } else if (module_type.equals(GSXML.SERVICE_ IMPL_ELEM)) {561 activateService sImpl(module_name);560 } else if (module_type.equals(GSXML.SERVICE_CLASS_ELEM)) { 561 activateServiceRack(module_name); 562 562 } else if (module_type.equals(GSXML.CLUSTER_ELEM)) { 563 563 activateServiceCluster(module_name); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/Receptionist.java
r3581 r3644 26 26 27 27 /** the cgi args converter */ 28 protected CGIArgConverter cgi_=null;28 protected GSCGI cgi_ = null; 29 29 30 30 /** container Document to create XML Nodes */ … … 44 44 doc_ = converter_.newDOM(); 45 45 action_map_= new HashMap(); 46 cgi_ = new CGIArgConverter();46 cgi_ = new GSCGI(); 47 47 } 48 48 … … 76 76 a.setConfigVars(config_); 77 77 a.setMessageRouter(mr_); 78 a.setCGI Converter(cgi_);78 a.setCGI(cgi_); 79 79 a.configure(); 80 80 action_map_.put("p", a); … … 82 82 a = new QueryAction(); 83 83 a.setConfigVars(config_); 84 a.setCGI Converter(cgi_);84 a.setCGI(cgi_); 85 85 a.setMessageRouter(mr_); 86 86 a.configure(); … … 89 89 a = new BrowseAction(); 90 90 a.setConfigVars(config_); 91 a.setCGIConverter(cgi_);92 91 a.setCGI(cgi_); 92 a.setMessageRouter(mr_); 93 93 a.configure(); 94 94 action_map_.put("b", a); 95 95 96 a = new ResourceAction();97 a.setConfigVars(config_); 98 a.setCGI Converter(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); 102 102 103 103 a = new AppletAction(); 104 104 a.setConfigVars(config_); 105 a.setCGI Converter(cgi_);105 a.setCGI(cgi_); 106 106 a.setMessageRouter(mr_); 107 107 a.configure(); 108 108 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); 109 116 110 117 … … 132 139 // check that the request type is correct 133 140 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+"'!"); 136 143 return null; 137 144 } … … 145 152 Element param_list = (Element)GSXML.getChildByTagName(request, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 146 153 if (param_list!=null) { 147 if (!cgi_. toLong(param_list)) {154 if (!cgi_.paramListToLongNames(param_list)) { 148 155 System.err.println("Receptionist Error: couldn't convert short names to long names in the param list!"); 149 156 return null; … … 161 168 ac.setConfigVars(config_); 162 169 ac.setMessageRouter(mr_); 163 ac.setCGI Converter(cgi_);170 ac.setCGI(cgi_); 164 171 ac.configure(); 165 172 action_map_.put(action, ac); … … 186 193 /** returns an xml element containing all the text strings 187 194 * needed for an interface 188 * curren lty only uses the current interface - should add in195 * currently only uses the current interface - should add in 189 196 * needed ones from the default interface if current != default */ 190 197 protected Element getDisplayElement(String lang) {
Note:
See TracChangeset
for help on using the changeset viewer.