Examples of IPortletWindowRegistry


Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

       
        final IPortletWindow portletWindow = createMock(IPortletWindow.class);
        expect(portletWindow.getExpirationCache()).andReturn(null);
       

        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        expect(portletWindowRegistry.getPortletWindow(pcsRequest, portletWindowId)).andReturn(portletWindow);
        expect(portletWindowRegistry.getParentPortletEntity(pcsRequest, portletWindowId)).andReturn(portletEntity);
       
       
        final IPortletRequestParameterManager portletRequestParameterManager = createMock(IPortletRequestParameterManager.class);
        expect(portletRequestParameterManager.getPortletRequestInfo(pcsRequest, portletWindowId)).andReturn(null);
       
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

       
        MockPortletEntity portletEntity = new MockPortletEntity();
        portletEntity.setPortletEntityId(portletEntityId);
        portletEntity.setChannelSubscribeId(portletEntityId.getStringId());
       
        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId))
            .andReturn(portletEntity)
            .anyTimes();
       
        final MockPortletWindowId transientPortletWindowId = new MockPortletWindowId("tp.windowId1");
        expect(portletWindowRegistry.createTransientPortletWindowId(request, portletWindowId))
            .andReturn(transientPortletWindowId)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId))
            .andReturn(true)
            .anyTimes();
       
        expect(portletWindowRegistry.getDefaultPortletWindowId(portletEntityId))
            .andReturn(portletWindowId)
            .anyTimes();
       
        expect(portletWindowRegistry.getPortletWindow(request, portletWindowId))
            .andReturn(portletWindow)
            .anyTimes();
       
        replay(portletWindowRegistry);
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

       
        final MockPortletEntity portletEntity2 = new MockPortletEntity();
        portletEntity2.setPortletEntityId(portletEntityId2);
        portletEntity2.setChannelSubscribeId(portletEntityId2.getStringId());
       
        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId1))
            .andReturn(portletEntity1)
            .anyTimes();
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId2))
            .andReturn(portletEntity2)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId2))
            .andReturn(true)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId1))
            .andReturn(false)
            .anyTimes();
       
        expect(portletWindowRegistry.getDefaultPortletWindowId(portletEntityId1))
            .andReturn(portletWindowId1)
            .anyTimes();
       
        expect(portletWindowRegistry.getPortletWindow(request, portletWindowId1))
            .andReturn(portletWindow1)
            .anyTimes();

        final IPortletDelegationManager portletDelegationManager = createMock(IPortletDelegationManager.class);
       
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

       
        final MockPortletEntity portletEntity2 = new MockPortletEntity();
        portletEntity2.setPortletEntityId(portletEntityId2);
        portletEntity2.setChannelSubscribeId(portletEntityId2.getStringId());
       
        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId1))
            .andReturn(portletEntity1)
            .anyTimes();
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId2))
            .andReturn(portletEntity2)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId2))
            .andReturn(true)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId1))
            .andReturn(false)
            .anyTimes();
       
        expect(portletWindowRegistry.getDefaultPortletWindowId(portletEntityId1))
            .andReturn(portletWindowId1)
            .anyTimes();
       
        expect(portletWindowRegistry.getPortletWindow(request, portletWindowId1))
            .andReturn(portletWindow1)
            .anyTimes();

        final IPortletDelegationManager portletDelegationManager = createMock(IPortletDelegationManager.class);
       
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

       
        final MockPortletEntity portletEntity3 = new MockPortletEntity();
        portletEntity3.setPortletEntityId(portletEntityId3);
        portletEntity3.setChannelSubscribeId(portletEntityId3.getStringId());
       
        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId1))
            .andReturn(portletEntity1)
            .anyTimes();
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId2))
            .andReturn(portletEntity2)
            .anyTimes();
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId3))
            .andReturn(portletEntity3)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId3))
            .andReturn(true)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId2))
            .andReturn(true)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId1))
            .andReturn(false)
            .anyTimes();
       
        expect(portletWindowRegistry.getDefaultPortletWindowId(portletEntityId1))
            .andReturn(portletWindowId1)
            .anyTimes();
       
        expect(portletWindowRegistry.getPortletWindow(request, portletWindowId1))
            .andReturn(portletWindow1)
            .anyTimes();
       
        expect(portletWindowRegistry.getPortletWindow(request, portletWindowId2))
            .andReturn(portletWindow2)
            .anyTimes();
       
        final IPortletDelegationManager portletDelegationManager = createMock(IPortletDelegationManager.class);
       
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

       
        final MockPortletEntity portletEntity3 = new MockPortletEntity();
        portletEntity3.setPortletEntityId(portletEntityId3);
        portletEntity3.setChannelSubscribeId(portletEntityId3.getStringId());
       
        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId1))
            .andReturn(portletEntity1)
            .anyTimes();
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId2))
            .andReturn(portletEntity2)
            .anyTimes();
        expect(portletWindowRegistry.getParentPortletEntity(request, portletWindowId3))
            .andReturn(portletEntity3)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId3))
            .andReturn(true)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId2))
            .andReturn(true)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, portletWindowId1))
            .andReturn(false)
            .anyTimes();
       
        expect(portletWindowRegistry.getDefaultPortletWindowId(portletEntityId1))
            .andReturn(portletWindowId1)
            .anyTimes();
       
        expect(portletWindowRegistry.getPortletWindow(request, portletWindowId1))
            .andReturn(portletWindow1)
            .anyTimes();
       
        expect(portletWindowRegistry.getPortletWindow(request, portletWindowId2))
            .andReturn(portletWindow2)
            .anyTimes();
       
        final IPortletDelegationManager portletDelegationManager = createMock(IPortletDelegationManager.class);
       
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

        }
        catch (IllegalArgumentException iae) {
        }
       
       
        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        final IUserInstanceManager userInstanceManager = createMock(IUserInstanceManager.class);
        final IUserInstance userInstance = createMock(IUserInstance.class);
        final IUserPreferencesManager userPreferencesManager = createMock(IUserPreferencesManager.class);
        final IUserLayoutManager userLayoutManager = createMock(IUserLayoutManager.class);
        final IUserLayoutChannelDescription userLayoutChannelDescription = createMock(IUserLayoutChannelDescription.class);
        final IPortletDefinitionRegistry portletDefinitionRegistry = createMock(IPortletDefinitionRegistry.class);
        final IPortletDefinition portletDefinition = createMock(IPortletDefinition.class);
        final IChannelDefinition channelDefinition = createMock(IChannelDefinition.class);
        final IPerson person = createMock(IPerson.class);
        final IPortletEntityRegistry portletEntityRegistry = createMock(IPortletEntityRegistry.class);
        final IPortletEntity portletEntity = createMock(IPortletEntity.class);
        final IPortletWindow portletWindow = createMock(IPortletWindow.class);
       
        final MockPortletDefinitionId portletDefinitionId = new MockPortletDefinitionId("42");
        final MockPortletEntityId portletEntityId = new MockPortletEntityId("subId1");
        final MockPortletWindowId portletWindowId = new MockPortletWindowId("windowId1");
       
        expect(userInstanceManager.getUserInstance(request)).andReturn(userInstance);
        expect(userInstance.getPreferencesManager()).andReturn(userPreferencesManager);
        expect(userPreferencesManager.getUserLayoutManager()).andReturn(userLayoutManager);
        expect(userLayoutManager.getSubscribeId("my-info-student-center-home")).andReturn("subId1");
        expect(userLayoutManager.getNode("subId1")).andReturn(userLayoutChannelDescription);
        expect(userLayoutChannelDescription.getChannelPublishId()).andReturn("42");
        expect(portletDefinitionRegistry.getPortletDefinition(42)).andReturn(portletDefinition);
        expect(portletDefinition.getChannelDefinition()).andReturn(channelDefinition);
        expect(channelDefinition.isPortlet()).andReturn(true);
        expect(userInstance.getPerson()).andReturn(person);
        expect(portletDefinition.getPortletDefinitionId()).andReturn(portletDefinitionId);
        expect(person.getID()).andReturn(37);
        expect(portletEntityRegistry.getOrCreatePortletEntity(portletDefinitionId, "subId1", 37)).andReturn(portletEntity);
        expect(portletEntity.getPortletEntityId()).andReturn(portletEntityId);
        expect(portletWindowRegistry.createDefaultPortletWindow(request, portletEntityId)).andReturn(portletWindow);
        expect(portletWindow.getPortletWindowId()).andReturn(portletWindowId);
        expect(portletWindowRegistry.createTransientPortletWindowId(request, portletWindowId)).andReturn(portletWindowId);
       
        replay(portletWindowRegistry, userInstanceManager, userInstance, userPreferencesManager, userLayoutManager,
                userLayoutChannelDescription, portletDefinitionRegistry, portletDefinition, channelDefinition, person,
                portletEntityRegistry, portletEntity, portletWindow);
       
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

        }
        catch (IllegalArgumentException iae) {
        }
       
       
        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        expect(portletWindowRegistry.getPortletWindowId("windowId1"))
            .andReturn(new MockPortletWindowId("windowId1"))
            .anyTimes();
       
       
        replay(portletWindowRegistry);
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

       
        final MockPortletWindowId wId1 = new MockPortletWindowId("wId1");
        final MockPortletWindowId wId2 = new MockPortletWindowId("wId2");
        final MockPortletWindowId wId3 = new MockPortletWindowId("wId3");
       
        final IPortletWindowRegistry portletWindowRegistry = createMock(IPortletWindowRegistry.class);
        expect(portletWindowRegistry.getPortletWindowId("wId1"))
            .andReturn(wId1)
            .anyTimes();
        expect(portletWindowRegistry.getPortletWindowId("wId2"))
            .andReturn(wId2)
            .anyTimes();
        expect(portletWindowRegistry.getPortletWindowId("wId3"))
            .andReturn(wId3)
            .anyTimes();
       
        expect(portletWindowRegistry.isTransient(request, wId2))
            .andReturn(true)
            .anyTimes();
        expect(portletWindowRegistry.isTransient(request, wId3))
            .andReturn(true)
            .anyTimes();
       

        final MockPortletWindow w2 = new MockPortletWindow();
        w2.setDelegationParent(wId1);
        expect(portletWindowRegistry.getPortletWindow(request, wId2))
            .andReturn(w2)
            .anyTimes();
       
        final MockPortletWindow w3 = new MockPortletWindow();
        w3.setDelegationParent(wId2);
        expect(portletWindowRegistry.getPortletWindow(request, wId3))
            .andReturn(w3)
            .anyTimes();
       
       
        replay(portletWindowRegistry);
View Full Code Here

Examples of org.jasig.portal.portlet.registry.IPortletWindowRegistry

    MockPortletWindowId portletWindowId = new MockPortletWindowId("123");
    MockPortletDefinitionId portletDefinitionId = new MockPortletDefinitionId(789);
   
    when(portletDescriptor.getCacheScope()).thenReturn(null);
   
    final IPortletWindowRegistry portletWindowRegistry = mock(IPortletWindowRegistry.class);
    final IPortletWindow portletWindow = mock(IPortletWindow.class);
    final IPortletEntity portletEntity = mock(IPortletEntity.class);
   
    when(portletWindowRegistry.getPortletWindow(httpRequest, portletWindowId)).thenReturn(portletWindow);
        when(portletWindow.getPortletEntity()).thenReturn(portletEntity);
    when(portletWindow.getWindowState()).thenReturn(WindowState.NORMAL);
    when(portletWindow.getPortletMode()).thenReturn(PortletMode.VIEW);
    when(portletEntity.getPortletDefinitionId()).thenReturn(portletDefinitionId);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.