Examples of IChannelType


Examples of org.jasig.portal.channel.IChannelType

   
    private ChannelPublishingDefinition loadChannelPublishingDefinition(int channelTypeId)  {
        // if the CPD is not already in the cache, determine the CPD URI
        final String cpdUri;
        if (channelTypeId >= 0) {
            final IChannelType type = this.channelRegistryStore.getChannelType(channelTypeId);
            if (type == null) {
                throw new IllegalArgumentException("No ChannelType registered with id: " + channelTypeId);
            }
            cpdUri = type.getCpdUri();
        }
        else {
            cpdUri = CUSTOM_CPD_PATH;
        }
       
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

      checkValidity("<CPD URI>", uri);
     
      boolean isNew = false;
      chanRegStore = ChannelRegistryStoreFactory.getChannelRegistryStoreImpl();
      List<IChannelType> types = chanRegStore.getChannelTypes();
      IChannelType chanType = null;
       
      for(IChannelType type : types)
      {
          if (type.getCpdUri().equals(uri))
              chanType = type;
      }
      if (chanType == null) // new one being defined
      {
          isNew = true;
          chanType = chanRegStore.newChannelType(name, clazz, uri);
      }
           
      chanType.setDescription(description);
      chanRegStore.saveChannelType(chanType);
      return "The \"" + name + "\" channel type has been "
      + (isNew ? "added" : "updated") + " successfully.";
  }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

      }
     
    }

     
      final IChannelType channelType = channelRegistryStore.getChannelType(form.getTypeId());
      if (channelType == null) {
          throw new IllegalArgumentException("No IChannelType exists for ID " + form.getTypeId());
      }
      channelDef.setType(channelType);
     
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

                ci.chanDef.setFName(value);
            else if (tagname.equals("desc"))
                ci.chanDef.setDescription(value);
            else if (tagname.equals("type")) {
                final int typeId = getType(value);
                final IChannelType channelType = crs.getChannelType(typeId);
                if (channelType == null) {
                    throw new IllegalArgumentException("No IChannelType exists for ID " + typeId);
                }
                ci.chanDef.setType(channelType);
            }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

     */
    @Transactional
  public void deleteChannelType(IChannelType type) {
        Validate.notNull(type, "definition can not be null");
       
        final IChannelType persistentChanneltype;
        if (this.entityManager.contains(type)) {
            persistentChanneltype = type;
        }
        else {
            persistentChanneltype = this.entityManager.merge(type);
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

        query.setHint("org.hibernate.cacheable", true);
        query.setHint("org.hibernate.cacheRegion", FIND_CHAN_TYPE_BY_NAME_CACHE_REGION);
        query.setMaxResults(1);
       
        final List<IChannelType> channelTypes = query.getResultList();
        IChannelType type = (IChannelType) DataAccessUtils.uniqueResult(channelTypes);
    return type;
  }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

            return true;
        }
        if (!(object instanceof IChannelType)) {
            return false;
        }
        IChannelType rhs = (IChannelType) object;
        return new EqualsBuilder()
            .append(this.name, rhs.getName())
            .append(this.javaClass, rhs.getJavaClass())
            .append(this.cpdUri, rhs.getCpdUri())
            .isEquals();
    }
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

    /**
     * Test that ChannelDefinition identifies CPortletAdaptor as a portlet but
     * does not identify CGenericXSLT as a portlet.
     */
    public void testIsPortlet() {
        IChannelType channelType = EasyMock.createMock(IChannelType.class);
        EasyMock.expect(channelType.getId()).andReturn(1).anyTimes();
        EasyMock.replay(channelType);
       
        IChannelDefinition cd1 = new ChannelDefinitionImpl(channelType, "fname", CGenericXSLT.class.getName(), "Name", "title");
        assertFalse(cd1.isPortlet());
       
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

     * 'channel' and that it has the proper owning document and that the channel
     * element has the correct identifer such that it can be gotten by ID.
     * @throws ParserConfigurationException
     */
    public void testGetDocument() throws ParserConfigurationException {
        IChannelType channelType = EasyMock.createMock(IChannelType.class);
        EasyMock.expect(channelType.getId()).andReturn(12).anyTimes();
        EasyMock.replay(channelType);
       
        IChannelDefinition cd = new ChannelDefinitionImpl(channelType, "test_fname", CGenericXSLT.class.getName(), "testName", "testTitle");
       
        cd.setDescription("A test channel description.");
View Full Code Here

Examples of org.jasig.portal.channel.IChannelType

        final Set<IPortletEntity> portEnts = this.jpaPortletEntityDao.getPortletEntities(new PortletDefinitionIdImpl(1));
        assertEquals(Collections.emptySet(), portEnts);
    }

    public void testAllDefinitionDaoMethods() throws Exception {
        final IChannelType channelType = this.jpaChannelTypeDao.createChannelType("BaseType", IChannelType.class.getName(), "foobar");
        this.checkPoint();
       
        //Create a definition
        final IChannelDefinition chanDef1 = this.jpaChannelDefinitionDao.createChannelDefinition(channelType, "fname1", IPortletAdaptor.class.getName(), "Test Portlet 1", "Test Portlet 1 Title");
        final IPortletDefinition portDef1 = this.jpaPortletDefinitionDao.getPortletDefinition(chanDef1.getId());
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.