Examples of IPortletEntityId


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

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 IPortletEntityId portletEntityId3 = new MockPortletEntityId("eId3");
        final IPortletWindowId portletWindowId3 = new MockPortletWindowId("wId3");
        final MockPortletWindow portletWindow3 = new MockPortletWindow(portletWindowId3, portletEntityId3, "portletAppC", "portletNameC");

       
        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 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();
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 IPortletEntityId portletEntityId3 = new MockPortletEntityId("eId3");
        final IPortletWindowId portletWindowId3 = new MockPortletWindowId("wId3");
        final MockPortletWindow portletWindow3 = new MockPortletWindow(portletWindowId3, portletEntityId3, "portletAppC", "portletNameC");

       
        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 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();
View Full Code Here

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

                return chanDef1.getPortletDefinitionId();
            }
        });
       
       
        final IPortletEntityId portletEntityId = execute(new Callable<IPortletEntityId>() {
            @Override
            public IPortletEntityId call() throws Exception {
                IPortletEntity portEnt1 = jpaPortletEntityDao.createPortletEntity(portletDefinitionId, "chanSub1", 1);
               
                return portEnt1.getPortletEntityId();
View Full Code Here

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

            return true;
        }
        if (!(object instanceof IPortletEntityId)) {
            return false;
        }
        IPortletEntityId rhs = (IPortletEntityId) object;
        return new EqualsBuilder()
            .append(this.portletEntityId, rhs.getStringId())
            .isEquals();
    }
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(portDefId1.getStringId());
       
        final IPortletEntityId portletEntityId = this.execute(new Callable<IPortletEntityId>() {
            @Override
            public IPortletEntityId call() throws Exception {
                //T1 - Create the entity
                final IPortletEntity portletEntity = portletEntityRegistry.getOrCreatePortletEntity(request, portDefId1, nodeId, 12);
                assertEquals(SessionPortletEntityImpl.class, portletEntity.getClass());
               
                return portletEntity.getPortletEntityId();
            }
        });
       
        /*
         * T1 create entity
         * T1 add preference, making persistent
         * T2 delete preference, making interim
         * T1 add preference 2 to persistent, stays persistent
         */


        this.execute(new Callable<Object>() {
            @Override
            public Object call() throws Exception {
                final IPortletEntity portletEntity = portletEntityRegistry.getPortletEntity(request, portletEntityId);
               
                //Add a preference
                final List<IPortletPreference> preferences = portletEntity.getPortletPreferences();
                final IPortletPreference portletPreference = new PortletPreferenceImpl("pref", false, "value");
                preferences.add(portletPreference);
       
                //Store the entity
                portletEntityRegistry.storePortletEntity(request, portletEntity);
               
                return null;
            }
        });

        this.execute(new Callable<Object>() {
            @Override
            public Object call() throws Exception {
                //T1 - Verify it was converted from interim to persistent
                final IPortletEntity portletEntity = portletEntityRegistry.getPortletEntity(request, portletEntityId);
                assertEquals(PersistentPortletEntityWrapper.class, portletEntity.getClass());
                final List<IPortletPreference> preferences = portletEntity.getPortletPreferences();
                assertEquals(1, preferences.size());
               
                //T2 - get the entity and add preferences
                final IPortletEntityId localPortletEntityId = executeInThread("T2.1", new Callable<IPortletEntityId>() {
                    @Override
                    public IPortletEntityId call() throws Exception {
                        //T2 - Get entity
                        final IPortletEntity portletEntity = portletEntityRegistry.getPortletEntity(request, portletEntityId.getStringId());
                        assertEquals(portletEntity, portletEntity);
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(portDefId1.getStringId());

        final IPortletEntityId portletEntityId = this.execute(new Callable<IPortletEntityId>() {
            @Override
            public IPortletEntityId call() throws Exception {
                //T1 - Create the entity
                final IPortletEntity portletEntity = portletEntityRegistry.getOrCreatePortletEntity(request, portDefId1, nodeId, 12);;
                assertEquals(SessionPortletEntityImpl.class, portletEntity.getClass());
               
                return portletEntity.getPortletEntityId();
            }
        });


        this.execute(new Callable<Object>() {
            @Override
            public Object call() throws Exception {
                final IPortletEntity portletEntity = portletEntityRegistry.getPortletEntity(request, portletEntityId);
               
                //Add a preference
                final List<IPortletPreference> preferences = portletEntity.getPortletPreferences();
                final IPortletPreference portletPreference = new PortletPreferenceImpl("pref", false, "value");
                preferences.add(portletPreference);
       
                //Store the entity
                portletEntityRegistry.storePortletEntity(request, portletEntity);
               
                return null;
            }
        });

        this.execute(new Callable<Object>() {
            @Override
            public Object call() throws Exception {
                //T1 - Verify it was converted from interim to persistent
                final IPortletEntity portletEntity = portletEntityRegistry.getPortletEntity(request, portletEntityId);
                assertEquals(PersistentPortletEntityWrapper.class, portletEntity.getClass());
                final List<IPortletPreference> preferences = portletEntity.getPortletPreferences();
                assertEquals(1, preferences.size());
               
                //T2 - get the entity and add preferences
                final IPortletEntityId localPortletEntityId = executeInThread("T2.1", new Callable<IPortletEntityId>() {
                    @Override
                    public IPortletEntityId call() throws Exception {
                        //T2 - Get entity
                        final IPortletEntity portletEntity = portletEntityRegistry.getPortletEntity(request, portletEntityId.getStringId());
                        assertEquals(portletEntity, portletEntity);
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(portDefId1.getStringId());

        final IPortletEntityId portletEntityId = this.execute(new Callable<IPortletEntityId>() {
            @Override
            public IPortletEntityId call() throws Exception {
                //T1 - Create the entity
                final IPortletEntity portletEntity = portletEntityRegistry.getOrCreatePortletEntity(request, portDefId1, nodeId, 12);;
                assertEquals(SessionPortletEntityImpl.class, portletEntity.getClass());
               
                //T2 - get the entity and add preferences
                final IPortletEntityId portletEntityId = executeInThread("T2.1", new Callable<IPortletEntityId>() {
                    @Override
                    public IPortletEntityId call() throws Exception {
                        //T2 - Get entity
                        final IPortletEntity localPortletEntity = portletEntityRegistry.getPortletEntity(request, portletEntity.getPortletEntityId().getStringId());
                        assertEquals(portletEntity, localPortletEntity);
View Full Code Here

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

         * T2 - get ientity
         * T2 - add pref and store ientity converting it to pentity
         * T1 - add pref to ientity and store
         */

        final IPortletEntityId portletEntityId = this.execute(new Callable<IPortletEntityId>() {
            @Override
            public IPortletEntityId call() throws Exception {
                //T1 - Create the entity
                final IPortletEntity portletEntity = portletEntityRegistry.getOrCreatePortletEntity(request, portDefId1, nodeId, 12);;
                assertEquals(SessionPortletEntityImpl.class, portletEntity.getClass());
               
                //T2 - get the entity and add preferences
                final IPortletEntityId portletEntityId = executeInThread("T2.1", new Callable<IPortletEntityId>() {
                    @Override
                    public IPortletEntityId call() throws Exception {
                        //T2 - Get entity
                        final IPortletEntity localPortletEntity = portletEntityRegistry.getPortletEntity(request, portletEntity.getPortletEntityId().getStringId());
                        assertEquals(portletEntity, localPortletEntity);
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
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.