Package aQute.bnd.osgi

Examples of aQute.bnd.osgi.Macro$Link


                    }
                    String version = parts[1];
                    if (!version.startsWith("[") && !version.startsWith("(")) {
                        Processor processor = new Processor();
                        processor.setProperty("@", VersionTable.getVersion(version).toString());
                        Macro macro = new Macro(processor);
                        version = macro.process("${range;[==,=+)}");
                    }
                    VersionRange range = new VersionRange(version);
                    Map<String, String> hdrs = ranges.get(range);
                    if (hdrs == null) {
                        hdrs = new HashMap<String, String>();
View Full Code Here


    protected static void addDependency(FeatureResource resource, String name, String version, String featureRange) {
        if (!version.startsWith("[") && !version.startsWith("(")) {
            Processor processor = new Processor();
            processor.setProperty("@", VersionTable.getVersion(version).toString());
            Macro macro = new Macro(processor);
            version = macro.process(featureRange);
        }
        Map<String, String> dirs;
        Map<String, Object> attrs;
        dirs = new HashMap<String, String>();
        attrs = new HashMap<String, Object>();
View Full Code Here

    public void registerMatchingFeatures(String name, String version) throws IOException {
        if (!version.startsWith("[") && !version.startsWith("(")) {
            Processor processor = new Processor();
            processor.setProperty("@", VersionTable.getVersion(version).toString());
            Macro macro = new Macro(processor);
            version = macro.process(featureRange);
        }
        registerMatchingFeatures(name, new VersionRange(version));
    }
View Full Code Here

    @Test
    public void testRange() throws Exception {
        Processor processor = new Processor();
        processor.setProperty("@", "1.2.3.redhat-61-SNAPSHOT");
        Macro macro = new Macro(processor);

        assertEquals("[1.2,1.3)", macro.process("${range;[==,=+)}"));
        assertEquals("[1.2.3.redhat-61-SNAPSHOT,2)", macro.process("${range;[====,+)}"));
    }
View Full Code Here

                boolean handled = requestHandler.service(request, response);

                if (!handled) { throw new RuntimeException(String.format(
                        "Request was not handled: '%s' may not be a valid page name.", pageName)); }

                Link link = response.getRedirectLink();

                if (link != null)
                {
                    setupRequestFromLink(link);
                    continue;
View Full Code Here

                if (!handled)
                    throw new RuntimeException(String.format("Request for path '%s' was not handled by Tapestry.",
                            request.getPath()));

                Link link = response.getRedirectLink();

                if (link != null)
                {
                    setupRequestFromLink(link);
                    continue;
View Full Code Here

        // Page is secure but request is not, so redirect.
        // We can safely ignore the forForm parameter since secure form requests are alway done from
        // an already secured page

        Link link = componentEventLinkEncoder.createComponentEventLink(parameters, false);
       
        response.sendRedirect(link);
       
        return true;
    }
View Full Code Here

        if (!needsRedirect(parameters.getLogicalPageName()))
            return false;

        // Page is secure but request is not, so redirect.

        Link link = componentEventLinkEncoder.createPageRenderLink(parameters);

        response.sendRedirect(link);

        return true;
    }
View Full Code Here

        train_encodeRedirectURL(response, URI, ENCODED);

        replay();

        Link link = new LinkImpl(URI, true, false, response, optimizer);

        assertEquals(link.toRedirectURI(), ENCODED);

        verify();
    }
View Full Code Here

        train_optimizePath(optimizer, "/bar/" + RAW_PATH, OPTIMIZED);
        train_encodeURL(response, OPTIMIZED, ENCODED);

        replay();

        Link link = new LinkImpl("/bar/" + RAW_PATH, true, false, response, optimizer);

        assertEquals(link.toString(), ENCODED);

        verify();
    }
View Full Code Here

TOP

Related Classes of aQute.bnd.osgi.Macro$Link

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.