Examples of IPortletEntityId


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

        when(userLayoutManager.getNode(nodeId)).thenReturn(node);
        when(node.getType()).thenReturn(LayoutNodeType.PORTLET);
        when(node.getChannelPublishId()).thenReturn(portletDefId.getStringId());


        final IPortletEntityId portletEntityId = this.execute(new Callable<IPortletEntityId>() {
            @Override
            public IPortletEntityId call() throws Exception {
                //Create the entity
                IPortletEntity portletEntity = portletEntityRegistry.getOrCreatePortletEntity(request, portletDefId, nodeId, 12);
                assertEquals(SessionPortletEntityImpl.class, portletEntity.getClass());
View Full Code Here

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

        when(userLayoutManager.getNode(nodeId)).thenReturn(node);
        when(node.getType()).thenReturn(LayoutNodeType.PORTLET);
        when(node.getChannelPublishId()).thenReturn(portletDefId.getStringId());


        final IPortletEntityId portletEntityId = this.execute(new Callable<IPortletEntityId>() {
            @Override
            public IPortletEntityId call() throws Exception {
                //Create the entity
                IPortletEntity portletEntity = portletEntityRegistry.getOrCreatePortletEntity(request, portletDefId, nodeId, 12);
                assertEquals(SessionPortletEntityImpl.class, portletEntity.getClass());
View Full Code Here

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

        when(userLayoutManager.getNode(nodeId)).thenReturn(node);
        when(node.getType()).thenReturn(LayoutNodeType.PORTLET);
        when(node.getChannelPublishId()).thenReturn(portletDefId.getStringId());


        final IPortletEntityId portletEntityId = this.execute(new Callable<IPortletEntityId>() {
            @Override
            public IPortletEntityId call() throws Exception {
                //Create the entity
                IPortletEntity portletEntity = portletEntityRegistry.getOrCreatePortletEntity(request, portletDefId, nodeId, 12);
                assertEquals(SessionPortletEntityImpl.class, portletEntity.getClass());
View Full Code Here

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

                  final IPortletEntity defaultPortletEntity = this.portletEntityRegistry.getOrCreateDefaultPortletEntity(request, portletDefinitionId);
                  if (defaultPortletEntity.equals(portletEntity)) {
                    portletDefinitions.remove(portletDefinition);
                  }
                 
                    final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
                    final Set<IPortletWindow> portletWindows = this.portletWindowRegistry.getAllPortletWindowsForEntity(request, portletEntityId);
                   
                    for (final IPortletWindow portletWindow : portletWindows) {
                        this.logger.debug("{} resolved target {}", event, portletWindow);
                        final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();
                        final Event unmarshalledEvent = this.unmarshall(portletWindow, event);
                        portletEventQueue.offerEvent(portletWindowId, new QueuedEvent(sourceWindowId, unmarshalledEvent) );
                    }
                }
                else {
                  portletDefinitions.remove(portletDefinition);
                }
            }
           
            if (!portletDefinitions.isEmpty()) {
              final IPerson user = userInstance.getPerson();
            final EntityIdentifier ei = user.getEntityIdentifier();
            final IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
             
              //If the event is global there might still be portlet definitions that need targeting
              for (final IPortletDefinition portletDefinition : portletDefinitions) {
                final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
                //Check if the user can render the portlet definition before doing event tests
                if (ap.canRender(portletDefinitionId.getStringId())) {
                  if (this.supportsEvent(event, portletDefinitionId)) {
                    this.logger.debug("{} supports event {}", portletDefinition, event);
                     
                      final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreateDefaultPortletEntity(request, portletDefinitionId);
                        final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
                        final Set<IPortletWindow> portletWindows = this.portletWindowRegistry.getAllPortletWindowsForEntity(request, portletEntityId);
                       
                        for (final IPortletWindow portletWindow : portletWindows) {
                            this.logger.debug("{} resolved target {}", event, portletWindow);
                            final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();
View Full Code Here

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

        if (configMode) {
            final IPortletDefinitionId portletDefinitionId = portletEntity.getPortletDefinitionId();
            return new PortletDefinitionPreferencesImpl(portletDefinitionRegistry, transactionOperations, portletDefinitionId, render);
        }
        else if (this.isStoreInMemory(containerRequest)) {
            final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
            return new GuestPortletEntityPreferencesImpl(requestContext, portletEntityRegistry, portletDefinitionRegistry, portletEntityId, render);
        }
        else {
            final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
            return new PortletEntityPreferencesImpl(requestContext, portletEntityRegistry, portletDefinitionRegistry, transactionOperations, portletEntityId, render);
        }
    }
View Full Code Here

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

    }
   
    public void storeWindow(T window) {
        writeLock.lock();
        try {
            final IPortletEntityId portletEntityId = window.getPortletEntityId();
            final Set<T> windowSet = this.getWindowSet(portletEntityId, true);
            windowSet.add(window);
           
            final IPortletWindowId portletWindowId = window.getPortletWindowId();
            this.windowsById.put(portletWindowId, window);
View Full Code Here

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

    public void removeWindow(IPortletWindowId portletWindowId) {
        writeLock.lock();
        try {
            final T window = this.windowsById.remove(portletWindowId);
            if (window != null) {
                final IPortletEntityId portletEntityId = window.getPortletEntityId();
                final Set<T> windowSet = this.getWindowSet(portletEntityId, false);
                if (windowSet != null) {
                    windowSet.remove(window);
                }
            }
View Full Code Here

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

    public IPortletWindow getOrCreateDefaultPortletWindow(HttpServletRequest request, IPortletDefinitionId portletDefinitionId) {
        Validate.notNull(request, "HttpServletRequest cannot be null");
        Validate.notNull(portletDefinitionId, "portletDefinition cannot be null");
    
        final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreateDefaultPortletEntity(request, portletDefinitionId);
        final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
       
        return this.getOrCreateDefaultPortletWindow(request, portletEntityId);
    }
View Full Code Here

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

            final String basePortletWindowIdStr = basePortletWindowId.getStringId();
            basePortletWindowId = this.getPortletWindowId(request, basePortletWindowIdStr);
        }
       
        //Get the entity ID for the portlet window
        final IPortletEntityId portletEntityId = ((PortletWindowIdImpl)basePortletWindowId).getPortletEntityId();
       
        //Create the stateless ID
        final PortletWindowIdImpl statelessPortletWindowId = this.createPortletWindowId(STATELESS_PORTLET_WINDOW_ID, portletEntityId);
       
        //See if there is already a request cached stateless window
View Full Code Here

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

            if (portletEntity == null) {
                this.logger.debug("No portlet entity found for layout node {} for user {}", channelSubscribeId, userInstance.getPerson().getUserName());
                continue;
            }
           
            final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
            final IPortletWindow portletWindow = this.getOrCreateDefaultPortletWindow(request, portletEntityId);
            if (portletWindow == null) {
                this.logger.debug("No portlet window found for {}", portletEntity);
                continue;
            }
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.