Package org.openxri.server.URIMapper

Examples of org.openxri.server.URIMapper.URIData


    {
        soLog.debug("doGet()");

        try
        {
            URIData oData = moMapper.parseRequest(oReq);

            // if we get no data, hand off processing to the installed plugin
            if (oData == null)
            {
                if (moPlugin != null)
                {
                    moPlugin.processCustomRequest(oReq, oResp);
                }
                else
                {
                    sendNotFound(oResp);
                }
                   
                return;
            }

            // if we are in proxy mode, try to resolve externally
            String sAccept = oReq.getHeader(Tags.HEADER_ACCEPT);
           
            boolean bSigned = false;
            /** TODO determine if content type trust parameter has SAML
            boolean bSigned =
                (sAccept != null) &&
                (sAccept.startsWith(Tags.CONTENT_TYPE_XRID_TRUSTED));
            */
            if (oData.isProxied())
            {
                processProxyRequest(oData.getResolveData(), bSigned, oResp);
            }
            else
            {
                String sID = oData.getID();
                if (sID == null)
                {
                    sID = getAuthorityIDFromNS(oData.getNS());
                }
                processDirectRequest(
                    oData.getResolveData(), sID, bSigned, oResp);
            }
        }
        catch (IOException oEx)
        {
            // log and send a 404
View Full Code Here


        if ((sQuery == null) || (sQuery.length() == 0))
        {
            return null;
        }

        URIData oRetval = new URIData();

        // Gather the resolve data
        if ((sPath != null) && (sPath.length() > 1) &&
            (sPath.charAt(0) == '/'))
        {
            // Trim the slash
            sPath = sPath.substring(1);
            oRetval.setResolveData(sPath);
        }
        else
        {
            return null;
        }

        // Determine the type of real query we have
        String sLowQuery = sQuery.toLowerCase();
        if (sLowQuery.startsWith("proxy=true"))
        {
            oRetval.setProxied(true);
        }
        else if (sLowQuery.startsWith("ns="))
        {
            oRetval.setNS(sQuery.substring(3));
        }
        else if (sLowQuery.startsWith("id="))
        {
            oRetval.setID(sQuery.substring(3));
        }
        else
        {
            // we have no idea what was being asked at
            // this point
View Full Code Here

TOP

Related Classes of org.openxri.server.URIMapper.URIData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.