Package com.volantis.synergetics.path

Examples of com.volantis.synergetics.path.Path


        throws ServletException, IOException {

        String pathInfo = request.getPathInfo();

        if (null != pathInfo) {
            Path path = Path.parse(pathInfo);
            if (path.getNumberOfFragments() > 0) {
                String externalID = path.getFragment(path.getNumberOfFragments()-1);
                externalID = externalID.replaceAll("-", "/");
              
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("Servicing request " + pathInfo);
                }
View Full Code Here


        // If in OSGI container, load configuration using OSGi mechanism
        if (context != null) {
            String configArea = context.getBundleContext().
                getProperty(BootConstants.CONTEXT_AREA);
            Path configPath = Path.parse(configArea);
            configPath = configPath.resolve(location);
            File config = new File(configPath.asPlatformSpecificString());

            try {
                is = new FileInputStream(config);

                if (LOGGER.isInfoEnabled()) {
View Full Code Here

    }

    private void processPath(URI request, MutableParameters params)
            throws ParameterBuilderException {

        Path requestPath = Path.parse(request.getPath());
        String rule = getRule(requestPath);
        if (rule == null || "".equals(rule)) {
            throw new ParameterBuilderException(
                    EXCEPTION_LOCALIZER.format("conversion-rule-not-set",
                                               request.toString()));
View Full Code Here

        int fragments = requestPath.getNumberOfFragments();
        if (fragments < 2) {
            throw new ParameterBuilderException(EXCEPTION_LOCALIZER.format("invalid-request", requestPath));
        }
        Path p1 = new Path(requestPath, 0, fragments - 2);
        String name = requestPath.getFragment(fragments - 1);
        p1 = p1.resolve(name);
        return p1;
    }
View Full Code Here

     * @return the resolved absolute url as the client should see it. Note
     * that absolute URLs passed to this metho are returned unchanged.
     */
    public MarinerURL resolveURLRelativeToClient(MarinerURL url) {
        MarinerURL result = url; // if absolute then pass through
        Path path = Path.parse(getRequestURL(false).getPath());
        if (url.isRelative()) {
            // if the url is relative then resolve the paths
            // we only care if it has more then one fragment (i.e. its a
            // page request) so trim the requested page and resolve
            // relative
            if (path.getNumberOfFragments() > 1) {
                path = new Path(path, 0, path.getNumberOfFragments()-1);
                // resolve the url to request url after url is truncated.
                path = path.resolve(url.getPath());
                result = getRequestURL(true);
                result.setPath(path.asString());
            }
            // get the client accessible URL
            result = getVolantisBean().getClientAccessibleURL(result);  
        }
        return result;
View Full Code Here

TOP

Related Classes of com.volantis.synergetics.path.Path

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.