Examples of HeaderParam


Examples of br.com.caelum.vraptor.HeaderParam

  }

  private void addHeaderParametersToAttribute() {
    for (ValuedParameter param : methodInfo.getValuedParameters()) {
      if (param.getParameter().isAnnotationPresent(HeaderParam.class)) {
        HeaderParam headerParam = param.getParameter().getAnnotation(HeaderParam.class);
        String value = request.getHeader(headerParam.value());
        request.setParameter(param.getName(), value);
      }
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.HeaderParam

    }
  }

  private void addHeaderParametersToAttribute(ControllerMethod controllerMethod) {
    for (Parameter param : parameterNameProvider.parametersFor(controllerMethod.getMethod())) {
      HeaderParam headerParam = param.getAnnotation(HeaderParam.class);
      if (headerParam != null) {
        String value = request.getHeader(headerParam.value());
        request.setParameter(param.getName(), value);
      }
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.HeaderParam

        Annotation[][] annotations = trueMethod.getParameterAnnotations()
        for (int i = 0; i < annotations.length; i++) { 
            for (Annotation annotation : annotations[i]) { 
                if (annotation instanceof HeaderParam) { 
                    HeaderParam headerParam = (HeaderParam) annotation; 
                    String value = request.getHeader(headerParam.value())
                    request.setAttribute(parameters[i], value)
               
            } 
        } 
   
View Full Code Here

Examples of br.com.caelum.vraptor.HeaderParam

    Annotation[][] annotations = trueMethod.getParameterAnnotations();
    for (int i = 0; i < annotations.length; i++) {
      for (Annotation annotation : annotations[i]) {
        if (annotation instanceof HeaderParam) {
          HeaderParam headerParam = (HeaderParam) annotation;
          String value = request.getHeader(headerParam.value());
          request.setAttribute(parameters[i], value);
        }
      }
    }
View Full Code Here

Examples of com.cloud.bridge.util.HeaderParam

        Enumeration headers = request.getHeaderNames();
        if (null != headers)
        {
            while( headers.hasMoreElements())
            {
                HeaderParam oneHeader = new HeaderParam();
                String headerName = (String)headers.nextElement();
                oneHeader.setName( headerName );
                oneHeader.setValue( request.getHeader( headerName ));
                params.addHeader( oneHeader );
            }
        }
        return params;
    }
View Full Code Here

Examples of com.cloud.bridge.util.HeaderParam

        // -> authenticated calls
        try {
            // S3AuthParams params = extractRequestHeaders( request );
            S3AuthParams params = new S3AuthParams();
            HeaderParam headerParam1 = new HeaderParam("accessKey", accessKeyString);
            params.addHeader(headerParam1);
            HeaderParam headerParam2 = new HeaderParam("secretKey", signatureString);
            params.addHeader(headerParam2);
            authenticateRequest( request, params );
        }
        catch (Exception e)
        { logger.warn("Authentication details insufficient"); }
View Full Code Here

Examples of com.cloud.bridge.util.HeaderParam

                        countMeta++;
                        metaName = null;
                    }

                    // -> build up the headers so we can do authentication on this POST
                    HeaderParam oneHeader = new HeaderParam();
                    oneHeader.setName( name );
                    oneHeader.setValue( value );
                    params.addHeader( oneHeader );
                }
                state = 1;
            }
            else if (1 == state && 0 == oneLine.length())
View Full Code Here

Examples of com.cloud.bridge.util.HeaderParam

  {
    // ToDO - make this look up faster
    ListIterator it = headerList.listIterator();
    while( it.hasNext())
    {
      HeaderParam temp = (HeaderParam)it.next();
      if (header.equalsIgnoreCase( temp.getName())) {
        return temp.getValue();
      }
    }
    return null;
  }
View Full Code Here

Examples of com.cloud.bridge.util.HeaderParam

                        countMeta++;
                        metaName = null;
                    }

                    // -> build up the headers so we can do authentication on this POST
                    HeaderParam oneHeader = new HeaderParam();
                    oneHeader.setName(name);
                    oneHeader.setValue(value);
                    params.addHeader(oneHeader);
                }
                state = 1;
            } else if (1 == state && 0 == oneLine.length()) {
                // -> data of a body part starts here
View Full Code Here

Examples of com.cloud.bridge.util.HeaderParam

    public String getHeader(String header) {
        // ToDO - make this look up faster
        ListIterator it = headerList.listIterator();
        while (it.hasNext()) {
            HeaderParam temp = (HeaderParam)it.next();
            if (header.equalsIgnoreCase(temp.getName())) {
                return temp.getValue();
            }
        }
        return 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.