Examples of IChannelDefinition


Examples of org.jasig.portal.channel.IChannelDefinition

        query.setHint("org.hibernate.cacheable", true);
        query.setHint("org.hibernate.cacheRegion", FIND_CHANNEL_DEF_BY_FNAME_CACHE_REGION);
        query.setMaxResults(1);
       
        final List<IChannelDefinition> channelDefinitions = query.getResultList();
        IChannelDefinition definition = (IChannelDefinition) DataAccessUtils.uniqueResult(channelDefinitions);
    return definition;
  }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

        query.setHint("org.hibernate.cacheable", true);
        query.setHint("org.hibernate.cacheRegion", FIND_CHANNEL_DEF_BY_NAME_CACHE_REGION);
        query.setMaxResults(1);
       
        final List<IChannelDefinition> channelDefinitions = query.getResultList();
        IChannelDefinition definition = (IChannelDefinition) DataAccessUtils.uniqueResult(channelDefinitions);
    return definition;
    }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
       
        //Find the channel and portlet definitions
        final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription)userLayoutManager.getNode(portletNodeId);
        final String channelPublishId = channelNode.getChannelPublishId();
        final IChannelDefinition channelDefinition = this.channelRegistryStore.getChannelDefinition(channelPublishId);
        if(null == channelDefinition) {
            throw new IllegalArgumentException("No channel definition found for publish id: " + channelPublishId);
        }
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(channelDefinition.getId());
        if (portletDefinition == null) {
            throw new IllegalArgumentException("No portlet defintion found for channel definition '" + channelDefinition.getId() + "'.");
        }
       
        //Determine the appropriate portlet window ID
        final IPerson person = userInstance.getPerson();
        final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreatePortletEntity(portletDefinition.getPortletDefinitionId(), portletNodeId, person.getID());
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

        }
        url.append(windowStateString);
       
        //Add channel information: /fname.chanid
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(portletEntity.getPortletDefinitionId());
        final IChannelDefinition channelDefinition = portletDefinition.getChannelDefinition();
        final String fname = channelDefinition.getFName();
        final String validFname = FunctionalNameType.INVALID_CHARS_PATTERN.matcher(fname).replaceAll("_");
        url.append("/").append(validFname).append(".").append(channelSubscribeId);
       
        //File part
        if (portalPortletUrl.isAction()) {
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

        expect(mockPortletWindow.getPortletMode()).andReturn(details.getPortletMode());
        replay(mockPortletWindow);
       
        IPortletDefinitionId mockPortletDefinitionId = createMock(IPortletDefinitionId.class);
        replay(mockPortletDefinitionId);
        IChannelDefinition mockChannelDefinition = createMock(IChannelDefinition.class);
        expect(mockChannelDefinition.getFName()).andReturn(details.getChannelFName());
        replay(mockChannelDefinition);
        IPortletDefinition mockPortletDefinition = createMock(IPortletDefinition.class);
        expect(mockPortletDefinition.getChannelDefinition()).andReturn(mockChannelDefinition);
        replay(mockPortletDefinition);
        IPortletEntity mockPortletEntity = createMock(IPortletEntity.class);
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

            return false;
        }
       
        final int channelId;
        try {
            final IChannelDefinition channelDefinition = this.channelRegistryStore.getChannelDefinition(channelFName);
            if (channelDefinition == null) {
                if (this.logger.isInfoEnabled()) {
                    this.logger.info("No ChannelDefinition for fname='" + channelFName + "', returning false.");
                }

                return false;
            }
           
            channelId = channelDefinition.getId();
        }
        catch (Exception e) {
            this.logger.warn("Could not find ChannelDefinition for fname='" + channelFName + "' while checking if user '" + userName + "' can render it. Returning FALSE.", e);
            return false;
        }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

            }
           
            return false;
        }
       
        final IChannelDefinition channelDefinition;
        try {
            channelDefinition = this.channelRegistryStore.getChannelDefinition(fname);
        }
        catch (Exception e) {
            this.logger.warn("Caught exception while retrieving channel definition for fname '" + fname + "'", e);
            return false;
        }
       
        if (channelDefinition == null) {
            if (this.logger.isDebugEnabled()) {
                this.logger.debug("No channel found for key '" + fname + "'");
            }
           
            return false;
        }
       
        final Integer channelId = channelDefinition.getId();
        final IEntity entity = GroupService.getEntity(channelId.toString(), IChannelDefinition.class);
        if (entity == null) {
            if (this.logger.isDebugEnabled()) {
                this.logger.debug("No channel found for id '" + channelId + "'");
            }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

    String destinationId = request.getParameter("elementID");
    int sourceId = Integer.parseInt(request.getParameter("channelID"));
    String method = request.getParameter("position");

    IChannelRegistryStore channelRegistryStore = ChannelRegistryStoreFactory.getChannelRegistryStoreImpl();
    IChannelDefinition definition = channelRegistryStore.getChannelDefinition(sourceId);
   
        IUserLayoutChannelDescription channel = new UserLayoutChannelDescription(definition);
    for (IChannelParameter param : definition.getParameters()) {
        if (param.getOverride()) {
                String paramValue = request.getParameter(param.getName());
                if (paramValue != null) {
                    channel.setParameterValue(param.getName(), param.getValue());
                }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

     * Given the key, returns the entity's name.
     * @param key java.lang.String
     */
    public String getName (String key) throws Exception {
        IChannelRegistryStore crs = ChannelRegistryStoreFactory.getChannelRegistryStoreImpl();
        IChannelDefinition cd = crs.getChannelDefinition(Integer.parseInt(key));
        return  cd.getName();
    }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

    /**
     * Get the portletApplicationId and portletName for the specified channel definition id. The portletApplicationId
     * will be {@link Tuple#first} and the portletName will be {@link Tuple#second}
     */
    public Tuple<String, String> getPortletDescriptorKeys(IPortletDefinition portletDefinition) {
        final IChannelDefinition channelDefinition = portletDefinition.getChannelDefinition();
       
        final String portletApplicationId;
        final IChannelParameter isFrameworkPortletParam = channelDefinition.getParameter(IPortletAdaptor.CHANNEL_PARAM__IS_FRAMEWORK_PORTLET);
        if (isFrameworkPortletParam != null && Boolean.valueOf(isFrameworkPortletParam.getValue())) {
            portletApplicationId = this.servletContext.getContextPath();
        }
        else {
            final IChannelParameter portletApplicaitonIdParam = channelDefinition.getParameter(IPortletAdaptor.CHANNEL_PARAM__PORTLET_APPLICATION_ID);
            if (portletApplicaitonIdParam == null) {
                throw new DataRetrievalFailureException("The specified ChannelDefinition does not provide the needed channel parameter '" + IPortletAdaptor.CHANNEL_PARAM__PORTLET_APPLICATION_ID + "'. ChannelDefinition=" + channelDefinition);
            }
           
            portletApplicationId = portletApplicaitonIdParam.getValue();
        }
       
        final IChannelParameter portletNameParam = channelDefinition.getParameter(IPortletAdaptor.CHANNEL_PARAM__PORTLET_NAME);
        if (portletNameParam == null) {
            throw new DataRetrievalFailureException("The specified ChannelDefinition does not provide the needed channel parameter '" + IPortletAdaptor.CHANNEL_PARAM__PORTLET_NAME + "'. ChannelDefinition=" + channelDefinition);
        }
        final String portletName = portletNameParam.getValue();
       
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.