Package org.jasig.portal.mock.portlet.om

Examples of org.jasig.portal.mock.portlet.om.MockPortletWindowId


    @Test
    public void testParsePortletWindowIdSuffix() {
        final MockHttpServletRequest request = new MockHttpServletRequest();
       
        final Set<String> ids = ImmutableSet.of("pw2");
        final MockPortletWindowId expectedPortletWindowId = new MockPortletWindowId("pw2");
       
        when(this.portletWindowRegistry.getPortletWindowId(request, "pw2")).thenReturn(expectedPortletWindowId);
       
        IPortletWindowId portletWindowId = this.urlSyntaxProvider.parsePortletWindowIdSuffix(request,
                UrlSyntaxProviderImpl.PARAM_WINDOW_STATE, ids,
View Full Code Here


    @Test
    public void testParsePortletParameterName() {
        final MockHttpServletRequest request = new MockHttpServletRequest();
       
        final Set<String> ids = ImmutableSet.of("pw2");
        final MockPortletWindowId expectedPortletWindowId = new MockPortletWindowId("pw2");
       
        when(this.portletWindowRegistry.getPortletWindowId(request, "pw2")).thenReturn(expectedPortletWindowId);
       
        Tuple<String, IPortletWindowId> portletParameterInfo = this.urlSyntaxProvider.parsePortletParameterName(request, UrlSyntaxProviderImpl.PORTLET_PARAM_PREFIX + "pw2" + UrlSyntaxProviderImpl.SEPARATOR + "foo" , ids);
       
View Full Code Here

        request.addParameter("pltc_state", "detached");
        request.addParameter("pltc_mode", "view");
        request.addParameter("pltp_action", "advancedSearch");
        request.addParameter("pltp_subjectChoice", "512");
       
        final MockPortletWindowId portletWindowId1 = new MockPortletWindowId("16_ctf3_5");
       
        when(this.portalRequestUtils.getOriginalPortalRequest(request)).thenReturn(request);
        when(this.portletWindowRegistry.getOrCreateDefaultPortletWindowByFname(request, "CourseGuide-Browse-Courses")).thenReturn(this.portletWindow1);
        when(this.portletWindow1.getPortletWindowId()).thenReturn(portletWindowId1);
       
View Full Code Here

        request.setContextPath("/portal");
        request.setRequestURI("/render.userLayoutRootNode.uP");
        request.setQueryString("?uP_fname=contact-information");
        request.addParameter("uP_fname", "contact-information");
       
        final MockPortletWindowId portletWindowId1 = new MockPortletWindowId("u110l1n41");
       
        when(this.portalRequestUtils.getOriginalPortalRequest(request)).thenReturn(request);
        when(this.portletWindowRegistry.getOrCreateDefaultPortletWindowByFname(request, "contact-information")).thenReturn(this.portletWindow1);
        when(this.portletWindow1.getPortletWindowId()).thenReturn(portletWindowId1);
       
View Full Code Here

   
    @Test
    public void testEventFiltering() throws Exception {
        final String sessionId = "1234567890123_system_AAAAAAAAAAA";
        final PortalEvent.PortalEventBuilder eventBuilder = new PortalEvent.PortalEventBuilder(this, "example.com", sessionId, SystemPerson.INSTANCE, null);
        final PortletExecutionEvent.PortletExecutionEventBuilder portletExecutionEventBuilder = new PortletExecutionEvent.PortletExecutionEventBuilder(eventBuilder, new MockPortletWindowId("pw1"), "fname1", 123450000, Collections.<String, List<String>>emptyMap(), WindowState.NORMAL, PortletMode.VIEW);

        final Set<PortalEvent> portalEvents = ImmutableSet.<PortalEvent>of(
                new PortletRenderExecutionEvent(portletExecutionEventBuilder, false, false)
            );
       
View Full Code Here

    }
   
    private PortalEvent createEvent() {
        final String sessionId = "1234567890123_system_AAAAAAAAAAA";
        final PortalEvent.PortalEventBuilder eventBuilder = new PortalEvent.PortalEventBuilder(this, "example.com", sessionId, SystemPerson.INSTANCE, null);
        final PortletExecutionEvent.PortletExecutionEventBuilder portletExecutionEventBuilder = new PortletExecutionEvent.PortletExecutionEventBuilder(eventBuilder, new MockPortletWindowId("pw1"), "fname1", 123450000, Collections.<String, List<String>>emptyMap(), WindowState.NORMAL, PortletMode.VIEW);
        return new PortletRenderExecutionEvent(portletExecutionEventBuilder, false, false);
    }
View Full Code Here

        Thread.sleep(EVENT_DELAY);
        events.add(new PortletMovedInLayoutPortalEvent(eventBuilder, SystemPerson.INSTANCE, 1, "n32", "n24", "portletA"));
        Thread.sleep(EVENT_DELAY);
        events.add(new PortletDeletedFromLayoutPortalEvent(eventBuilder, SystemPerson.INSTANCE, 1, "n24", "portletA"));
       
        final PortletExecutionEvent.PortletExecutionEventBuilder portletExecutionEventBuilder = new PortletExecutionEvent.PortletExecutionEventBuilder(eventBuilder, new MockPortletWindowId("pw1"), "fname", 12345, Collections.EMPTY_MAP, WindowState.NORMAL, PortletMode.VIEW);
       
        Thread.sleep(EVENT_DELAY);
        events.add(new PortletActionExecutionEvent(portletExecutionEventBuilder));
        Thread.sleep(EVENT_DELAY);
        events.add(new PortletEventExecutionEvent(portletExecutionEventBuilder, new QName("http://www.jasig.org/foo", "event", "e")));
View Full Code Here

   
    @Test
    public void verifyOutputFormat() throws Exception {
        final String sessionId = "1234567890123_system_AAAAAAAAAAA";
        final PortalEvent.PortalEventBuilder eventBuilder = new PortalEvent.PortalEventBuilder(this, "example.com", sessionId, SystemPerson.INSTANCE, null);
        final PortletExecutionEvent.PortletExecutionEventBuilder portletExecutionEventBuilder = new PortletExecutionEvent.PortletExecutionEventBuilder(eventBuilder, new MockPortletWindowId("pw1"), "fname", 12345, Collections.EMPTY_MAP, WindowState.NORMAL, PortletMode.VIEW);

        PortalEvent event;
       
        //TODO: Will uncomment once we add in attribute swapper event processing.
        /*event = new AttributeSwapEvent(eventBuilder, Collections.EMPTY_MAP);
View Full Code Here

TOP

Related Classes of org.jasig.portal.mock.portlet.om.MockPortletWindowId

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.