Examples of PortalURL


Examples of name.shamansir.mvp4glayout.client.ui.Portal.PortalUrl

    public final void convertFromToken(String event, String param, E eventBus) {
     
      try {
         
        // get current URL and portal
        final PortalUrl url = PortalUrl.fromEvent(group, event, param);
        final Portal view = url.view();
       
        // prepare layout
        eventBus.newPortal(view, layout.make(view, eventBus));
     
        // dispatch current URL
        convertFromUrl(url, url.view(), eventBus);
       
      } catch (PortalNotFoundException pnfe) {
       
        eventBus.portalNotFound(pnfe);
       
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

            // get portlet params
            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute("org.apache.jetspeed.request.RequestContext");
            if (context != null)
            {
                PortalURL url = context.getPortalURL();
                Iterator iter = url.getNavigationalState().getParameterNames(portletWindow);
                while (iter.hasNext())
                {
                    String name = (String) iter.next();
                    String[] values = url.getNavigationalState().getParameterValues(portletWindow, name);
                    portletParameters.put(name, values);

                }
            }
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

            //String state[] = nav.parsePortalParameter(request, "_ns"); // TODO don't hard code
            //if (state != null)
            context.setAttribute(PortalReservedParameters.PIPELINE, PortalReservedParameters.ACTION_PIPELINE);                               
            engine.service(context);
           
            PortalURL url = context.getPortalURL();
            if (url != null)
            {
                NavigationalState state = url.getNavigationalState();               
                PortletWindow actionWindow = state.getPortletWindowOfAction();
                if (actionWindow == null)
                {
                    Iterator windows = state.getWindowIdIterator();
                    while (windows.hasNext())
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

    {
        NavigationalState ns = null;
        RequestContext context = (RequestContext) data.getRequest().getAttribute(FUSION_NAV_STATE);
        if (context != null)
        {
            PortalURL url = context.getPortalURL();
            if (url != null)
                ns = url.getNavigationalState();
        }
        return (MutableNavigationalState)ns;
    }
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

        try
        {
            if (mode.equals(PortletMode.HELP) || !state.equals(WindowState.NORMAL))
            {
                // switch back to VIEW mode and NORMAL state.
                PortalURL portalURL = requestContext.getPortalURL();
                String action = requestContext.getResponse().encodeURL( (isAjaxRequest)
                  ? portalURL.createNavigationalEncoding(window, PortletMode.VIEW, WindowState.NORMAL)                         
                  : portalURL.createPortletURL(window, PortletMode.VIEW, WindowState.NORMAL, portalURL.isSecure()).toString() );
                String actionName = PortletMode.VIEW.toString();
                pageModes.add(new DecoratorAction(actionName, requestContext.getLocale(), decoration.getResource("images/" + actionName + ".gif"),action,DecoratorActionTemplate.ACTION_TYPE_MODE));
            }
            else if ( pageActionAccess.isEditAllowed() )
            {
                String targetMode = pageActionAccess.isEditing() ? PortletMode.VIEW.toString() : PortletMode.EDIT.toString();
                PortalURL portalURL = requestContext.getPortalURL();
                HashMap parameters = new HashMap();
                String[] paramValues = new String[]{targetMode};
                parameters.put("pageMode",paramValues);

                // Use an ActionURL to set the oposite pageMode and always set VIEW mode and state NORMAL
                String action = requestContext.getResponse().encodeURL( (isAjaxRequest)
                    ? portalURL.createNavigationalEncoding(window, parameters, PortletMode.VIEW, WindowState.NORMAL, true)                                             
                    : portalURL.createPortletURL(window, parameters, PortletMode.VIEW, WindowState.NORMAL, true, portalURL.isSecure()).toString() );
                pageModes.add(new DecoratorAction(targetMode, requestContext.getLocale(), decoration.getResource("images/" + targetMode + ".gif"), action,DecoratorActionTemplate.ACTION_TYPE_MODE));
               
                if (supportsPortletMode(supports,PortletMode.HELP))
                {
                    if ( pageActionAccess.isEditing() )
                    {
                        // force it back to VIEW mode first with an ActionURL, as well as setting HELP mode and MAXIMIZED state
                        paramValues[0] = PortletMode.VIEW.toString();
                        action = requestContext.getResponse().encodeURL( (isAjaxRequest)
                            ? portalURL.createNavigationalEncoding(window, parameters, PortletMode.HELP, WindowState.MAXIMIZED, true)                                                 
                            : portalURL.createPortletURL(window, parameters, PortletMode.HELP, WindowState.MAXIMIZED, true, portalURL.isSecure()).toString() );
                    }
                    else
                    {
                        // switch to mode HELP and state MAXIMIZED
                        action = requestContext.getResponse().encodeURL( (isAjaxRequest)
                            ? portalURL.createNavigationalEncoding(window, PortletMode.HELP, WindowState.MAXIMIZED)                       
                            : portalURL.createPortletURL(window,PortletMode.HELP, WindowState.MAXIMIZED, portalURL.isSecure()).toString() );
                    }
                    String actionName = PortletMode.HELP.toString();
                    pageModes.add(new DecoratorAction(actionName, requestContext.getLocale(), decoration.getResource("images/" + actionName + ".gif"), action,DecoratorActionTemplate.ACTION_TYPE_MODE));
                }
            }
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

    protected DecoratorAction createAction(RequestContext rc, PortletWindow pw, Decoration decoration,
            DecoratorActionTemplate template)
    {
        String actionName = template.getAction();

        PortalURL portalURL = rc.getPortalURL();
        Boolean isAjaxRequest = (Boolean) rc
                .getAttribute(DecorationValve.IS_AJAX_DECORATION_REQUEST);

        WindowState ws;
        PortletMode pm;
        if (editMaximizesOption)
        {
            if (template.getAction().equals(JetspeedActions.EDIT))
            {
                ws = WindowState.MAXIMIZED;
                pm = template.getCustomMode();
            }
            else if (template.getAction().equals(JetspeedActions.VIEW))
            {
                ws = WindowState.NORMAL;
                pm = template.getCustomMode();               
            }
            else if (template.getAction().equals(JetspeedActions.NORMAL))
            {
                pm = PortletMode.VIEW;  
                ws = template.getCustomState();               
            }
            else
            {
                ws = template.getCustomState();
                pm = template.getCustomMode();
            }
        }
        else
        {
            ws = template.getCustomState();
            pm = template.getCustomMode();           
        }
        /////////////////////////////////////
       
        String actionURL = rc.getResponse().encodeURL(
                (isAjaxRequest == null) ? portalURL.createPortletURL(pw, pm, ws, portalURL.isSecure()).toString()
                        : portalURL.createNavigationalEncoding(pw, pm, ws));

        String linkURL = decoration
                .getResource("images/" + actionName + ".gif");

        boolean customAction = (template.getMode() != null && !template
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

        try
        {
            if (mode.equals(PortletMode.HELP) || !state.equals(WindowState.NORMAL))
            {
                // switch back to VIEW mode and NORMAL state.
                PortalURL portalURL = requestContext.getPortalURL();
                String action = requestContext.getResponse().encodeURL( (isAjaxRequest)
                  ? portalURL.createNavigationalEncoding(window, PortletMode.VIEW, WindowState.NORMAL)                         
                  : portalURL.createPortletURL(window, PortletMode.VIEW, WindowState.NORMAL, portalURL.isSecure()).toString() );
                String actionName = PortletMode.VIEW.toString();
                pageModes.add(new DecoratorAction(actionName, requestContext.getLocale(), decoration.getResource("images/" + actionName + ".gif"),action,DecoratorActionTemplate.ACTION_TYPE_MODE));
            }
            else if ( pageActionAccess.isEditAllowed() )
            {
                String targetMode = pageActionAccess.isEditing() ? PortletMode.VIEW.toString() : PortletMode.EDIT.toString();
                PortalURL portalURL = requestContext.getPortalURL();
                HashMap parameters = new HashMap();
                String[] paramValues = new String[]{targetMode};
                parameters.put("pageMode",paramValues);

                // Use an ActionURL to set the oposite pageMode and always set VIEW mode and state NORMAL
                String action = requestContext.getResponse().encodeURL( (isAjaxRequest)
                    ? portalURL.createNavigationalEncoding(window, parameters, PortletMode.VIEW, WindowState.NORMAL, true)                                             
                    : portalURL.createPortletURL(window, parameters, PortletMode.VIEW, WindowState.NORMAL, true, portalURL.isSecure()).toString() );
                pageModes.add(new DecoratorAction(targetMode, requestContext.getLocale(), decoration.getResource("images/" + targetMode + ".gif"), action,DecoratorActionTemplate.ACTION_TYPE_MODE));
               
                //window.getPortletEntity().getPortletDefinition().getInitParameterSet().get( "xxxx" );
               
                if (content.supportsPortletMode(PortletMode.HELP))
                {
                    if ( pageActionAccess.isEditing() )
                    {
                        // force it back to VIEW mode first with an ActionURL, as well as setting HELP mode and MAXIMIZED state
                        paramValues[0] = PortletMode.VIEW.toString();
                        action = requestContext.getResponse().encodeURL( (isAjaxRequest)
                            ? portalURL.createNavigationalEncoding(window, parameters, PortletMode.HELP, WindowState.MAXIMIZED, true)                                                 
                            : portalURL.createPortletURL(window, parameters, PortletMode.HELP, WindowState.MAXIMIZED, true, portalURL.isSecure()).toString() );
                    }
                    else
                    {
                        // switch to mode HELP and state MAXIMIZED
                        action = requestContext.getResponse().encodeURL( (isAjaxRequest)
                            ? portalURL.createNavigationalEncoding(window, PortletMode.HELP, WindowState.MAXIMIZED)                       
                            : portalURL.createPortletURL(window,PortletMode.HELP, WindowState.MAXIMIZED, portalURL.isSecure()).toString() );
                    }
                    String actionName = PortletMode.HELP.toString();
                    pageModes.add(new DecoratorAction(actionName, requestContext.getLocale(), decoration.getResource("images/" + actionName + ".gif"), action,DecoratorActionTemplate.ACTION_TYPE_MODE));
                }
            }
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

            // get portlet navigational params
            HashMap navParameters = new HashMap();
            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute("org.apache.jetspeed.request.RequestContext");
            if (context != null)
            {
                PortalURL url = context.getPortalURL();
                actionRequest = context.getActionWindow() != null;
                Iterator iter = url.getNavigationalState().getParameterNames(portletWindow);
                while (iter.hasNext())
                {
                    String name = (String) iter.next();
                    String[] values = url.getNavigationalState().getParameterValues(portletWindow, name);
                    navParameters.put(name, values);
                }
            }
           
            // now first merge the keys we have into one unique set
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

    protected DecoratorAction createAction(RequestContext rc, PortletWindow pw, Decoration decoration,
                    DecoratorActionTemplate template)
    {
        String actionName = template.getAction();

        PortalURL portalURL = rc.getPortalURL();
        Boolean isAjaxRequest = (Boolean)rc.getAttribute(DecorationValve.IS_AJAX_DECORATION_REQUEST);
       
        String actionURL = rc.getResponse().encodeURL( (isAjaxRequest == null)
            ? portalURL.createPortletURL(pw, template.getCustomMode(), template.getCustomState(),
                        portalURL.isSecure()).toString()
            :  portalURL.createNavigationalEncoding(pw, template.getCustomMode(), template.getCustomState()) );

        String linkURL = decoration.getResource("images/" + actionName + ".gif");

        boolean customAction = (template.getMode() != null && !template.getMode().equals(template.getCustomMode()))
                        || (template.getState() != null && !template.getState().equals(template.getCustomState()));
View Full Code Here

Examples of org.apache.jetspeed.container.url.PortalURL

            if (state != null)
            {
                state.sync(request);
            }
           
            PortalURL url = request.getPortalURL();
            PortletWindow actionWindow = url.getNavigationalState().getPortletWindowOfAction();
            if (null == actionWindow)
            {
                // set to null to denote that no action was requested
                request.setActionWindow(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.