Ignore:
Timestamp:
2012-01-26T11:50:17+13:00 (12 years ago)
Author:
sjm84
Message:

Adding UserContext to replace the use of lang and uid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/BrowseAction.java

    r24889 r24993  
    6464    }
    6565
    66     String lang = request.getAttribute(GSXML.LANG_ATT);
    67     String uid = request.getAttribute(GSXML.USER_ID_ATT);   
     66    UserContext userContext = new UserContext(request);
    6867    String to = GSPath.appendLink(collection, service_name);
    6968   
     
    7372   
    7473    Element info_message = this.doc.createElement(GSXML.MESSAGE_ELEM);
    75     Element info_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_DESCRIBE, to, lang, uid);
     74    Element info_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_DESCRIBE, to, userContext);
    7675    info_message.appendChild(info_request);
    7776   
    7877    // also get the format stuff now if there is some
    79     Element format_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_FORMAT, to, lang, uid);
     78    Element format_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_FORMAT, to, userContext);
    8079    info_message.appendChild(format_request);
    8180    // process the requests
     
    9291   
    9392    //append site metadata
    94     addSiteMetadata(page_response, lang, uid);
     93    addSiteMetadata(page_response, userContext);
    9594
    9695    // if rt=d, then we are just displaying the service
     
    135134    // get the browse structure for the selected node
    136135    Element classify_message = this.doc.createElement(GSXML.MESSAGE_ELEM);
    137     Element classify_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, to, lang, uid);
     136    Element classify_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, to, userContext);
    138137    classify_message.appendChild(classify_request);
    139138       
     
    200199    if (cl_nodes.getLength() > 0) {
    201200        did_classifier = true;
    202         Element cl_meta_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, to+"MetadataRetrieve", lang, uid);
     201        Element cl_meta_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, to+"MetadataRetrieve", userContext);
    203202        metadata_message.appendChild(cl_meta_request);
    204203       
     
    237236    if (doc_nodes.getLength() > 0) {
    238237        did_documents = true;
    239         Element doc_meta_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, GSPath.appendLink(collection, "DocumentMetadataRetrieve"), lang, uid);
     238        Element doc_meta_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, GSPath.appendLink(collection, "DocumentMetadataRetrieve"), userContext);
    240239        metadata_message.appendChild(doc_meta_request);
    241240       
Note: See TracChangeset for help on using the changeset viewer.