Examples of IPortletEntityId


Examples of org.jasig.portal.portlet.om.IPortletEntityId

        final IPortletWindow portletWindow = this.getPortletWindow(request, portletWindowId);
        if (portletWindow == null) {
            return null;
        }
       
        final IPortletEntityId parentPortletEntityId = portletWindow.getPortletEntityId();
        final IPortletEntity portletEntity = this.portletEntityRegistry.getPortletEntity(parentPortletEntityId);
        return portletEntity;
    }
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

        final IPortletWindow sourcePortletWindow = this.getPortletWindow(request, sourcePortletWindowId);
        if (sourcePortletWindow == null) {
            throw new IllegalArgumentException("No IPortletWindow exists for id: " + sourcePortletWindowId);
        }
       
        final IPortletEntityId portletEntityId = sourcePortletWindow.getPortletEntityId();
       
        //Build the transient ID from the prefix and the entity ID
        return new PortletWindowIdImpl(TRANSIENT_WINDOW_ID_PREFIX + portletEntityId.getStringId());
    }
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

    public void setPortletDelegationLocator(PortletDelegationLocator portletDelegationLocator) {
        this.portletDelegationLocator = portletDelegationLocator;
    }

    public IPortletWindowId doInit(IPortletEntity portletEntity, IPortletWindowId portletWindowId, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
        final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
        final IPortletWindow portletWindow;
        if (portletWindowId != null) {
            portletWindow = this.portletWindowRegistry.getPortletWindow(httpServletRequest, portletWindowId);
            if (portletWindow == null) {
                throw new IllegalArgumentException("Portlet window is null but a portlet window ID has been configured for it: " + portletWindowId);
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

                                               PortletContext portletContext,
                                               HttpSession httpSession,
                                               InternalPortletWindow internalPortletWindow) {
       
        final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(servletRequest, internalPortletWindow);
        final IPortletEntityId portletEntityId = portletWindow.getPortletEntityId();
        return new ScopingPortletSessionImpl(portletEntityId, portletContext, internalPortletWindow, httpSession);
    }
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

        expect(mockUserPreferencesManager.getUserLayoutManager()).andReturn(mockUserLayoutManager).times(2);
        replay(mockUserPreferencesManager);
        IUserInstance mockUser = createMock(IUserInstance.class);
        expect(mockUser.getPreferencesManager()).andReturn(mockUserPreferencesManager).times(2);
        replay(mockUser);
        IPortletEntityId mockPortletEntityId = createMock(IPortletEntityId.class);
        expect(mockPortletEntityId.getStringId()).andReturn(details.getChannelId());
        replay(mockPortletEntityId);
        IPortletWindow mockPortletWindow = createMock(IPortletWindow.class);
        expect(mockPortletWindow.getPortletEntityId()).andReturn(mockPortletEntityId);
        expect(mockPortletWindow.getWindowState()).andReturn(details.getWindowState());
        expect(mockPortletWindow.getPortletMode()).andReturn(details.getPortletMode());
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

        //If the window is transient, it is in a transient state and it is switching from a non-transient state
        else if (this.portletWindowRegistry.isTransient(request, portletWindowId) &&
                !this.transientWindowStates.contains(windowState) &&
                (windowState != null || !this.transientWindowStates.contains(previousWindowState))) {
            //Get non-transient version of id
            final IPortletEntityId portletEntityId = portletWindow.getPortletEntityId();
            final IPortletWindowId defaultPortletWindowId = this.portletWindowRegistry.getDefaultPortletWindowId(portletEntityId);
            portletWindowIdString = defaultPortletWindowId.getStringId();
           
            if (windowState == null) {
                final IPortletWindow defaultPortletWindow = this.portletWindowRegistry.getPortletWindow(request, defaultPortletWindowId);
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

        final IPerson person = this.personManager.getPerson(request);
       
        final String transientChannelSubscribeId = "CONFIG_" + portletDefinitionId;
        final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreatePortletEntity(portletDefinitionId, transientChannelSubscribeId, person.getID());
       
        final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();

        final InternalPortletWindow internalPortletWindow = ((InternalPortletRequest)portletRequest).getInternalPortletWindow();
        final IPortletWindow parentPortletWindow = this.portletWindowRegistry.convertPortletWindow(request, internalPortletWindow);
        final IPortletWindowId parentPortletWindowId = parentPortletWindow.getPortletWindowId();
        final IPortletWindow portletWindow = this.portletWindowRegistry.createDelegatePortletWindow(request, portletEntityId, parentPortletWindowId);
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

       
        final HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class);
        final HttpSession session = EasyMock.createMock(HttpSession.class);
        final IPortletWindowId sourcePortletWindowId = EasyMock.createMock(IPortletWindowId.class);
        final IPortletWindow sourcePortletWindow = EasyMock.createMock(IPortletWindow.class);
        final IPortletEntityId portletEntityId = EasyMock.createMock(IPortletEntityId.class);
        final IPortletEntityRegistry portletEntityRegistry = EasyMock.createMock(IPortletEntityRegistry.class);
        final IPortletDefinitionRegistry portletDefinitionRegistry = EasyMock.createMock(IPortletDefinitionRegistry.class);
        final IPortletDefinition portletDefinition = EasyMock.createMock(IPortletDefinition.class);
        final IPortletEntity portletEntity = EasyMock.createMock(IPortletEntity.class);
       
        final ConcurrentHashMap<Object, Object> transientPortletWindowMap = new ConcurrentHashMap<Object, Object>();
       
        final ConcurrentHashMap<Object, Object> portletWindowMap = new ConcurrentHashMap<Object, Object>();
        portletWindowMap.put(sourcePortletWindowId, sourcePortletWindow);
       
        EasyMock.expect(sourcePortletWindowId.getStringId()).andReturn("pwid1");
        EasyMock.expect(request.getSession(false)).andReturn(session);
        EasyMock.expect(session.getAttribute(WebUtils.SESSION_MUTEX_ATTRIBUTE)).andReturn(session);
        EasyMock.expect(session.getAttribute(PortletWindowRegistryImpl.PORTLET_WINDOW_MAP_ATTRIBUTE)).andReturn(portletWindowMap);
        EasyMock.expect(sourcePortletWindow.getPortletEntityId()).andReturn(portletEntityId);
        EasyMock.expect(request.getAttribute(PortalWebUtils.REQUEST_MUTEX_ATTRIBUTE)).andReturn(request).times(2);
        EasyMock.expect(request.getAttribute(TransientPortletWindowRegistryImpl.TRANSIENT_PORTLET_WINDOW_MAP_ATTRIBUTE)).andReturn(transientPortletWindowMap).times(2);
        EasyMock.expect(portletEntityId.getStringId()).andReturn("peid1").times(2);
        EasyMock.expect(portletEntityRegistry.getParentPortletDefinition(portletEntityId)).andReturn(portletDefinition);
        EasyMock.expect(portletDefinitionRegistry.getPortletDescriptorKeys(portletDefinition)).andReturn(new Tuple<String, String>("pdk1.k", "pdk1.v"));
        EasyMock.expect(portletEntityRegistry.getPortletEntity("peid1")).andReturn(portletEntity);               
        EasyMock.expect(portletEntity.getPortletEntityId()).andReturn(portletEntityId);
               
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

        expect(portalRequestUtils.getOriginalPortletAdaptorRequest(request)).andReturn(request).times(4);
       
        replay(portalRequestUtils);
        portletUrlSyntaxProvider.setPortalRequestUtils(portalRequestUtils);
       
        final IPortletEntityId portletEntityId = new MockPortletEntityId("entityId1");
        final IPortletWindowId portletWindowId = new MockPortletWindowId("windowId1");
        final IPortletWindow portletWindow = new MockPortletWindow(portletWindowId, portletEntityId, "portletApp", "portletName");
       
        final ChannelRuntimeData channelRuntimeData = new ChannelRuntimeData();
        channelRuntimeData.setBaseActionURL("base/action.url");
       
        request.setAttribute(IPortletAdaptor.ATTRIBUTE__RUNTIME_DATA, channelRuntimeData);
       
        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();
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletEntityId

        final IPortalRequestUtils portalRequestUtils = createMock(IPortalRequestUtils.class);
        expect(portalRequestUtils.getOriginalPortletAdaptorRequest(request)).andReturn(request);
       
        portletUrlSyntaxProvider.setPortalRequestUtils(portalRequestUtils);
       
        final IPortletEntityId portletEntityId1 = new MockPortletEntityId("eId1");
        final IPortletWindowId portletWindowId1 = new MockPortletWindowId("wId1");
        final IPortletWindow portletWindow1 = new MockPortletWindow(portletWindowId1, portletEntityId1, "portletAppA", "portletNameA");
      
        final IPortletEntityId portletEntityId2 = new MockPortletEntityId("eId2");
        final IPortletWindowId portletWindowId2 = new MockPortletWindowId("wId2");
        final MockPortletWindow portletWindow2 = new MockPortletWindow(portletWindowId2, portletEntityId2, "portletAppB", "portletNameB");

       
        final ChannelRuntimeData channelRuntimeData = new ChannelRuntimeData();
        channelRuntimeData.setBaseActionURL("base/action.url");
       
        request.setAttribute(IPortletAdaptor.ATTRIBUTE__RUNTIME_DATA, channelRuntimeData);
       
        final MockPortletEntity portletEntity1 = new MockPortletEntity();
        portletEntity1.setPortletEntityId(portletEntityId1);
        portletEntity1.setChannelSubscribeId(portletEntityId1.getStringId());
       
        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();
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.