Package org.apache.pluto.driver.url

Examples of org.apache.pluto.driver.url.PortalURLParameter


        StringBuffer query = new StringBuffer("?");
        boolean firstParam = true;
        for (Iterator it = portalURL.getParameters().iterator();
            it.hasNext(); ) {

          PortalURLParameter param = (PortalURLParameter) it.next();

            // Encode action params in the query appended at the end of the URL.
            if (portalURL.getActionWindow() != null
                && portalURL.getActionWindow().equals(param.getWindowId())) {
                for (int i = 0; i < param.getValues().length; i++) {
                    // FIX for PLUTO-247
                    if ( firstParam ) {
                        firstParam = false;
                    } else {
                        query.append("&");
                    }
                    query.append(encodeQueryParam(param.getName())).append("=")
                        .append(encodeQueryParam(param.getValues()[i]));
                }
            }

            // Encode render params as a part of the URL.
            else if (param.getValues() != null
                && param.getValues().length > 0) {
                String valueString = encodeMultiValues(param.getValues());
                if (valueString.length() > 0) {
                  buffer.append("/").append(
                      encodeControlParameter(RENDER_PARAM, param.getWindowId(),
                               param.getName()));
                  buffer.append("/").append(valueString);
                }
            }
        }
View Full Code Here


        // Split multiple values into a value array.
        String[] paramValues = value.split(VALUE_DELIM);

        // Construct portal URL parameter and return.
        return new PortalURLParameter(windowId, paramName, paramValues);
    }
View Full Code Here

     * @param windowId  the window ID.
     */
    public void clearParameters(String windowId) {
      for (Iterator it = parameters.entrySet().iterator(); it.hasNext(); ) {
            Map.Entry entry = (Map.Entry) it.next();
            PortalURLParameter param = (PortalURLParameter) entry.getValue();
            if (param.getWindowId().equals(windowId)) {
              it.remove();
            }
        }
    }
View Full Code Here

     * @param windowId  the window ID.
     */
    public void clearParameters(String windowId) {
      for (Iterator<Map.Entry<String, PortalURLParameter>> it = parameters.entrySet().iterator(); it.hasNext(); ) {
            Map.Entry<String, PortalURLParameter> entry = it.next();
            PortalURLParameter param = entry.getValue();
            if (param.getWindowId()!=null){
              if (param.getWindowId().equals(windowId)) {
                  it.remove();
                }
            }
        }
    }
View Full Code Here

        clearParameters(windowId);
        for (PortalURLParameter param : url.getParameters())
        {
            if (windowId.equals(param.getWindowId()))
            {
                addParameter(new PortalURLParameter(param.getWindowId(), param.getName(), param.getValues()));
            }
        }
        Map<String, String[]> newPublicParameters = url.getNewPublicParameters();
        for (Map.Entry<String, String[]> entry : newPublicParameters.entrySet())
        {
View Full Code Here

        {
            for (Map.Entry<String,String[]> entry : renderParameters.entrySet())
            {
                if (publicRenderParameters == null || !publicRenderParameters.containsKey(entry.getKey()))
                {
                    url.addParameter(new PortalURLParameter(window, entry.getKey(), entry.getValue()));
                }
            }
        }
        if (publicRenderParameters != null)
        {
View Full Code Here

              value = st.nextToken();
            }

            // Defect PLUTO-361
            // ADDED
            PortalURLParameter param = decodeParameter( token, value );
            if( param != null )
            {
              portalURL.addParameter( param );
            }
            // REMOVED
View Full Code Here

        StringBuffer query = new StringBuffer("?");
        boolean firstParam = true;
        for (Iterator it = portalURL.getParameters().iterator();
            it.hasNext(); ) {

          PortalURLParameter param = (PortalURLParameter) it.next();

            // Encode action params in the query appended at the end of the URL.
            if (portalURL.getActionWindow() != null
                && portalURL.getActionWindow().equals(param.getWindowId())) {
                for (int i = 0; i < param.getValues().length; i++) {
                    // FIX for PLUTO-247
                    if ( firstParam ) {
                        firstParam = false;
                    } else {
                        query.append("&");
                    }
                    query.append(encodeQueryParam(param.getName())).append("=")
                        .append(encodeQueryParam(param.getValues()[i]));
                }
            }

            // Encode render params as a part of the URL.
            else if (param.getValues() != null
                && param.getValues().length > 0) {
                String valueString = encodeMultiValues(param.getValues());
                if (valueString.length() > 0) {
                  buffer.append("/").append(
                      encodeControlParameter(RENDER_PARAM, param.getWindowId(),
                               param.getName()));
                  buffer.append("/").append(valueString);
                }
            }
        }
View Full Code Here

        // Split multiple values into a value array.
        String[] paramValues = value.split(VALUE_DELIM);

        // Construct portal URL parameter and return.
        return new PortalURLParameter(windowId, paramName, paramValues);
    }
View Full Code Here

        StringBuffer query = new StringBuffer("?");
        boolean firstParam = true;
        for (Iterator it = portalURL.getParameters().iterator();
            it.hasNext(); ) {

          PortalURLParameter param = (PortalURLParameter) it.next();

            // Encode action params in the query appended at the end of the URL.
            if (portalURL.getActionWindow() != null
                && portalURL.getActionWindow().equals(param.getWindowId())) {
                for (int i = 0; i < param.getValues().length; i++) {
                    // FIX for PLUTO-247
                    if ( firstParam ) {
                        firstParam = false;
                    } else {
                        query.append("&");
                    }
                    query.append(encodeQueryParam(param.getName())).append("=")
                        .append(encodeQueryParam(param.getValues()[i]));
                }
            }

            // Encode render params as a part of the URL.
            else if (param.getValues() != null
                && param.getValues().length > 0) {
                String valueString = encodeMultiValues(param.getValues());
                if (valueString.length() > 0) {
                  buffer.append("/").append(
                      encodeControlParameter(RENDER_PARAM, param.getWindowId(),
                               param.getName()));
                  buffer.append("/").append(valueString);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.pluto.driver.url.PortalURLParameter

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.