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/core/TransformingReceptionist.java

    r24884 r24993  
    763763        //Transformation of the XML message from the receptionist to HTML with doctype
    764764
    765         if(inlineTemplate != null)
     765        if (inlineTemplate != null)
    766766        {
    767767            try
     
    770770                GSXSLT.mergeStylesheets(skinAndLibraryDoc, inlineTemplateDoc.getDocumentElement());
    771771            }
    772             catch(Exception ex)
     772            catch (Exception ex)
    773773            {
    774774                ex.printStackTrace();
    775775            }
    776776        }
    777        
     777
    778778        if (skinAndLibraryDoc.getElementsByTagName("gsf:metadata").getLength() > 0)
    779779        {
    780             secondConfigFormatPass(collection, skinAndLibraryDoc, doc, request.getAttribute("lang"), request.getAttribute("uid"));
     780            secondConfigFormatPass(collection, skinAndLibraryDoc, doc, new UserContext(request));
    781781        }
    782782
     
    795795    }
    796796
    797     protected void secondConfigFormatPass(String collection, Document skinAndLibraryDoc, Document doc, String lang, String uid)
     797    protected void secondConfigFormatPass(String collection, Document skinAndLibraryDoc, Document doc, UserContext userContext)
    798798    {
    799799        String to = GSPath.appendLink(collection, "DocumentMetadataRetrieve"); // Hard-wired?
    800800        Element metaMessage = this.doc.createElement(GSXML.MESSAGE_ELEM);
    801         Element metaRequest = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, to, lang, uid);
     801        Element metaRequest = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, to, userContext);
    802802        Element paramList = this.doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    803803        Element docNodeList = this.doc.createElement(GSXML.DOC_NODE_ELEM + GSXML.LIST_MODIFIER);
Note: See TracChangeset for help on using the changeset viewer.