Package org.jasig.portal.portlet.om

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


        IPortletEntity portletEntity = this.getPortletEntity(request, portletEntityCache, null, layoutNodeId, userId);
       
        //Found an existing entity!
        if (portletEntity != null) {
            //Verify the definition IDs match, this is a MUST in the case where the subscribed portlet changes
            final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
            if (portletDefinitionId.equals(portletDefinition.getPortletDefinitionId())) {
                return portletEntity;
            }
           
            //Remove the entity if the definition IDs don't match
            this.logger.warn("Found portlet entity '{}' is not the correct entity for portlet definition id: {}. The entity will be deleted and a new one created.", portletEntity, portletDefinitionId);
View Full Code Here


        try {
            final IPortletEntity portletEntity = this.getOrCreatePortletEntity(request, userInstance, preferredChannelSubscribeId);
           
            if (portletEntity != null) {
              //Verify the fname matches before returning the entity
              final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
        if (fname.equals(portletDefinition.getFName())) {
                return portletEntity;
        }
            }
        }
        catch (PortalException pe) {
View Full Code Here

    protected IPortletDefinition getPortletDefinition(HttpServletRequest request, IUserInstance userInstance, String portletDefinitionIdStr) {
        request = this.portalRequestUtils.getOriginalPortalRequest(request);
       
        final ConcurrentMap<String, IPortletDefinition> portletDefinitions = PortalWebUtils.getMapRequestAttribute(request, PORTLET_DEFINITION_LOOKUP_MAP_ATTRIBUTE);
       
        IPortletDefinition portletDefinition  = portletDefinitions.get(portletDefinitionIdStr);
        if (portletDefinition == NO_PERMISSION_PORTLET_DEFINITION) {
            return null;
        }
        if (portletDefinition != null) {
            return portletDefinition;
View Full Code Here

     
      return portletDefinition;
    }
   
    protected IPortletDefinition getPortletDefinition(IUserInstance userInstance, IPortletDefinitionId portletDefinitionId) {
      final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(portletDefinitionId);
      return checkPortletDefinitionRenderPermissions(userInstance, portletDefinition);
    }
View Full Code Here

        //Didn't find an entity, just return null
        return null;
    }

    protected IPortletEntityId createConsistentPortletEntityId(IPortletEntity portletEntity) {
        final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
        final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
        final String layoutNodeId = portletEntity.getLayoutNodeId();
        final int userId = portletEntity.getUserId();
        return this.createConsistentPortletEntityId(portletDefinitionId, layoutNodeId, userId);
    }
View Full Code Here

            throw new IllegalArgumentException("consistentEntityIdString does not have 3 parts and is invalid: " + consistentEntityIdString);
        }
       
        //Verify the portlet definition id
        final String portletDefinitionIdString = idParts[0];
        final IPortletDefinition portletDefinition = this.getPortletDefinition(request, portletDefinitionIdString);
        if (portletDefinition == null) {
            throw new IllegalArgumentException("No parent IPortletDefinition found for " + portletDefinitionIdString + " from entity id string: " + consistentEntityIdString);
        }
        final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
       
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
       
View Full Code Here

        }
    }
   
    protected IPortletEntity wrapPortletEntityData(final PortletEntityData portletEntityData) {
        final IPortletDefinitionId portletDefinitionId = portletEntityData.getPortletDefinitionId();
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(portletDefinitionId);
        return new SessionPortletEntityImpl(portletDefinition, portletEntityData);
    }
View Full Code Here

        final HttpServletRequest portalRequest = portalEventBuilder.getPortalRequest();

        //Get the portlet's fname
        final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(portalRequest, portletWindowId);
        final IPortletEntity portletEntity = portletWindow.getPortletEntity();
        final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
        final String fname = portletDefinition.getFName();
       
        //Get the parameters used for the portlet execution
        final Map<String, List<String>> parameters = getParameters(portalRequest, portletWindowId, renderRequest);
       
        //Get the state & mode used for this request
View Full Code Here

      @SuppressWarnings("unchecked")
        Iterator<IGroupMember> iter = parentGroup.getMembers();
        while (iter.hasNext()) {
            IGroupMember gm = iter.next();
            if (gm.isEntity()) {
              IPortletDefinition portletDefinition = portletDefinitionRegistry.getPortletDefinition(gm.getKey());
              if(portletDefinition != null) {
                portletDefs.add(portletDefinition);
              } else {
                log.warn("portletDefinition was null for groupMember: " + gm );
              }  
View Full Code Here

                return false;
            }
            if (!IPortletDefinition.class.isAssignableFrom(obj.getClass())) {
                return false;
            }
            final IPortletDefinition other = (IPortletDefinition) obj;
            if (this.fname == null) {
                if (other.getFName() != null) {
                    return false;
                }
            }
            else if (!this.fname.equals(other.getFName())) {
                return false;
            }
            return true;
        }
View Full Code Here

TOP

Related Classes of org.jasig.portal.portlet.om.IPortletDefinition

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.