Package org.apache.jetspeed.portal.portlets

Examples of org.apache.jetspeed.portal.portlets.AbstractVTLPortlet


public abstract class AbstractVTLPortletAction extends Action
{
    public void doPerform( RunData rundata )
    {
        Context context = (Context)rundata.getTemplateInfo().getTemplateContext( "VTLPortletContext" );
        AbstractVTLPortlet xPortlet = (AbstractVTLPortlet)context.get( "portlet" );
        boolean loggedUser = rundata.getUser() != null && rundata.getUser().hasLoggedIn();


        // portlet must be configured
        if( xPortlet.isButtonConfigure( rundata ) )
        {
            if( loggedUser )
            {
                setConfigureContent( xPortlet, context, rundata );
            }
            return;
        }

        // portlet must shows maximized
        if( xPortlet.isButtonMaximize( rundata ) )
        {
            setMaximizedContent( xPortlet, context, rundata, loggedUser );
            return;
        }

        // portlet is minimized - let's change at least the title bar
        if( xPortlet.isMinimized( rundata ) )
        {
            if( loggedUser )
            {
                setMinimizedContent( xPortlet, context, rundata );
            }
View Full Code Here


        // i don't like this, but ...
        if( portlet instanceof AbstractVTLPortlet)
        {
            // only AbstractVTLPortlet gives me this functionality
            AbstractVTLPortlet xPortlet = (AbstractVTLPortlet)portlet;
   
            // configure button
            if( xPortlet.getAllowEdit( rundata ) )
            {
                hrefConfigure=new DynamicURI( rundata )
                                    .addPathInfo("portlet", portletName)
                                    .addPathInfo("button","configure")
                                    .toString();
            }
   
            // minimize/restore button
            if( xPortlet.getAllowMinimize( rundata ) )
            {
                if( xPortlet.isMinimized( rundata ) )
                {
                    hrefRestore=new DynamicURI( rundata )
                                    .addPathInfo("action", "portlets.RestorePortlet")
                                    .addPathInfo("portletName", portletName)
                                    .toString();
                }
                else
                {
                    hrefMinimize=new DynamicURI( rundata )
                                    .addPathInfo("action", "portlets.MinimizePortlet")
                                    .addPathInfo("portletName", portletName)
                                    .toString();
                }
            }
   
            // maximize button
            if( xPortlet.getAllowMaximize( rundata ) )
            {
                hrefMaximize=new DynamicURI( rundata )
                                    .addPathInfo("portlet", portletName)
                                    .addPathInfo("button","maximize")
                                    .toString();
            }
   
            // close button
            if( xPortlet.getAllowClose( rundata ) )
            {
                hrefClose=new DynamicURI( rundata )
                                    .addPathInfo("action", "portlets.ClosePortlet")
                                    .addPathInfo("portletName", portletName)
                                    .toString();
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portal.portlets.AbstractVTLPortlet

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.