Package org.jasig.portal.portlet.registry

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


    when(portletDefinition.getPortletDefinitionId()).thenReturn(portletDefinitionId);
   
    IPersonAttributeDao personAttributeDao = mock(IPersonAttributeDao.class);
    when(personAttributeDao.getPerson("username")).thenReturn(personAttributes);
 
    IPortletWindowRegistry portletWindowRegistry = mock(IPortletWindowRegistry.class);
    when(portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow)).thenReturn(portletWindow);
   
    List<UserAttributeType> userAttributesList = new ArrayList<UserAttributeType>();
    UserAttributeType userAttribute = new UserAttributeType();
    userAttribute.setName("attribute1");
    userAttributesList.add(userAttribute);
View Full Code Here


    @Test
    public void testSerializing() throws Exception {
        final MockHttpServletRequest request = new MockHttpServletRequest();
        final MockHttpServletResponse response = new MockHttpServletResponse();
        final IPortletWindowRegistry portletWindowRegistry = mock(IPortletWindowRegistry.class);
       
        when(xmlUtilities.getHtmlOutputFactory()).thenReturn(XMLOutputFactory.newFactory());
       
        //Setup a simple pass-through parent
        staxSerializingComponent.setWrappedComponent(new SimpleStAXSource());
        staxSerializingComponent.setXmlUtilities(xmlUtilities);

        final IPortletWindow portletWindow = mock(IPortletWindow.class);
        when(portletWindowRegistry.getPortletWindow(Matchers.eq(request), Matchers.any(StartElement.class))).thenReturn(new Tuple<IPortletWindow, StartElement>(portletWindow, null));
        when(portletWindowRegistry.getOrCreateDefaultPortletWindowByLayoutNodeId(Matchers.eq(request), Matchers.anyString())).thenReturn(portletWindow);
       
        final PortletContentPlaceholderEventSource contentPlaceholderEventSource = new PortletContentPlaceholderEventSource();
        contentPlaceholderEventSource.setPortletWindowRegistry(portletWindowRegistry);

        final PortletHeaderPlaceholderEventSource headerPlaceholderEventSource = new PortletHeaderPlaceholderEventSource();
View Full Code Here

TOP

Related Classes of org.jasig.portal.portlet.registry.IPortletWindowRegistry

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.