Package org.jasig.portal.layout.dlm.remoting.registry

Examples of org.jasig.portal.layout.dlm.remoting.registry.ChannelRegistryBean


      type = TYPE_SUBSCRIBE;
    }
   
    IPerson user = personManager.getPerson(request);

    ChannelRegistryBean registry = getRegistry(user, type);

    if("true".equals(request.getParameter("xml"))) {
      XStream stream = new XStream();
      stream.processAnnotations(ChannelRegistryBean.class);
      String xml = stream.toXML(registry);
View Full Code Here


   
    // get a list of all channels
    List<IChannelDefinition> allChannels = channelRegistryStore.getChannelDefinitions();

    // construct a new channel registry
    ChannelRegistryBean registry = new ChannelRegistryBean();
   
    // add the root category and all its children to the registry
    ChannelCategory rootCategory = channelRegistryStore.getTopLevelChannelCategory();
    registry.addCategory(addChildren(rootCategory, allChannels, user, type));

      /*
       * uPortal historically has provided for a convention that channels
       * not in any category may potentially be viewed by users but may not
       * be subscribed to.  We'd like administrators to still be able to
       * modify these channels through the portlet administration tool.  The
       * logic below takes any channels that have not already been identified
       * as belonging to a category and adds them to the top-level of the
       * registry, assuming the current user has manage permissions.
       */
     
    if (type.equals(TYPE_MANAGE)) {
        EntityIdentifier ei = user.getEntityIdentifier();
          IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());

          for (IChannelDefinition channel : allChannels) {
              if (ap.canManage(channel.getId())) {
                  registry.addChannel(new ChannelBean(channel));
              }
          }
      }
   
    return registry;
View Full Code Here

TOP

Related Classes of org.jasig.portal.layout.dlm.remoting.registry.ChannelRegistryBean

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.