Package org.jasig.portal

Examples of org.jasig.portal.PortalControlStructures


        }
        catch (IllegalStateException ise) {
            //expected
        }
       
        final PortalControlStructures pcs = new PortalControlStructures(new MockHttpServletRequest(), null);
        this.portletAdaptor.setPortalControlStructures(pcs);
        try {
            this.portletAdaptor.setStaticData(sd);
            fail("IllegalStateException expected, no springBeanName");
        }
View Full Code Here


    }
   
    public void testInitLifecycle() throws Exception {
        this.sd.setParameter("springBeanName", "portletChannel");
       
        final PortalControlStructures pcs = new PortalControlStructures(new MockHttpServletRequest(), null);
       
        final WebApplicationContext webApplicationContext = EasyMock.createMock(WebApplicationContext.class);
        EasyMock.expect(webApplicationContext.getBean("portletChannel", ISpringPortletChannel.class)).andReturn(this.portletChannel);
        EasyMock.replay(webApplicationContext);
View Full Code Here

        }
        catch (IllegalStateException ise) {
            //expected
        }
       
        final PortalControlStructures pcs = new PortalControlStructures(new MockHttpServletRequest(), null);
        this.portletAdaptor.setPortalControlStructures(pcs);
        try {
            this.portletAdaptor.processAction();
            fail("IllegalStateException expected, no channel runtime data");
        }
View Full Code Here

   
    public void testActionLifecycle() throws Exception {
        //Have to init first
        this.testInitLifecycle();
       
        final PortalControlStructures pcs = new PortalControlStructures(new MockHttpServletRequest(), null);
       
        final ChannelRuntimeData rd = new ChannelRuntimeData();
        this.portletAdaptor.setPortalControlStructures(pcs);
        this.portletAdaptor.setRuntimeData(rd);
       
View Full Code Here

        catch (IllegalStateException ise) {
            //expected
        }
       
       
        final PortalControlStructures pcs = new PortalControlStructures(new MockHttpServletRequest(), null);
        this.portletAdaptor.setPortalControlStructures(pcs);
        try {
            this.portletAdaptor.generateKey();
            fail("IllegalStateException expected, no channel runtime data");
        }
View Full Code Here

   
    public void testRenderLifecycle() throws Exception {
      //Have to init first
        this.testInitLifecycle();
       
        final PortalControlStructures pcs = new PortalControlStructures(new MockHttpServletRequest(), null);
       
        final ChannelRuntimeData rd = new ChannelRuntimeData();
        this.portletAdaptor.setPortalControlStructures(pcs);
        this.portletAdaptor.setRuntimeData(rd);
View Full Code Here

   
    public void testPortalEventLifecycle() throws Exception {
        //Have to init first
        this.testInitLifecycle();
       
        final PortalControlStructures pcs = new PortalControlStructures(new MockHttpServletRequest(), null);
        this.portletAdaptor.setPortalControlStructures(pcs);

        final PortalEvent ev = PortalEvent.MAXIMIZE;
       
        EasyMock.reset(this.portletChannel);
View Full Code Here

   
    public void testSessionDoneEventLifecycle() throws Exception {
        //Have to init first
        this.testInitLifecycle();
       
        final PortalControlStructures pcs = new PortalControlStructures(new MockHttpServletRequest(), null);
        this.portletAdaptor.setPortalControlStructures(pcs);

        final PortalEvent ev = PortalEvent.SESSION_DONE_EVENT;
       
        EasyMock.reset(this.portletChannel);
View Full Code Here

       
        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
       
        final PortalControlStructures portalControlStructures = new PortalControlStructures(request, response);
       
       
        final IPortletDefinitionId portDef1 = new MockPortletDefinitionId("portDef1");
       
        final IPortletDefinition portletDefinition = createMock(IPortletDefinition.class);
        expect(portletDefinition.getPortletDefinitionId()).andReturn(portDef1);
       
        final IPortletDefinitionRegistry portletDefinitionRegistry = createMock(IPortletDefinitionRegistry.class);
        expect(portletDefinitionRegistry.getPortletDefinition(1)).andReturn(portletDefinition);
       
        final IPortletEntity portletEntity = createMock(IPortletEntity.class);
       
        final IPortletEntityRegistry portletEntityRegistry = createMock(IPortletEntityRegistry.class);
        expect(portletEntityRegistry.getOrCreatePortletEntity(portDef1, "sub1", 1)).andReturn(portletEntity);
       
        final IPortletWindowId portletWindowId = new MockPortletWindowId("win1");

        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
       
        final IPortletRenderer portletRenderer = createMock(IPortletRenderer.class);
        expect(portletRenderer.doInit(portletEntity, null, portalControlStructures.getHttpServletRequest(), response))
            .andReturn(portletWindowId);
       
       
        this.springPortletChannel.setPortletDefinitionRegistry(portletDefinitionRegistry);
        this.springPortletChannel.setPortletEntityRegistry(portletEntityRegistry);
View Full Code Here

       
        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
       
        final PortalControlStructures portalControlStructures = new PortalControlStructures(request, response);
        final HttpServletRequest pcsRequest = portalControlStructures.getHttpServletRequest();
       
       
        final ChannelRuntimeData channelRuntimeData = new ChannelRuntimeData();
       
       
View Full Code Here

TOP

Related Classes of org.jasig.portal.PortalControlStructures

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.