Package java.util

Examples of java.util.LinkedList$Link


        String expectedURI = "/ctx/foo?barney=&fred=flintstone";
        train_encodeURL(response, expectedURI, expectedURI);

        replay();

        Link link = new LinkImpl("/ctx/foo", false, LinkSecurity.INSECURE, response, null, null);

        link.addParameter("fred", "flintstone");
        link.addParameter("barney", null);

        assertEquals(link.toURI(), expectedURI);

        verify();
    }
View Full Code Here


        train_encodeURL(response, SECURE_BASE_URL + BASE_PATH, ENCODED);

        replay();

        Link link = new LinkImpl(BASE_PATH, false, LinkSecurity.INSECURE, response, null, baseURLSource);

        link.setSecurity(LinkSecurity.FORCE_SECURE);

        assertEquals(link.toAbsoluteURI(), ENCODED);

        verify();
    }
View Full Code Here

    //small hack for test simplicity: we'll generate a new page link, add any parameters we find in the current
    //request, and redirect to that instead of the default.
    private Link buildLink()
    {
        Link l = linkSource.createPageRenderLink(LinkQueryParameters.class);
        for(String param : request.getParameterNames())
        {
            l.addParameter(param,request.getParameter(param));
        }

        return l;
    }
View Full Code Here

        Request request = mockRequest();
        Response response = mockResponse();
        LinkSource linkSource = mockLinkSource();
        MetaDataLocator locator = mockMetaDataLocator();
        BaseURLSource source = mockBaseURLSource();
        Link link = mockLink();

        train_isSecure(request, false);

        train_isSecure(locator, PAGE_NAME, true);
View Full Code Here

        PageRenderRequestParameters parameters =
                new PageRenderRequestParameters(canonical,
                                                new ArrayEventContext(typeCoercer, context));

        Link link = linkFactory.createPageRenderLink(parameters);

        for (LinkCreationListener listener : listeners)
            listener.createdPageRenderLink(link);

        return link;
View Full Code Here

        if (!isSecure(pageName)) return false;

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

        Link link = linkSource.createPageRenderLink(pageName, false);

        response.sendRedirect(link);

        return true;
    }
View Full Code Here

                eventType,
                new ArrayEventContext(typeCoercer, pageActivationContext),
                new ArrayEventContext(typeCoercer, eventContext));


        Link link = linkFactory.createComponentEventLink(parameters, forForm);

        for (LinkCreationListener listener : listeners)
            listener.createdComponentEventLink(link);

        return link;
View Full Code Here

            builder.append(eventType.toLowerCase());
        }

        appendContext(parameters.getEventContext(), builder);

        Link result = new LinkImpl(builder.toString(), baseURL == null, forForm, response, optimizer);

        EventContext pageActivationContext = parameters.getPageActivationContext();

        if (pageActivationContext.getCount() != 0)
        {
            // Reuse the builder           
            builder.setLength(0);
            appendContext(pageActivationContext, builder);

            // Omit that first slash
            result.addParameter(InternalConstants.PAGE_CONTEXT_NAME, builder.substring(1));
        }

        // TAPESTRY-2044: Sometimes the active page drags in components from another page and we
        // need to differentiate that.

        if (!containingPageName.equalsIgnoreCase(activePageName))
            result.addParameter(InternalConstants.CONTAINER_PAGE_NAME, containingPageName.toLowerCase());

        return result;
    }
View Full Code Here

        resources.renderInformalParameters(writer);

        e.addClassName("t-zone");

        Link link = resources.createEventLink(EventConstants.ACTION, context);

        JSONObject spec = new JSONObject();

        if (InternalUtils.isNonBlank(update))
            spec.put("update", update.toLowerCase());

        spec.put("element", clientId);
        spec.put("url", link.toURI());

        jsSupport.addInitializerCall("progressiveDisplay", spec);

        return initial;
    }
View Full Code Here

                {
                    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

TOP

Related Classes of java.util.LinkedList$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.