Examples of IChannelDefinition


Examples of org.jasig.portal.channel.IChannelDefinition

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

Examples of org.jasig.portal.channel.IChannelDefinition

        String r = null;
        if (entityID.getType().equals(chan)) {
            try {
                //Element c = ChannelRegistryManager.getChannel("chan"+entityID.getKey());
                //r = c.getAttribute(name);
                IChannelDefinition cd = ChannelRegistryStoreFactory.getChannelRegistryStoreImpl().getChannelDefinition(Integer.parseInt(entityID.getKey()));
                if (name.equals("Name")){
                  r = cd.getName();
                }
                if (name.equals("Title")){
                  r = cd.getTitle();
                }
                if (name.equals("Description")){
                  r = cd.getDescription();
                }
                if (name.equals("Functional Name")){
                  r = cd.getFName();
                }
                if (name.equals("Timeout")){
                  r = String.valueOf(cd.getTimeout());
                }
                if (name.equals("Secure")){
                  r = String.valueOf(cd.isSecure());
                }               
            } catch (Exception e) {
                log.error( "ChannelRegistryPropertyFinder.getProperty("+entityID.getKey()+"-"+entityID.getType().getName()+","+name+") :", e);
            }
        }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

        this.channelDefinitionDao = channelDefinitionDao;
    }
   
    @Override
    public IPortletDefinition getPortletDefinition(int channelPublishId) {
        final IChannelDefinition channelDefinition = this.channelDefinitionDao.getChannelDefinition(channelPublishId);
       
        final Query query = this.entityManager.createQuery(FIND_PORTLET_DEF_BY_CHANNEL_DEF);
        query.setHint("org.hibernate.cacheable", true);
        query.setHint("org.hibernate.cacheRegion", FIND_PORTLET_DEF_BY_CHANNEL_DEF_CACHE_REGION);
        query.setParameter("channelDefinition", channelDefinition);
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

     * @return a <code>ChannelDefinition</code>
     **/
    protected IChannelDefinition getChannelDefinition( String subId )
        throws PortalException
    {
        IChannelDefinition chanDef = (IChannelDefinition)
            mChanMap.get(subId);

        if ( null == chanDef ){
            String fname = getFname(subId);
            if (log.isDebugEnabled())
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

        // obtain a description of the transient channel and
        // assign a new transient channel id
        if ( subId == null ) {
            try {
                IChannelDefinition chanDef = ChannelRegistryStoreFactory.getChannelRegistryStoreImpl().getChannelDefinition(fname);
                if(chanDef!=null) {
                    // assign a new id
                    subId = getNextSubscribeId();
                    mFnameMap.put(fname,subId);
                    mSubIdMap.put(subId,fname);
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

        IUserLayoutChannelDescription ulnd = new UserLayoutChannelDescription();
        try
        {
            // check cache first
            IChannelDefinition chanDef = (IChannelDefinition)mChanMap.get(nodeId);

            if ( null == chanDef ) {
                chanDef = ChannelRegistryStoreFactory.getChannelRegistryStoreImpl().getChannelDefinition(fname);
                mChanMap.put(nodeId,chanDef);
            }

            ulnd.setId(nodeId);
            ulnd.setName(chanDef.getName());
            ulnd.setUnremovable(true);
            ulnd.setImmutable(true);
            ulnd.setHidden(false);
            ulnd.setTitle(chanDef.getTitle());
            ulnd.setDescription(chanDef.getDescription());
            ulnd.setClassName(chanDef.getJavaClass());
            ulnd.setChannelPublishId("" + chanDef.getId());
            ulnd.setChannelTypeId("" + chanDef.getTypeId());
            ulnd.setFunctionalName(chanDef.getFName());
            ulnd.setTimeout(chanDef.getTimeout());
            ulnd.setEditable(chanDef.isEditable());
            ulnd.setHasHelp(chanDef.hasHelp());
            ulnd.setHasAbout(chanDef.hasAbout());

            Set<IChannelParameter> parms = chanDef.getParameters();
            for ( IChannelParameter parm : parms )
            {
                ulnd.setParameterValue(parm.getName(),parm.getValue());
                ulnd.setParameterOverride(parm.getName(),parm.getOverride());
            }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

                        // append channel element iff subscribeId describes
                        // a transient channel, and not a regular layout channel

                        if ( null != subscribeId && !subscribeId.equals("") && mSubIdMap.containsKey(subscribeId))
                        {
                            IChannelDefinition chanDef = getChannelDefinition(subscribeId);
                            AttributesImpl channelAttrs = new AttributesImpl();
                            channelAttrs.addAttribute("","ID","ID","ID",subscribeId);
                            channelAttrs.addAttribute("","typeID","typeID","CDATA",
                                                      "" + chanDef.getTypeId());
                            channelAttrs.addAttribute("","hidden","hidden","CDATA","false");
                            channelAttrs.addAttribute("","editable","editable","CDATA",
                                                      CommonUtils.boolToStr(chanDef.isEditable()));
                            channelAttrs.addAttribute("","unremovable","unremovable","CDATA","true");
                            channelAttrs.addAttribute("","name","name","CDATA",chanDef.getName());
                            channelAttrs.addAttribute("","description","description","CDATA",
                                                      chanDef.getDescription());
                            channelAttrs.addAttribute("","title","title","CDATA",chanDef.getTitle());
                            channelAttrs.addAttribute("","class","class","CDATA",chanDef.getJavaClass());
                            channelAttrs.addAttribute("","chanID","chanID","CDATA",
                                                      "" + chanDef.getId());
                            channelAttrs.addAttribute("","fname","fname","CDATA",chanDef.getFName());
                            channelAttrs.addAttribute("","timeout","timeout","CDATA",
                                                      "" + chanDef.getTimeout());
                            channelAttrs.addAttribute("","hasHelp","hasHelp","CDATA",
                                                      CommonUtils.boolToStr(chanDef.hasHelp()));
                            channelAttrs.addAttribute("","hasAbout","hasAbout","CDATA",
                                                      CommonUtils.boolToStr(chanDef.hasAbout()));

                            startElement("",CHANNEL,CHANNEL,channelAttrs);

                            // now add channel parameters
                            Set<IChannelParameter> chanParms = chanDef.getParameters();
                            for( IChannelParameter parm : chanParms )
                            {
                                AttributesImpl parmAttrs = new AttributesImpl();
                                parmAttrs.addAttribute("","name","name","CDATA",parm.getName());
                                parmAttrs.addAttribute("","value","value","CDATA",parm.getValue());
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

                final EntityIdentifier ei = person.getEntityIdentifier();
                final AuthorizationService authorizationService = AuthorizationService.instance();
                final IAuthorizationPrincipal ap = authorizationService.newPrincipal(ei.getKey(), ei.getType());
               
                final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletWindow.getPortletEntityId());
                final IChannelDefinition channelDefinition = portletDefinition.getChannelDefinition();
               
                if (!ap.canConfigure(channelDefinition.getId())) {
                    throw new AuthorizationException(person.getUserName() + " does not have permission to render '" + channelDefinition.getFName() + "' in " + portletMode + " PortletMode");
                }
            }
           
            portletWindow.setPortletMode(portletMode);
        }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

            return true;
        }
        if (!(object instanceof IChannelDefinition)) {
            return false;
        }
        IChannelDefinition rhs = (IChannelDefinition) object;
        return new EqualsBuilder()
            .append(this.fname, rhs.getFName())
            .append(this.name, rhs.getName())
            .isEquals();
    }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelDefinition

     */
    @Transactional
  public void deleteChannelDefinition(IChannelDefinition definition) {
        Validate.notNull(definition, "definition can not be null");
       
        final IChannelDefinition persistentChannelDefinition;
        if (this.entityManager.contains(definition)) {
            persistentChannelDefinition = definition;
        }
        else {
            persistentChannelDefinition = this.entityManager.merge(definition);
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.