Examples of Parameters


Examples of com.gistlabs.mechanize.parameters.Parameters

        }
        else
          break;
      }

      Parameters parameters = new Parameters();
      for(NameValuePair param : URLEncodedUtils.parse(content.toString(), Charset.forName("UTF-8")))
        parameters.add(param.getName(), param.getValue());
      return parameters;
    }
    catch(IOException e) {
      throw MechanizeExceptionFactory.newException(e);
    }
View Full Code Here

Examples of com.gistlabs.mechanize.parameters.Parameters

  }

  /** Returns the parameters containing all name value params beside submit button, image button, unchecked radio
   *  buttons and checkboxes and without Upload information. */
  private Parameters composeParameters(SubmitButton button, SubmitImage image, int x, int y) {
    Parameters params = new Parameters();
    for(FormElement element : this) {
      String name = element.getName();
      String value = element.getValue();
      if(element instanceof Checkable) {
        if(((Checkable)element).isChecked())
          params.add(name, value != null ? value : "");
      }
      else if(element instanceof Select) {
        Select select = (Select)element;
        for(Select.Option option : select.getOptions())
          if(option.isSelected())
            params.add(select.getName(), option.getValue() != null ? option.getValue() : "");
      }
      else if(!(element instanceof SubmitButton) && !(element instanceof SubmitImage) && !(element instanceof Upload)) {
        if(name != null)
          params.add(name, value != null ? value : "");
      }
    }
    if(button != null && button.getName() != null)
      params.add(button.getName(), button.getValue() != null ? button.getValue() : "");
    if(image != null) {
      if(image.getValue() != null && image.getValue().length() > 1)
        params.add(image.getName(), image.getValue());
      params.add(image.getName() + ".x", "" + x);
      params.add(image.getName() + ".y", "" + y);
    }
    return params;
  }
View Full Code Here

Examples of com.ikanow.infinit.e.api.Parameters

     ipAddress =  request.getClientInfo().getAddress();
    
     //Every user must pass in their cookies 
     cookie = request.getCookies().getFirstValue("infinitecookie", true);
    
     parameters = new Parameters(request.getResourceRef().getQueryAsForm());
     Map<String, String> queryOptions = this.getQuery().getValuesMap();
     admuser = queryOptions.get("admuser");
     admpass = queryOptions.get("admpass");
    
     String urlStr = request.getResourceRef().toString();
View Full Code Here

Examples of com.jbidwatcher.util.Parameters

    return result;
  }

  public String recognizeBidpage(String identifier, StringBuffer page) {
    if(canParse()) {
      Parameters p = new Parameters();
      if (identifier != null) p.put("item", identifier);
      p.put("body", page);
      String url = url("my.jbidwatcher.com/services/recognize");
      return http().postTo(url, p);
    } else {
      return null;
    }
View Full Code Here

Examples of com.spun.util.MethodExecutionPath.Parameters

    for (Integer[] indexs : perms)
    {
      Object p[] = getParameters(parametersVariations, indexs);
      if (m == null)
      {
        m = new Parameters(p).getBestFitMethod(call.getClass(), method);
      }
     
      Object out;
      try
      {
View Full Code Here

Examples of com.sun.enterprise.tools.common.validation.data.Parameters

        String argumentType;

        constraint = (Constraint)utils.createObject(classname);
        if(null != arguments){
            int size = arguments.sizeArgument();
            Parameters parameters = check.getParameters();

            if((null != parameters) && (size == parameters.sizeParameter())){
                Argument argument =  null;
                Parameter parameter = null;
                for(int i=0; i<size; i++) {
                    argument = arguments.getArgument(i);
                    argumentName = argument.getName();
View Full Code Here

Examples of com.sun.grizzly.util.http.Parameters

        /* SJSAS 4936855
        requestParametersParsed = true;
         */

        Parameters parameters = coyoteRequest.getParameters();

        // getCharacterEncoding() may have been overridden to search for
        // hidden form field containing request encoding
        String enc = getCharacterEncoding();
        // START SJSAS 4936855
        // Delay updating requestParametersParsed to TRUE until
        // after getCharacterEncoding() has been called, because
        // getCharacterEncoding() may cause setCharacterEncoding() to be
        // called, and the latter will ignore the specified encoding if
        // requestParametersParsed is TRUE
        requestParametersParsed = true;
        // END SJSAS 4936855
        if (enc != null) {
            parameters.setEncoding(enc);
            parameters.setQueryStringEncoding(enc);
        } else {
            parameters.setEncoding(com.sun.grizzly.tcp.Constants.DEFAULT_CHARACTER_ENCODING);
            parameters.setQueryStringEncoding(com.sun.grizzly.tcp.Constants.DEFAULT_CHARACTER_ENCODING);
        }

        parameters.handleQueryParameters();

        if (usingInputStream || usingReader) {
            return;
        }

        if (!getMethod().equalsIgnoreCase("POST")) {
            return;
        }

        String contentType = getContentType();
        if (contentType == null) {
            contentType = "";
        }
        int semicolon = contentType.indexOf(';');
        if (semicolon >= 0) {
            contentType = contentType.substring(0, semicolon).trim();
        } else {
            contentType = contentType.trim();
        }
        if (!("application/x-www-form-urlencoded".equals(contentType))) {
            return;
        }

        int len = getContentLength();

        if (len > 0) {
            int maxPostSize = ((Connector) connector).getMaxPostSize();
            if ((maxPostSize > 0) && (len > maxPostSize)) {
                log(sm.getString("coyoteRequest.postTooLarge"));
                throw new IllegalStateException("Post too large");
            }
            try {
                /* SJSAS 6346738
                byte[] formData = null;
                if (len < CACHED_POST_LEN) {
                if (postData == null)
                postData = new byte[CACHED_POST_LEN];
                formData = postData;
                } else {
                formData = new byte[len];
                }
                int actualLen = readPostBody(formData, len);
                if (actualLen == len) {
                parameters.processParameters(formData, 0, len);
                }
                 */
                // START SJSAS 6346738
                byte[] formData = getPostBody();
                if (formData != null) {
                    parameters.processParameters(formData, 0, len);
                }
                // END SJSAS 6346738
            } catch (Throwable t) {
                ; // Ignore
            }
View Full Code Here

Examples of com.volantis.map.common.param.Parameters

            w.write("<html><head>");
            w.write(descriptor.getExternalID()+"\n");
            w.write("</head><body>");
            w.write("<p>" + descriptor.getResourceType() +"</p>");
            w.write("---- parameters ----");
            Parameters p = descriptor.getInputParameters();
            Iterator it = p.getParameterNames();
            while (it.hasNext()) {
                String name = (String) it.next();
                w.write("<p>");
                w.write(name);
                w.write("=");
                w.write(p.getParameterValue(name));
                w.write("\n</p>");
            }
            w.write("</body></html>");
            result = Result.SUCCESS;
        }
View Full Code Here

Examples of com.volantis.synergetics.descriptorstore.Parameters

     * Internal method for processing a single request.
     *
     * @param agentRequest The request to process.
     */
    private void processRequest(AgentRequest agentRequest) {
        Parameters inputParameters = descriptorStore.createParameters();
        ParameterNames outputParameters = descriptorStore.createParameterNames();

        final Request request = agentRequest.getRequest();
        final com.volantis.map.common.param.Parameters inputParams =
            request.getInputParams();
        final Iterator requestInputParams = inputParams.getParameterNames();
        try {
            while (requestInputParams.hasNext()) {
                String paramName = (String) requestInputParams.next();
                inputParameters.setParameterValue(
                    paramName, inputParams.getParameterValue(paramName));
            }
        } catch (MissingParameterException e) {
            // this is not expected as we iterate through the parameter names
            throw new UndeclaredThrowableException(e);
View Full Code Here

Examples of dk.brics.jwig.analysis.Parameters

     * @param filter
     *            as the filter to check.
     */
    private void checkFilterParameters(PredecessorResolver predecessorResolver,
            FilterState filter) {
        Parameters filterParameters = resolver
                .getParameters(filter.getMethod());
        Set<Transition> predecessors = predecessorResolver
                .getPredecessors(filter);
        for (Transition transition : predecessors) {
            State origin = transition.getOrigin();
            final SootMethod webMethod = origin.getMethod();
            final Parameters webMethodParameters = resolver
                    .getParameters(webMethod);
            checkFilterParameters(webMethod, webMethodParameters,
                    filterParameters);
        }
    }
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.