Examples of PathParam


Examples of javax.ws.rs.PathParam

        boolean isEncoded = AnnotationUtils.getAnnotation(anns, Encoded.class) != null;
        String dValue = AnnotationUtils.getDefaultParameterValue(anns);
       
        Parameter p = null;
       
        PathParam a = AnnotationUtils.getAnnotation(anns, PathParam.class);
        if (a != null) {
            p = new Parameter(ParameterType.PATH, index, a.value(), isEncoded, dValue);
        }
        if (p == null) {
            QueryParam q = AnnotationUtils.getAnnotation(anns, QueryParam.class);
            if (q != null) {
                p = new Parameter(ParameterType.QUERY, index, q.value(), isEncoded, dValue);
View Full Code Here

Examples of javax.ws.rs.PathParam

        boolean isEncoded = AnnotationUtils.getAnnotation(anns, Encoded.class) != null;
        String dValue = AnnotationUtils.getDefaultParameterValue(anns);
       
        Parameter p = null;
       
        PathParam a = AnnotationUtils.getAnnotation(anns, PathParam.class);
        if (a != null) {
            p = new Parameter(ParameterType.PATH, index, a.value(), isEncoded, dValue);
        }
        if (p == null) {
            QueryParam q = AnnotationUtils.getAnnotation(anns, QueryParam.class);
            if (q != null) {
                p = new Parameter(ParameterType.QUERY, index, q.value(), isEncoded, dValue);
View Full Code Here

Examples of javax.ws.rs.PathParam

            return new Parameter(ParameterType.BEAN, index, null, isEncoded, null);
        }
       
        String dValue = AnnotationUtils.getDefaultParameterValue(anns);
       
        PathParam a = AnnotationUtils.getAnnotation(anns, PathParam.class);
        if (a != null) {
            return new Parameter(ParameterType.PATH, index, a.value(), isEncoded, dValue);
        }
        QueryParam q = AnnotationUtils.getAnnotation(anns, QueryParam.class);
        if (q != null) {
            return new Parameter(ParameterType.QUERY, index, q.value(), isEncoded, dValue);
        }
View Full Code Here

Examples of javax.ws.rs.PathParam

            return new Parameter(ParameterType.BEAN, index, null, isEncoded, null);
        }
       
        String dValue = AnnotationUtils.getDefaultParameterValue(anns);
       
        PathParam a = AnnotationUtils.getAnnotation(anns, PathParam.class);
        if (a != null) {
            return new Parameter(ParameterType.PATH, index, a.value(), isEncoded, dValue);
        }
        QueryParam q = AnnotationUtils.getAnnotation(anns, QueryParam.class);
        if (q != null) {
            return new Parameter(ParameterType.QUERY, index, q.value(), isEncoded, dValue);
        }
View Full Code Here

Examples of javax.ws.rs.PathParam

        Context ctx = AnnotationUtils.getAnnotation(anns, Context.class);
        if (ctx != null) {
            reportInvalidResourceMethod(ori.getMethodToInvoke(), "NO_CONTEXT_PARAMETERS");
        }
       
        PathParam a = AnnotationUtils.getAnnotation(anns, PathParam.class);
        if (a != null) {
            return new Parameter(ParameterType.PATH, index, a.value());
        }
       
        QueryParam q = AnnotationUtils.getAnnotation(anns, QueryParam.class);
        if (q != null) {
            return new Parameter(ParameterType.QUERY, index, q.value());
View Full Code Here

Examples of javax.ws.rs.PathParam

        boolean isEncoded = AnnotationUtils.getAnnotation(anns, Encoded.class) != null;
        String dValue = AnnotationUtils.getDefaultParameterValue(anns);
       
        Parameter p = null;
       
        PathParam a = AnnotationUtils.getAnnotation(anns, PathParam.class);
        if (a != null) {
            p = new Parameter(ParameterType.PATH, index, a.value(), isEncoded, dValue);
        }
        if (p == null) {
            QueryParam q = AnnotationUtils.getAnnotation(anns, QueryParam.class);
            if (q != null) {
                p = new Parameter(ParameterType.QUERY, index, q.value(), isEncoded, dValue);
View Full Code Here

Examples of javax.ws.rs.PathParam

        boolean isEncoded = AnnotationUtils.isEncoded(anns, ori);
        String defaultValue = AnnotationUtils.getDefaultParameterValue(anns, ori);
       
        Object result = null;
       
        PathParam pathParam = AnnotationUtils.getAnnotation(anns, PathParam.class);
        if (pathParam != null) {
            result = readFromUriParam(message, pathParam, parameterClass, genericParam,
                                      values, defaultValue, !isEncoded);
        }
       
View Full Code Here

Examples of org.atmosphere.config.service.PathParam

    protected void injectPathParams(Object o, Map<String, String> annotatedPathVars){
        /* now look for appropriate annotations and fill the variables accordingly */
        for (Field field : o.getClass().getDeclaredFields()) {
            if (field.isAnnotationPresent(PathParam.class)) {
                PathParam annotation = field.getAnnotation(PathParam.class);
                String name = annotation.value();
                if (name.isEmpty()) {
                    name = field.getName();
                }
                if (annotatedPathVars.containsKey(name)) {
                    try {
View Full Code Here

Examples of org.cruxframework.crux.core.shared.rest.annotation.PathParam

      defaultVal = defaultValue.value();
    }

    QueryParam query;
    HeaderParam header;
    PathParam uriParam;
    CookieParam cookie;
    FormParam formParam;

    if ((query = ClassUtils.findAnnotation(annotations, QueryParam.class)) != null)
    {
      return createParameterExtractorForSimpleType(RestParameterType.query, injectTargetClass, type, query.value(), defaultVal);
    }
    else if ((header = ClassUtils.findAnnotation(annotations, HeaderParam.class)) != null)
    {
      return createParameterExtractorForSimpleType(RestParameterType.header, injectTargetClass, type, header.value(), defaultVal);
    }
    else if ((formParam = ClassUtils.findAnnotation(annotations, FormParam.class)) != null)
    {
      return createParameterExtractorForSimpleType(RestParameterType.form, injectTargetClass, type, formParam.value(), defaultVal);
    }
    else if ((cookie = ClassUtils.findAnnotation(annotations, CookieParam.class)) != null)
    {
      return createParameterExtractorForSimpleType(RestParameterType.cookie, injectTargetClass, type, cookie.value(), defaultVal);
    }
    else if ((uriParam = ClassUtils.findAnnotation(annotations, PathParam.class)) != null)
    {
      return createParameterExtractorForSimpleType(RestParameterType.path, injectTargetClass, type, uriParam.value(), defaultVal);
    }
    else
    {
      return createParameterExtractorForSimpleType(RestParameterType.body, injectTargetClass, type, null, null);
    }
View Full Code Here

Examples of org.cruxframework.crux.core.shared.rest.annotation.PathParam

   */
  protected static ValueInjector createParameterExtractorForComplexType(Class<?> injectTargetClass, Type type, Annotation[] annotations)
  {
    QueryParam query;
    HeaderParam header;
    PathParam uriParam;
    CookieParam cookie;
    FormParam formParam;

    if ((query = ClassUtils.findAnnotation(annotations, QueryParam.class)) != null)
    {
      return new GroupValueInjector(RestParameterType.query, type, query.value());
    }
    else if ((header = ClassUtils.findAnnotation(annotations, HeaderParam.class)) != null)
    {
      return new GroupValueInjector(RestParameterType.header, type, header.value());
    }
    else if ((formParam = ClassUtils.findAnnotation(annotations, FormParam.class)) != null)
    {
      return new GroupValueInjector(RestParameterType.form, type, formParam.value());
    }
    else if ((cookie = ClassUtils.findAnnotation(annotations, CookieParam.class)) != null)
    {
      return new GroupValueInjector(RestParameterType.cookie, type, cookie.value());
    }
    else if ((uriParam = ClassUtils.findAnnotation(annotations, PathParam.class)) != null)
    {
      return new GroupValueInjector(RestParameterType.path, type, uriParam.value());
    }
    else
    {
      return new MessageBodyParamInjector(injectTargetClass, type);
    }
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.