Package org.apache.beehive.netui.core.urls

Examples of org.apache.beehive.netui.core.urls.FreezableMutableURI


        }
       
        actionURI.append( actionName );
        if ( ! actionName.endsWith( ACTION_EXTENSION ) ) actionURI.append( ACTION_EXTENSION );
       
        FreezableMutableURI uri = new FreezableMutableURI();
        uri.setEncoding( response.getCharacterEncoding() );
        uri.setURI( actionURI.toString(), true );
        return uri;
    }
View Full Code Here


        if (urlConfig != null) {
            encoded = !urlConfig.isUrlEncodeUrls();
        }

        FreezableMutableURI uri = new FreezableMutableURI();
        uri.setEncoding( response.getCharacterEncoding() );
        uri.setURI( path, encoded );

        if ( params != null )
        {
            uri.addParameters( params, false );
        }

        if ( fragment != null )
        {
            uri.setFragment( uri.encode( fragment ) );
        }

        URIContext uriContext = URIContextFactory.getInstance( forXML );
        if ( uri.isAbsolute() )
        {
            return uri.getURIString( uriContext );
        }

        if ( path.length() != 0 && path.charAt( 0 ) !=  '/' )
        {
            String reqUri = request.getRequestURI();
            String reqPath = reqUri.substring( 0, reqUri.lastIndexOf( '/' ) + 1 );
            uri.setPath( reqPath + uri.getPath() );
        }

        boolean needsToBeSecure = needsToBeSecure( servletContext, request, uri.getPath(), true );
        URLRewriterService.rewriteURL( servletContext, request, response, uri, urlType, needsToBeSecure );
        String key = getURLTemplateKey( urlType, needsToBeSecure );

        return URLRewriterService.getTemplatedURL( servletContext, request, uri, key, uriContext );
    }
View Full Code Here

            UrlConfig urlConfig = ConfigUtil.getConfig().getUrlConfig();
            if (urlConfig != null && urlConfig.isSetUrlEncodeUrls()) {
                encoded = !urlConfig.getUrlEncodeUrls();
            }

            FreezableMutableURI uri = new FreezableMutableURI();
            uri.setEncoding(response.getCharacterEncoding());
            uri.setURI(url, encoded);
            boolean needsToBeSecure = false;
            if (_params != null) {
                uri.addParameters(_params, false );
            }
            if (!uri.isAbsolute() && PageFlowUtils.needsToBeSecure(context, request, url, true)) {
                needsToBeSecure = true;
            }

            URLRewriterService.rewriteURL(context, request, response, uri, URLType.ACTION, needsToBeSecure);
            String key = PageFlowUtils.getURLTemplateKey(URLType.ACTION, needsToBeSecure);
View Full Code Here

        }
       
        actionURI.append( actionName );
        if ( ! actionName.endsWith( ACTION_EXTENSION ) ) actionURI.append( ACTION_EXTENSION );
       
        FreezableMutableURI uri = new FreezableMutableURI();
        uri.setEncoding( response.getCharacterEncoding() );
        uri.setURI( actionURI.toString(), true );
        return uri;
    }
View Full Code Here

        if (urlConfig != null && urlConfig.isSetUrlEncodeUrls()) {
            encoded = !urlConfig.getUrlEncodeUrls();
        }

        FreezableMutableURI uri = new FreezableMutableURI();
        uri.setEncoding( response.getCharacterEncoding() );
        uri.setURI( path, encoded );

        if ( params != null )
        {
            uri.addParameters( params, false );
        }

        if ( fragment != null )
        {
            uri.setFragment( uri.encode( fragment ) );
        }

        URIContext uriContext = URIContextFactory.getInstance( forXML );
        if ( uri.isAbsolute() )
        {
            return uri.getURIString( uriContext );
        }

        if ( path.length() != 0 && path.charAt( 0 ) !=  '/' )
        {
            String reqUri = request.getRequestURI();
            String reqPath = reqUri.substring( 0, reqUri.lastIndexOf( '/' ) + 1 );
            uri.setPath( reqPath + uri.getPath() );
        }

        boolean needsToBeSecure = needsToBeSecure( servletContext, request, uri.getPath(), true );
        URLRewriterService.rewriteURL( servletContext, request, response, uri, urlType, needsToBeSecure );
        String key = getURLTemplateKey( urlType, needsToBeSecure );

        return URLRewriterService.getTemplatedURL( request, uri, key, uriContext );
    }
View Full Code Here

            UrlConfig urlConfig = ConfigUtil.getConfig().getUrlConfig();
            if (urlConfig != null) {
                encoded = !urlConfig.isUrlEncodeUrls();
            }

            FreezableMutableURI uri = new FreezableMutableURI();
            uri.setEncoding(response.getCharacterEncoding());
            uri.setURI(url, encoded);
            boolean needsToBeSecure = false;
            if (_params != null) {
                uri.addParameters(_params, false );
            }
            if (!uri.isAbsolute() && PageFlowUtils.needsToBeSecure(context, request, url, true)) {
                needsToBeSecure = true;
            }

            URLRewriterService.rewriteURL(context, request, response, uri, URLType.ACTION, needsToBeSecure);
            String key = PageFlowUtils.getURLTemplateKey(URLType.ACTION, needsToBeSecure);
View Full Code Here

        }
       
        actionURI.append( actionName );
        if ( ! actionName.endsWith( ACTION_EXTENSION ) ) actionURI.append( ACTION_EXTENSION );
       
        FreezableMutableURI uri = new FreezableMutableURI();
        uri.setEncoding( response.getCharacterEncoding() );
        uri.setURI( actionURI.toString(), true );
        return uri;
    }
View Full Code Here

        if (urlConfig != null) {
            encoded = !urlConfig.isUrlEncodeUrls();
        }

        FreezableMutableURI uri = new FreezableMutableURI();
        uri.setEncoding( response.getCharacterEncoding() );
        uri.setURI( path, encoded );

        if ( params != null )
        {
            uri.addParameters( params, false );
        }

        if ( fragment != null )
        {
            uri.setFragment( uri.encode( fragment ) );
        }

        URIContext uriContext = URIContextFactory.getInstance( forXML );
        if ( uri.isAbsolute() )
        {
            return uri.getURIString( uriContext );
        }

        if ( path.length() != 0 && path.charAt( 0 ) !=  '/' )
        {
            String reqUri = request.getRequestURI();
            String reqPath = reqUri.substring( 0, reqUri.lastIndexOf( '/' ) + 1 );
            uri.setPath( reqPath + uri.getPath() );
        }

        boolean needsToBeSecure = needsToBeSecure( servletContext, request, uri.getPath(), true );
        URLRewriterService.rewriteURL( servletContext, request, response, uri, urlType, needsToBeSecure );
        String key = getURLTemplateKey( urlType, needsToBeSecure );

        return URLRewriterService.getTemplatedURL( servletContext, request, uri, key, uriContext );
    }
View Full Code Here

            UrlConfig urlConfig = ConfigUtil.getConfig().getUrlConfig();
            if (urlConfig != null) {
                encoded = !urlConfig.isUrlEncodeUrls();
            }

            FreezableMutableURI uri = new FreezableMutableURI();
            uri.setEncoding(response.getCharacterEncoding());
            uri.setURI(url, encoded);
            boolean needsToBeSecure = false;
            if (_params != null) {
                uri.addParameters(_params, false );
            }
            if (!uri.isAbsolute() && PageFlowUtils.needsToBeSecure(context, request, url, true)) {
                needsToBeSecure = true;
            }

            URLRewriterService.rewriteURL(context, request, response, uri, URLType.ACTION, needsToBeSecure);
            String key = PageFlowUtils.getURLTemplateKey(URLType.ACTION, needsToBeSecure);
View Full Code Here

        }
       
        actionURI.append( actionName );
        if ( ! actionName.endsWith( ACTION_EXTENSION ) ) actionURI.append( ACTION_EXTENSION );
       
        FreezableMutableURI uri = new FreezableMutableURI();
        uri.setEncoding( response.getCharacterEncoding() );
        uri.setPath( actionURI.toString() );
        return uri;
    }
View Full Code Here

TOP

Related Classes of org.apache.beehive.netui.core.urls.FreezableMutableURI

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.