Package nexj.core.meta.integration.service

Examples of nexj.core.meta.integration.service.Sync$Link


            builder.append(encodePageName(eventType));
        }

        appendContext(true, 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(true, 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,
                    encodePageName(containingPageName));

        return result;
    }
View Full Code Here


        if (authenticator.isLoggedIn())
        {
            // Logged user should not go back to Signin or Signup
            if (signinPage.equalsIgnoreCase(pageName) || signupPage.equalsIgnoreCase(pageName))
            {
                Link link = renderLinkSource.createPageRenderLink(defaultPage);
                response.sendRedirect(link);
                return true;
            }
            return false;
        }

        Component page = componentSource.getPage(pageName);

        if (page.getClass().isAnnotationPresent(AnonymousAccess.class)) { return false; }

        Link link = renderLinkSource.createPageRenderLink("Signin");

        response.sendRedirect(link);

        return true;
    }
View Full Code Here

        return userWorkspace.getNotConfirmed();
    }

    public Link getBookLink()
    {
        Link result = linkSource.createPageRenderLinkWithContext("book", current.getHotel());
        return result;
    }
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, map, null, optimizer, null, contextValueEncoder,
                                                  securityManager);

        factory.addListener(listener);

        Link link = factory.createPageLink(page, false);

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

                                                  contextValueEncoder,
                                                  securityManager);

        factory.addListener(listener);

        Link link = factory.createPageLink(page, false);

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, map, null, optimizer, null, contextValueEncoder,
                                                  securityManager);
        factory.addListener(listener);

        Link link = factory.createPageLink(page, false, "biff", "bazz");

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, map, null, optimizer, null, contextValueEncoder,
                                                  securityManager);
        factory.addListener(listener);

        Link link = factory.createPageLink(page, true);

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, map, cache, optimizer, null, contextValueEncoder,
                                                  securityManager);
        factory.addListener(listener);

        Link link = factory.createPageLink(PAGE_LOGICAL_NAME, false);

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, map, cache, optimizer, null, contextValueEncoder,
                                                  securityManager);
        factory.addListener(listener);

        Link link = factory.createPageLink(logicalName, false);

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

        LinkFactory factory = new LinkFactoryImpl(request, response, map, cache, optimizer, null, contextValueEncoder,
                                                  securityManager);
        factory.addListener(listener);

        Link link = factory.createPageLink(logicalName, false);

        assertEquals(link.toRedirectURI(), ENCODED);

        // Make sure the link was passed to the LinkFactoryListener

        assertSame(link, holder.get());
View Full Code Here

TOP

Related Classes of nexj.core.meta.integration.service.Sync$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.