Package org.infoglue.deliver.portal

Examples of org.infoglue.deliver.portal.PortalControlURL


    private Map paramMap;
    private Map attributeMap = new HashMap();

    public ServletRequestIG(PortletWindow window, HttpServletRequest req) {
        super(req);
        PortalControlURL url = new PortalControlURL(req);
        this.paramMap = url.getRenderParameterMap(window);
        this.paramMap.putAll(url.getQueryParameterMap(window)); // in case of namespace-params.

        if (log.isDebugEnabled()) {
            StringBuffer str = new StringBuffer();
            for (Iterator it = paramMap.keySet().iterator(); it.hasNext();) {
                String name = (String) it.next();
View Full Code Here


    //private HttpServletRequest request;
    private PortalControlURL url;

    public DynamicInformationProviderIG(HttpServletRequest request, ServletConfig config) {
        //this.request = request;
        this.url = new PortalControlURL(request);
    }
View Full Code Here

    /**
     * Return a new portal control URL
     */
    public PortalControlURL getPortalURL() {
        return new PortalControlURL(url);
    }
View Full Code Here

    public void setParameters(Map parameters) {
        this.parameters = parameters;
    }

    public String toString() {
        PortalControlURL url = provider.getPortalURL();

        if (mode != null) {
            url.setPortletMode(portletWindow, mode);
        }
        if (state != null) {
            url.setPortletWindowState(portletWindow, state);
        }

        if (clearParameters) {
            url.clearRenderParameters(portletWindow);
        }

        /*
         * If the request does not contain a _pid or an _ac parameter
         * it is a general request from infoglue. The parameters on the query
         * is then assumed to be infoglue parameters such as siteNodeId..
         */
        // Render request... set _ig parameters
        if (!url.isTargeted()) {
            Map params = url.getQueryParameterMap();
            for (Iterator it = params.keySet().iterator(); it.hasNext();) {
                String name = (String) it.next();
                String[] values = (String[]) params.get(name);
                url.setPathParameter(PortalControlURL.IG + name, values);
            }
        }
       
        // set portlet id for associated request parms
        url.clearActionParameter();
        if (action) {
            url.setActionParameter(portletWindow);
        } else {
            url.setPortletId(portletWindow);
        }

        url.clearQueryParameters();

        if (parameters != null) {
            Iterator names = parameters.keySet().iterator();
            while (names.hasNext()) {
                String name = (String) names.next();
                Object value = parameters.get(name);
                String[] values = value instanceof String ? new String[] {(String) value }
                : (String[]) value;
                if (action) {
                    url.setQueryParameter(portletWindow, name, values);
                } else {
                    url.setRenderParameter(portletWindow, name, values);
                }
            }
        }
        String str = url.toString();
        //log.debug("Generated URL: " + str);
        return str;
    }
View Full Code Here

TOP

Related Classes of org.infoglue.deliver.portal.PortalControlURL

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.