Examples of IUserLayoutChannelDescription


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

    {
        if (ulm == null)
            return;


        IUserLayoutChannelDescription cd = getChannelDescription();

        for (Iterator itr = this.entrySet().iterator(); itr.hasNext();)
        {
            Map.Entry parm = (Entry) itr.next();
            cd.setParameterValue((String) parm.getKey(), (String) parm
                    .getValue());
        }
        ulm.updateNode(cd);
        ulm.saveUserLayout();
        layoutChannelDescription = null; // force a reload next time
View Full Code Here

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

        if (ulm == null) // nothing can be persisted so drop back to old way
            putAll(params);

        try
        {
            IUserLayoutChannelDescription cd = getChannelDescription();
            for(Iterator itr = params.entrySet().iterator(); itr.hasNext();)
            {
                Map.Entry e = (Entry) itr.next();
                if (! cd.canOverrideParameter((String)e.getKey()))
                    throw new IllegalChannelParameterOverrideException(
                        (String)e.getKey(), (String) e.getValue());
            }
        }
        catch(PortalException pe)
View Full Code Here

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

                IAnchoringSerializer as = (IAnchoringSerializer)contentHandler;
                as.stopAnchoring();
            }

            // Obtain the channel description
            IUserLayoutChannelDescription channelDesc = null;
            IUserLayoutNodeDescription parentNode = null;
            try {
                final IUserLayoutManager userLayoutManager = userPreferencesManager.getUserLayoutManager();
                channelDesc = (IUserLayoutChannelDescription) userLayoutManager.getNode(channelSubscribeId);
               
                final String parentNodeId = userLayoutManager.getParentId(channelDesc.getId());
                if (parentNodeId != null) {
                    parentNode = userLayoutManager.getNode(parentNodeId);
                }
            }
            catch (PortalException pe) {
View Full Code Here

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

            channelTable.remove(channelSubscribeId);
        }
       
        // get channel information from the user layout manager
        final IUserLayoutManager userLayoutManager = userPreferencesManager.getUserLayoutManager();
        final IUserLayoutChannelDescription channel = (IUserLayoutChannelDescription) userLayoutManager.getNode(channelSubscribeId);
        if (channel != null) {
            return this.instantiateChannel(request, response, channel);
        }

        return null;
View Full Code Here

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

            this.channelTarget = null;
        }

        if (channelTarget != null) {
            // Obtain the channel description
            IUserLayoutChannelDescription channelDesc = null;
            IUserLayoutNodeDescription parentNode = null;
            try {
                final IUserLayoutManager userLayoutManager = userPreferencesManager.getUserLayoutManager();
                channelDesc = (IUserLayoutChannelDescription) userLayoutManager.getNode(channelTarget);
               
                final String parentNodeId = userLayoutManager.getParentId(channelDesc.getId());
                if (parentNodeId != null) {
                    parentNode = userLayoutManager.getNode(parentNodeId);
                }
            }
            catch (PortalException pe) {
View Full Code Here

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

        IUserLayoutNodeDescription node = userPreferencesManager.getUserLayoutManager().getNode(channelSubscribeId);
        if (!(node instanceof IUserLayoutChannelDescription)) {
            throw new PortalException("'" + channelSubscribeId + "' is not a channel node !");
        }

        final IUserLayoutChannelDescription channel = (IUserLayoutChannelDescription) node;
        final long timeOut = channel.getTimeout();

        IChannel ch = channelTable.get(channelSubscribeId);
        final IChannel originalChannel = ch;

        if (ch == null || ch instanceof CSecureInfo) {
            try {
                ch = instantiateChannel(request, response, channel);
            }
            catch (Throwable e) {
                ch = replaceWithErrorChannel(request, response, channelSubscribeId, ErrorCode.SET_STATIC_DATA_EXCEPTION, e, null, false);
            }
        }
       
        if (ch instanceof IPrivileged) {
            ch = this.feedPortalControlStructuresToChannel(request, response, channelSubscribeId, (IPrivileged) ch);
        }
       
        //If the channel object has changed (likely now an error channel) return immediatly
        if (originalChannel != null && originalChannel != ch) {
            return false;
        }
       
        final ChannelRuntimeData runtimeData = this.getChannelRuntimeData(request, channelSubscribeId, RequestType.ACTION);

        // Build a new channel renderer instance.
        final IChannelRenderer channelRenderer = cChannelRendererFactory.newInstance(ch, runtimeData);

        if (noTimeout) {
            channelRenderer.setTimeout(0);
        }
        else {
            channelRenderer.setTimeout(timeOut);
        }

        channelRenderer.startRendering();
       
        final int renderingStatus;
        try {
            renderingStatus = channelRenderer.completeRendering();
        }
        catch (Throwable t) {
            ch = replaceWithErrorChannel(request, response, channelSubscribeId, ErrorCode.RENDER_TIME_EXCEPTION, t, null, false);
            log.error("Failed to complete action", t);
            return false;
        }

        if (renderingStatus != IChannelRenderer.RENDERING_SUCCESSFUL) {
            final ErrorCode errorCode;
            if (renderingStatus == IChannelRenderer.RENDERING_TIMED_OUT) {
                errorCode = ErrorCode.TIMEOUT_EXCEPTION;
            }
            else {
                errorCode = ErrorCode.GENERAL_ERROR;
            }
           
            ch = replaceWithErrorChannel(request, response, channelSubscribeId, errorCode, null, "unsuccessful rendering", true);
            log.error("Action did not compplete successefully: " + renderingStatus);
            return false;
        }
       
        // Obtain the channel description
        IUserLayoutChannelDescription channelDesc = null;
        IUserLayoutNodeDescription parentNode = null;
        try {
            final IUserLayoutManager userLayoutManager = userPreferencesManager.getUserLayoutManager();
            channelDesc = (IUserLayoutChannelDescription) userLayoutManager.getNode(channelSubscribeId);
           
            final String parentNodeId = userLayoutManager.getParentId(channelDesc.getId());
            if (parentNodeId != null) {
                parentNode = userLayoutManager.getNode(parentNodeId);
            }
        }
        catch (PortalException pe) {
View Full Code Here

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

        IUserLayoutNodeDescription node=userPreferencesManager.getUserLayoutManager().getNode(channelSubscribeId);
        if(!(node instanceof IUserLayoutChannelDescription)) {
            throw new PortalException("'"+channelSubscribeId+"' is not a channel node !");
        }

        IUserLayoutChannelDescription channel=(IUserLayoutChannelDescription) node;
        timeOut=channel.getTimeout();

        ch = channelTable.get(channelSubscribeId);

        // replace channels that are specified as needing to be
        // rendered securely with CSecureInfo.
        if (!request.isSecure() && channel.isSecure()){
            if (!(ch instanceof CSecureInfo)){
                ch = replaceWithSecureInfoChannel(request, response, channelSubscribeId, false);
            }
        }
        else{
View Full Code Here

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

    }
   
    protected String determineDatabaseChannelSubscribeId(String channelSubscribeId) {
        //Find the referenced Node in the user's layout
        final IUserLayoutManager userLayoutManager = this.getUserLayoutManager();
        final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription)userLayoutManager.getNode(channelSubscribeId);
       
        //Lookup the IportletDefinition for the node
        final String channelPublishId = channelNode.getChannelPublishId();
        final int channelDefinitionId = Integer.valueOf(channelPublishId.startsWith("chan") ? channelPublishId.substring(4) : channelPublishId);
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(channelDefinitionId);

        //Generate the subscribe ID used for the database
        return this.getDatabaseChannelSubscribeId(portletDefinition.getPortletDefinitionId());
View Full Code Here

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

    public void setProfileId(int id) {
        //ignore, method required for hibernate
    }
   
    protected String getChannelDescriptionString() {
        final IUserLayoutChannelDescription channelDescription = getChannelDescription();
       
        if (channelDescription == null) {
            return "[transient channel]";
        }
       
        return "[" + channelDescription.getName() + ", "
                + channelDescription.getChannelPublishId() + ", "
                + channelDescription.getChannelSubscribeId()
                + "]";
    }
View Full Code Here

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

            this.logger.info("No channel subscribe ID found for fname '" + targetedFname + "'. skipping portlet parameter processing");
            return null;
        }
       
        //Find the channel and portlet definitions
        final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription)userLayoutManager.getNode(channelSubscribeId);
        final String channelPublishId = channelNode.getChannelPublishId();
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(Integer.parseInt(channelPublishId));
        if (!portletDefinition.getChannelDefinition().isPortlet()) {
            this.logger.info("No portlet defintion found for channel definition '" + channelPublishId + "' with fname '" + targetedFname + "'. skipping portlet parameter processing");
            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.