Examples of JetspeedRequestContext


Examples of org.apache.jetspeed.request.JetspeedRequestContext

        }

        request.setSession(session);
        MockHttpServletResponse response = new MockHttpServletResponse();

        RequestContext a_oRC = new JetspeedRequestContext(request, response,
                config, null);

        Page a_oPage = setupPage();
        ContentPage a_oContentPage = new ContentPageImpl(a_oPage);

        a_oRC.setPage(a_oContentPage);

        return a_oRC;
    }
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

                        + a_sAction);
            }

            AjaxAction a_oAction = (AjaxAction) a_oActionObject;

            JetspeedRequestContext a_oJetspeedRequestContext = (JetspeedRequestContext) p_oRequestContext;

            // Process each parameter for this action
            while (a_oParamTok.hasMoreTokens())
            {
                String a_sName = a_oParamTok.nextToken(VALUE_TOKEN);
                // Strip of the leading ; if present
                if (a_sName.indexOf(';') >= 0)
                {
                    a_sName = a_sName.substring(1);
                }

                String a_sValue = a_oParamTok.nextToken();

                // Put the parameters on the request context
                a_oJetspeedRequestContext.setAttribute(a_sName, a_sValue);
            }

            // Invoke the action
            Map a_oResultMap = new HashMap();
            boolean a_bSuccess;
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

        request.setupAddParameter("name", defName);
        request.setSession(session);
        MockHttpServletResponse response = new MockHttpServletResponse();

        final RequestContext rc =
            new JetspeedRequestContext(request, response, config, null);
       
        Set principals = new HashSet();
        principals.add(new UserPrincipalImpl("admin"));
        principals.add(new RolePrincipalImpl("admin"));
        Subject subject = new Subject(true, principals, new HashSet(), new HashSet());
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

                }
            }

            // 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);
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

    private Object getAttributeInternal( String name )
    {
        Object value = super.getAttribute(name);
        if (name.equals(PortletRequest.USER_INFO))
        {
            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
            if (null != context)
            {
                String entityID = "--NULL--";
                PortletEntity entity = portletWindow.getPortletEntity();
                if (entity != null)
                {
                    entityID = entity.getId().toString();
                }
                PortletApplicationEntity portletAppEntity = portletWindow.getPortletEntity()
                        .getPortletApplicationEntity();
                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
                        .getPortletApplicationDefinition();

                if (null != portletAppDef)
                {
                    value = context.getUserInfoMap(portletAppDef.getId());
                    if (log.isDebugEnabled() && (null != value))
                        log.debug(PortletRequest.USER_INFO + " map size: " + ((Map) value).size());
                }
                else
                {
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

                }
            }

            // get portlet navigational params
            HashMap navParameters = new HashMap();
            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute("org.apache.jetspeed.request.RequestContext");
            if (context != null)
            {
                NavigationalState ns = context.getPortalURL().getNavigationalState();
                postAllowed = ns.getPortletWindowOfAction() != null || ns.getPortletWindowOfResource() != null;
                Iterator iter = ns.getParameterNames(portletWindow);
                while (iter.hasNext())
                {
                    String name = (String) iter.next();
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

    private Object getAttributeInternal( String name )
    {
        Object value = super.getAttribute(name);
        if (name.equals(PortletRequest.USER_INFO))
        {
            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
            if (null != context)
            {
                String entityID = "--NULL--";
                PortletEntity entity = portletWindow.getPortletEntity();
                if (entity != null)
                {
                    entityID = entity.getId().toString();
                }
                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
                        .getPortletApplicationDefinition();

                if (null != portletAppDef)
                {
                    value = context.getUserInfoMap(portletAppDef.getId());
                    if (log.isDebugEnabled() && (null != value))
                        log.debug(PortletRequest.USER_INFO + " map size: " + ((Map) value).size());
                }
                else
                {
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

                        + a_sAction);
            }

            AjaxAction a_oAction = (AjaxAction) a_oActionObject;

            JetspeedRequestContext a_oJetspeedRequestContext = (JetspeedRequestContext) p_oRequestContext;

            // Process each parameter for this action
            while (a_oParamTok.hasMoreTokens())
            {
                String a_sName = a_oParamTok.nextToken(VALUE_TOKEN);
                // Strip of the leading ; if present
                if (a_sName.indexOf(';') >= 0)
                {
                    a_sName = a_sName.substring(1);
                }

                String a_sValue = a_oParamTok.nextToken();

                // Put the parameters on the request context
                a_oJetspeedRequestContext.setAttribute(a_sName, a_sValue);
            }

            // Invoke the action
            Map a_oResultMap = new HashMap();
            boolean a_bSuccess;
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

        //get control params
        if (portletParameters == null)
        {
            portletParameters = new HashMap();

            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);
View Full Code Here

Examples of org.apache.jetspeed.request.JetspeedRequestContext

    public Object getAttribute( String name )
    {
        Object value = super.getAttribute(name);
        if (name.equals(PortletRequest.USER_INFO))
        {
            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute(RequestContext.REQUEST_PORTALENV);
            if (null != context)
            {
                String entityID = "--NULL--";
                PortletEntity entity = portletWindow.getPortletEntity();
                if (entity != null)
                {
                    entityID = entity.getId().toString();
                }
                PortletApplicationEntity portletAppEntity = portletWindow.getPortletEntity()
                        .getPortletApplicationEntity();
                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
                        .getPortletApplicationDefinition();

                if (null != portletAppDef)
                {
                    value = context.getUserInfoMap(portletAppDef.getId());
                    if (log.isDebugEnabled() && (null != value))
                        log.debug(PortletRequest.USER_INFO + " map size: " + ((Map) value).size());
                }
                else
                {
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.