Examples of IPortletEntity


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

       
       
        final IPortletEntityId portletEntityId = new MockPortletEntityId("ent1");
       
       
        final IPortletEntity portletEntity = createMock(IPortletEntity.class);
        expect(portletEntity.getPortletEntityId()).andReturn(portletEntityId);
       
       
        final IPortletEntityRegistry portletEntityRegistry = createMock(IPortletEntityRegistry.class);
        expect(portletEntityRegistry.getParentPortletDefinition(portletEntityId)).andReturn(portletDefinition);
View Full Code Here

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

       
       
        final IPortletEntityId portletEntityId = new MockPortletEntityId("ent1");
       
       
        final IPortletEntity portletEntity = createMock(IPortletEntity.class);
        expect(portletEntity.getPortletEntityId()).andReturn(portletEntityId);
       
       
        final IPortletEntityRegistry portletEntityRegistry = createMock(IPortletEntityRegistry.class);
        expect(portletEntityRegistry.getParentPortletDefinition(portletEntityId)).andReturn(portletDefinition);
View Full Code Here

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

        final IPortletWindowId targetedPortletWindowId = this.portletRequestParameterManager.getTargetedPortletWindowId(req);
        if (targetedPortletWindowId != null) {
            final PortletUrl portletUrl = this.portletRequestParameterManager.getPortletRequestInfo(req, targetedPortletWindowId);
           
            if (RequestType.ACTION.equals(portletUrl.getRequestType())) {
                final IPortletEntity targetedPortletEntity = this.portletWindowRegistry.getParentPortletEntity(req, targetedPortletWindowId);
                if (targetedPortletEntity != null) {
                    final String channelSubscribeId = targetedPortletEntity.getChannelSubscribeId();
                    final boolean actionExecuted = channelManager.doChannelAction(req, res, channelSubscribeId, false);
                   
                    if (actionExecuted) {
                        // The action completed, return immediately
                        return;
View Full Code Here

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

    public IPortletEntity createPortletEntity(IPortletDefinitionId portletDefinitionId, String channelSubscribeId, int userId) {
        if (channelSubscribeId.startsWith(TransientUserLayoutManagerWrapper.SUBSCRIBE_PREFIX)) {
            final String transientChannelSubscribeId = channelSubscribeId;
            channelSubscribeId = this.getDatabaseChannelSubscribeId(portletDefinitionId);
           
            final IPortletEntity portletEntity = this.delegatePortletEntityDao.createPortletEntity(portletDefinitionId, channelSubscribeId, userId);
            return new TransientPortletEntity(portletEntity, transientChannelSubscribeId);
        }
       
        return this.delegatePortletEntityDao.createPortletEntity(portletDefinitionId, channelSubscribeId, userId);
    }
View Full Code Here

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

    /* (non-Javadoc)
     * @see org.jasig.portal.portlet.dao.IPortletEntityDao#getPortletEntity(org.jasig.portal.portlet.om.IPortletEntityId)
     */
    public IPortletEntity getPortletEntity(IPortletEntityId portletEntityId) {
        final IPortletEntity portletEntity = this.delegatePortletEntityDao.getPortletEntity(portletEntityId);
        return this.wrapEntity(portletEntity);
    }
View Full Code Here

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

     */
    public IPortletEntity getPortletEntity(String channelSubscribeId, int userId) {
        if (channelSubscribeId.startsWith(TransientUserLayoutManagerWrapper.SUBSCRIBE_PREFIX)) {
            final String databaseChannelSubscribeId = this.determineDatabaseChannelSubscribeId(channelSubscribeId);
           
            final IPortletEntity portletEntity = this.delegatePortletEntityDao.getPortletEntity(databaseChannelSubscribeId, userId);
            return this.wrapEntity(portletEntity);
        }
       
        return this.delegatePortletEntityDao.getPortletEntity(channelSubscribeId, userId);
    }
View Full Code Here

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

     */
    protected Set<IPortletEntity> wrapEntities(Set<IPortletEntity> portletEntities) {
        final Set<IPortletEntity> wrappedPortletEntities = new LinkedHashSet<IPortletEntity>(portletEntities.size());
       
        for (final IPortletEntity portletEntity : portletEntities) {
            final IPortletEntity wrappedEntity = this.wrapEntity(portletEntity);
           
            if (wrappedEntity != null) {
                wrappedPortletEntities.add(wrappedEntity);
            }
        }
View Full Code Here

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

        final IPortletEntityId persistentEntityId = this.getPersistentId(portletEntityId);
        if (persistentEntityId == null) {
            return null;
        }
       
        final IPortletEntity persistentPortletEntity = this.portletEntityDao.getPortletEntity(persistentEntityId);
        if (persistentPortletEntity == null) {
            return null;
        }
       
        return new PersistentPortletEntityWrapper(persistentPortletEntity);
View Full Code Here

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

        final InterimPortletEntityImpl interimPortletEntity = this.getInterimPortletEntity(channelSubscribeId, userId);
        if (interimPortletEntity != null) {
            return interimPortletEntity;
        }
       
        final IPortletEntity persistentPortletEntity = this.portletEntityDao.getPortletEntity(channelSubscribeId, userId);
        if (persistentPortletEntity == null) {
            return null;
        }
       
        final PersistentPortletEntityWrapper wrappedPortletEntity = new PersistentPortletEntityWrapper(persistentPortletEntity);
        this.setPersistentIdMapping(wrappedPortletEntity.getPortletEntityId(), persistentPortletEntity.getPortletEntityId());
       
        return wrappedPortletEntity;
    }
View Full Code Here

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

    /* (non-Javadoc)
     * @see org.jasig.portal.portlet.registry.IPortletEntityRegistry#getOrCreatePortletEntity(org.jasig.portal.portlet.om.IPortletDefinitionId, java.lang.String, int)
     */
    @Override
    public IPortletEntity getOrCreatePortletEntity(IPortletDefinitionId portletDefinitionId, String channelSubscribeId, int userId) {
        final IPortletEntity portletEntity = this.getPortletEntity(channelSubscribeId, userId);
        if (portletEntity != null) {
            if (!portletDefinitionId.equals(portletEntity.getPortletDefinitionId())) {
                this.logger.warn("Found portlet entity '" + portletEntity + "' is not the correct entity for portlet definition id: " + portletDefinitionId + ". The entity will be deleted and a new one created.");
                this.deletePortletEntity(portletEntity);
            }
            else {
                return portletEntity;
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.