Examples of IPortletDefinition


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

    IChannelDefinition def = channelRegistryStore.getChannelDefinition(chanId);
   
    // create the new form
    final ChannelDefinitionForm form;
    if (def != null) {
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(def.getId());
        form = new ChannelDefinitionForm(def, portletDefinition);
        form.setId(def.getId());
    }
    else {
        form = new ChannelDefinitionForm();
View Full Code Here

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

        }
        preferenceList.add(new PortletPreferenceImpl(key, readOnly, values));
      }
    }
   
    final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(channelDef.getId());
    final IPortletPreferences portletPreferences = portletDefinition.getPortletPreferences();
    portletPreferences.setPortletPreferences(preferenceList);
     
      channelPublishingService.saveChannelDefinition(channelDef, publisher, categories, groupMembers);

      return this.getChannelDefinitionForm(channelDef.getId());
View Full Code Here

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

        }

        final String databaseChannelSubscribeId = portletEntity.getChannelSubscribeId();
        if (databaseChannelSubscribeId.startsWith(TransientUserLayoutManagerWrapper.SUBSCRIBE_PREFIX)) {
            final IPortletDefinitionId portletDefinitionId = portletEntity.getPortletDefinitionId();
            final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(portletDefinitionId);
            final IChannelDefinition channelDefinition = portletDefinition.getChannelDefinition();
            final String fname = channelDefinition.getFName();
           
            final IUserLayoutManager userLayoutManager = this.getUserLayoutManager();
            if (userLayoutManager == null) {
                this.logger.warn("Could not find IUserLayoutManager when trying to wrap transient portlet entity: " + portletEntity);
View Full Code Here

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

        final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription)userLayoutManager.getNode(channelSubscribeId);
       
        //Lookup the IportletDefinition for the node
        final String channelPublishId = channelNode.getChannelPublishId();
        final int channelDefinitionId = Integer.valueOf(channelPublishId.startsWith("chan") ? channelPublishId.substring(4) : channelPublishId);
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(channelDefinitionId);

        //Generate the subscribe ID used for the database
        return this.getDatabaseChannelSubscribeId(portletDefinition.getPortletDefinitionId());
    }
View Full Code Here

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

            return true;
        }
        if (!(object instanceof IPortletDefinition)) {
            return false;
        }
        IPortletDefinition rhs = (IPortletDefinition) object;
        return new EqualsBuilder()
            .append(this.channelDefinition.getId(), rhs.getChannelDefinition().getId())
            .isEquals();
    }
View Full Code Here

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

    @Transactional
    public IPortletEntity createPortletEntity(IPortletDefinitionId portletDefinitionId, String channelSubscribeId, int userId) {
        Validate.notNull(portletDefinitionId, "portletDefinitionId can not be null");
        Validate.notNull(channelSubscribeId, "channelSubscribeId can not be null");
       
        final IPortletDefinition portletDefinition = this.portletDefinitionDao.getPortletDefinition(portletDefinitionId);
        if (portletDefinition == null) {
            throw new DataRetrievalFailureException("No IPortletDefinition exists for IPortletDefinitionId='" + portletDefinitionId + "'");
        }
       
        IPortletEntity portletEntity = new PortletEntityImpl(portletDefinition, channelSubscribeId, userId);
View Full Code Here

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

     */
    @SuppressWarnings("unchecked")
    public Set<IPortletEntity> getPortletEntities(IPortletDefinitionId portletDefinitionId) {
        Validate.notNull(portletDefinitionId, "portletEntity can not be null");
       
        final IPortletDefinition portletDefinition = this.portletDefinitionDao.getPortletDefinition(portletDefinitionId);
       
        final Query query = this.entityManager.createQuery(FIND_PORTLET_ENTS_BY_PORTLET_DEF);
        query.setHint("org.hibernate.cacheable", true);
        query.setHint("org.hibernate.cacheRegion", FIND_PORTLET_ENTS_BY_PORTLET_DEF_CACHE_REGION);
        query.setParameter("portletDefinition", portletDefinition);
View Full Code Here

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

     * @param delegateParent The id of the parent window delegating to this window, optional.
     * @return A new portlet window
     */
    protected IPortletWindow createPortletWindow(HttpServletRequest request, IPortletWindowId portletWindowId, IPortletEntityId portletEntityId, IPortletWindowId delegateParent) {
        //Get the parent definition to determine the descriptor data
        final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletEntityId);
        final Tuple<String, String> portletDescriptorKeys = this.portletDefinitionRegistry.getPortletDescriptorKeys(portletDefinition);

        final String portletApplicationId = portletDescriptorKeys.first;
        final String portletName = portletDescriptorKeys.second;

View Full Code Here

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

        }
       
        //Find the channel and portlet definitions
        final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription)userLayoutManager.getNode(channelSubscribeId);
        final String channelPublishId = channelNode.getChannelPublishId();
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(Integer.parseInt(channelPublishId));
        if (!portletDefinition.getChannelDefinition().isPortlet()) {
            this.logger.info("No portlet defintion found for channel definition '" + channelPublishId + "' with fname '" + targetedFname + "'. skipping portlet parameter processing");
            return null;
        }
       
        //Determine the appropriate portlet window ID
        final IPerson person = userInstance.getPerson();
        final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreatePortletEntity(portletDefinition.getPortletDefinitionId(), channelSubscribeId, person.getID());
        final IPortletWindow defaultPortletWindow = this.portletWindowRegistry.createDefaultPortletWindow(request, portletEntity.getPortletEntityId());

        return new UrlTarget(
                this.portletWindowRegistry.createTransientPortletWindowId(request, defaultPortletWindow.getPortletWindowId()),
                true);
View Full Code Here

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

                preferences.add(portletPreference);
            }
        }
       
        final IPortletDefinitionRegistry portletDefinitionRegistry = PortletDefinitionRegistryLocator.getPortletDefinitionRegistry();
        final IPortletDefinition portletDefinition = portletDefinitionRegistry.getPortletDefinition(ci.chanDef.getId());
        final IPortletPreferences portletPreferences = portletDefinition.getPortletPreferences();
        portletPreferences.setPortletPreferences(preferences);
    }
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.