Examples of IUserLayoutChannelDescription


Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

   * @param destinationElementId the ID of the channel to insert the new channel before or append after
   * @throws PortalException
   */
  private final void addChannel(Element newChannel, String position, String destinationElementId) throws PortalException
  {
      IUserLayoutChannelDescription channel=new UserLayoutChannelDescription(newChannel);
      if(isTab(destinationElementId)) {
          // create a new column and move channel there
          IUserLayoutNodeDescription newColumn=ulm.addNode(createFolder("Column"),destinationElementId,null);
          ulm.addNode(channel,newColumn.getId(),null);
      } else if(isColumn(destinationElementId)) {
          // move the channel into the column
          ulm.addNode(channel,destinationElementId,null);
      } else {
          // assume that destinationElementId is that of a sibling channel
          String siblingId=null;
          if(position.equals("before")) {
              siblingId=destinationElementId;
          }
          ulm.addNode(channel,ulm.getParentId(destinationElementId),siblingId);
      }

      // Make sure ChannelManager knows about the new channel
      final ChannelManager channelManager = pcs.getChannelManager();
      channelManager.instantiateChannel(pcs.getHttpServletRequest(), pcs.getHttpServletResponse(), channel.getId());
     
      ulm.saveUserLayout();
  }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

   * @param destinationElementId the ID of the channel to insert the new channel before or append after
   * @throws PortalException
   */
  private final void addChannel(Element newChannel, String position, String destinationElementId) throws PortalException
    {
      IUserLayoutChannelDescription channel=new UserLayoutChannelDescription(newChannel);
      addChannel(channel, position, destinationElementId);
  }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

          // Modify channel parameters
          String subAction = runtimeData.getParameter("subAction");
          if (subAction != null && subAction.equals("modifyChannelParams"))
          {
            IUserLayoutChannelDescription layoutChannel=(IUserLayoutChannelDescription)ulm.getNode(elementID);
            String channelPublishId=layoutChannel.getChannelPublishId();

            Document channelRegistry = ChannelRegistryManager.getChannelRegistry(staticData.getPerson());
            Element channel = (Element)channelRegistry.getElementById("chan" + channelPublishId);
            List overridableChanParams = getOverridableChannelParams(channelPublishId);
            context.internalState = new ParametersState(context, this, overridableChanParams, channel);
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

          // Modify channel parameters
          String subAction = runtimeData.getParameter("subAction");
          if (subAction != null && subAction.equals("modifyChannelParams"))
          {
            IUserLayoutChannelDescription layoutChannel=(IUserLayoutChannelDescription)ulm.getNode(elementID);
            List overridableChanParams = getOverridableChannelParams(layoutChannel);
            context.internalState = new ParametersState(context, this, overridableChanParams, layoutChannel);
            context.internalState.setStaticData(staticData);
          }
        }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

     * Returns a global channel Id given a channel instance Id
     * @return Channel's global Id
     */
    protected String getChannelGlobalId (String channelSubscribeId, String sessionId) throws PortalException {
        // Get the channel node from the user's layout
        IUserLayoutChannelDescription channel=(IUserLayoutChannelDescription) getUserLayoutManager(sessionId).getNode(channelSubscribeId);
        if(channel!=null) {
            return channel.getChannelPublishId();
        } else {
            return null;
        }
    }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

    this.profile = profile;
  }
  // Channels...
  public void channelAdded(LayoutEvent ev) {
    IUserLayoutChannelDescription channelDesc = (IUserLayoutChannelDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new ChannelAddedToLayoutPortalEvent(this, person, profile, channelDesc, ev.getParentNode()));
  }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

    IUserLayoutChannelDescription channelDesc = (IUserLayoutChannelDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new ChannelAddedToLayoutPortalEvent(this, person, profile, channelDesc, ev.getParentNode()));
  }
 
  public void channelUpdated(LayoutEvent ev) {
    IUserLayoutChannelDescription channelDesc = (IUserLayoutChannelDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new ChannelUpdatedInLayoutPortalEvent(this, person, profile, channelDesc, ev.getParentNode()));
  }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

    IUserLayoutChannelDescription channelDesc = (IUserLayoutChannelDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new ChannelUpdatedInLayoutPortalEvent(this, person, profile, channelDesc, ev.getParentNode()));
  }
 
  public void channelMoved(LayoutMoveEvent ev) {
    IUserLayoutChannelDescription channelDesc = (IUserLayoutChannelDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new ChannelMovedInLayoutPortalEvent(this, person, profile, channelDesc, ev.getOldParentNode(), ev.getParentNode()));
  }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

    IUserLayoutChannelDescription channelDesc = (IUserLayoutChannelDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new ChannelMovedInLayoutPortalEvent(this, person, profile, channelDesc, ev.getOldParentNode(), ev.getParentNode()));
  }
 
  public void channelDeleted(LayoutMoveEvent ev) {
    IUserLayoutChannelDescription channelDesc = (IUserLayoutChannelDescription)ev.getNodeDescription();
    EventPublisherLocator.getApplicationEventPublisher().publishEvent(new ChannelRemovedFromLayoutPortalEvent(this, person, profile, channelDesc, ev.getOldParentNode()));
  }
View Full Code Here

Examples of org.jasig.portal.layout.node.IUserLayoutChannelDescription

     * @return an <code>IChannel</code> instance
     * @exception PortalException if an error occurs
     */
    public static IChannel instantiateLayoutChannel(String channelSubscribeId, IUserLayoutManager ulm, String sessionId) throws PortalException {
        // get channel information from the user layout manager
        IUserLayoutChannelDescription channel=(IUserLayoutChannelDescription) ulm.getNode(channelSubscribeId);
        if(channel!=null) {
            String className=channel.getClassName();
            String channelPublishId=channel.getChannelPublishId();
            long timeOut=channel.getTimeout();
            try {
                return instantiateChannel(channelSubscribeId,channelPublishId, className,timeOut,channel.getParameterMap(),sessionId);
            } catch (Exception ex) {
                log.error("ChannelManager::instantiateChannel() : unable to instantiate channel class \""+className+"\". "+ex);
                return null;
            }
        } else return null;
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.