Package javax.ws.rs

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


        Map<String, Object> cookieParams = new HashMap<String, Object>();

        boolean isEntity = true;
        for (int i = 0; i < method.getParameterTypes().length; i++) {
            Annotation[] annotations = method.getParameterAnnotations()[i];
            PathParam pathParam = getAnnotation(annotations, PathParam.class);
            if (pathParam != null) {
                isEntity = false;
                pathParams.put(pathParam.value(), args[i]);
            }
            MatrixParam matrixParam = getAnnotation(annotations, MatrixParam.class);
            if (matrixParam != null) {
                isEntity = false;
                matrixParams.put(matrixParam.value(), args[i]);
View Full Code Here

        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

        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

      if (paramAnns[j].length > 0) {
        for (Annotation a : paramAnns[j]) {
          if (a != null
              && PathParam.class.isAssignableFrom(a
                  .annotationType())) {
            PathParam rp = (PathParam) a;
            paramNames.add(rp.value());
            paramClasses.add(paramTypes[j]);
            break;
          }
        }
      } else if (ClassUtil.isPojo(paramTypes[j])) {
View Full Code Here

        if (paramAnns[j].length > 0) {
          for (Annotation a : paramAnns[j]) {
            if (a != null
                && PathParam.class.isAssignableFrom(a
                    .annotationType())) {
              PathParam rp = (PathParam) a;
              paramNames.add(rp.value());
              paramClasses.add(paramTypes[j]);
              break;
            }
          }
        } else if (ClassUtil.isPojo(paramTypes[j])) {
View Full Code Here

      if (CascadeDAO.class.isAssignableFrom(paramClass)) {
        params[i] = DAOFactory.getCascadeDAO();
        continue;
      }

      PathParam pathParamAnn = this.getPathParamAnn(anns);
            if (pathParamAnn != null) {
                paramValue = this.getPathParamValue(pathParamAnn.value());
                params[i] = ClassUtil.getParamVal(paramClass, paramValue[0]);
                continue;
            }

      QueryParam queryParamAnn = this.getQueryParamAnn(anns);
View Full Code Here

        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

   }

   private Multimap<String, Object> getPathParamKeyValues(Invocation invocation) {
      Multimap<String, Object> pathParamValues = LinkedHashMultimap.create();
      for (Parameter param : parametersWithAnnotation(invocation.getInvokable(), PathParam.class)) {
         PathParam pathParam = param.getAnnotation(PathParam.class);
         String paramKey = pathParam.value();
         Optional<?> paramValue = getParamValue(invocation, param.getAnnotation(ParamParser.class), param.hashCode(),
               paramKey);
         if (paramValue.isPresent())
            pathParamValues.put(paramKey, paramValue.get().toString());
      }
View Full Code Here

            for (Annotation a : m.getParameterAnnotations()[i]) {
                if (a instanceof Verify) {
                    hasVerify = true;
                }
                else if (a instanceof PathParam) {
                    PathParam p = (PathParam) a;
                    pathName = p.value();
                }
            }

            if (hasVerify && pathName != null) {
                apiCall.verifiedParams.add(pathName);
View Full Code Here

TOP

Related Classes of javax.ws.rs.PathParam

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.