Search in sources :

Example 1 with FormParam

use of javax.ws.rs.FormParam in project jersey by jersey.

the class WebResourceFactory method invoke.

@Override
@SuppressWarnings("unchecked")
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
    if (args == null && method.getName().equals("toString")) {
        return toString();
    }
    if (args == null && method.getName().equals("hashCode")) {
        //unique instance in the JVM, and no need to override
        return hashCode();
    }
    if (args != null && args.length == 1 && method.getName().equals("equals")) {
        //unique instance in the JVM, and no need to override
        return equals(args[0]);
    }
    // get the interface describing the resource
    final Class<?> proxyIfc = proxy.getClass().getInterfaces()[0];
    // response type
    final Class<?> responseType = method.getReturnType();
    // determine method name
    String httpMethod = getHttpMethodName(method);
    if (httpMethod == null) {
        for (final Annotation ann : method.getAnnotations()) {
            httpMethod = getHttpMethodName(ann.annotationType());
            if (httpMethod != null) {
                break;
            }
        }
    }
    // create a new UriBuilder appending the @Path attached to the method
    WebTarget newTarget = addPathFromAnnotation(method, target);
    if (httpMethod == null) {
        if (newTarget == target) {
            // no path annotation on the method -> fail
            throw new UnsupportedOperationException("Not a resource method.");
        } else if (!responseType.isInterface()) {
            // not interface - can't help here
            throw new UnsupportedOperationException("Return type not an interface");
        }
    }
    // process method params (build maps of (Path|Form|Cookie|Matrix|Header..)Params
    // and extract entity type
    final MultivaluedHashMap<String, Object> headers = new MultivaluedHashMap<String, Object>(this.headers);
    final LinkedList<Cookie> cookies = new LinkedList<>(this.cookies);
    final Form form = new Form();
    form.asMap().putAll(this.form.asMap());
    final Annotation[][] paramAnns = method.getParameterAnnotations();
    Object entity = null;
    Type entityType = null;
    for (int i = 0; i < paramAnns.length; i++) {
        final Map<Class, Annotation> anns = new HashMap<>();
        for (final Annotation ann : paramAnns[i]) {
            anns.put(ann.annotationType(), ann);
        }
        Annotation ann;
        Object value = args[i];
        if (!hasAnyParamAnnotation(anns)) {
            entityType = method.getGenericParameterTypes()[i];
            entity = value;
        } else {
            if (value == null && (ann = anns.get(DefaultValue.class)) != null) {
                value = ((DefaultValue) ann).value();
            }
            if (value != null) {
                if ((ann = anns.get(PathParam.class)) != null) {
                    newTarget = newTarget.resolveTemplate(((PathParam) ann).value(), value);
                } else if ((ann = anns.get((QueryParam.class))) != null) {
                    if (value instanceof Collection) {
                        newTarget = newTarget.queryParam(((QueryParam) ann).value(), convert((Collection) value));
                    } else {
                        newTarget = newTarget.queryParam(((QueryParam) ann).value(), value);
                    }
                } else if ((ann = anns.get((HeaderParam.class))) != null) {
                    if (value instanceof Collection) {
                        headers.addAll(((HeaderParam) ann).value(), convert((Collection) value));
                    } else {
                        headers.addAll(((HeaderParam) ann).value(), value);
                    }
                } else if ((ann = anns.get((CookieParam.class))) != null) {
                    final String name = ((CookieParam) ann).value();
                    Cookie c;
                    if (value instanceof Collection) {
                        for (final Object v : ((Collection) value)) {
                            if (!(v instanceof Cookie)) {
                                c = new Cookie(name, v.toString());
                            } else {
                                c = (Cookie) v;
                                if (!name.equals(((Cookie) v).getName())) {
                                    // is this the right thing to do? or should I fail? or ignore the difference?
                                    c = new Cookie(name, c.getValue(), c.getPath(), c.getDomain(), c.getVersion());
                                }
                            }
                            cookies.add(c);
                        }
                    } else {
                        if (!(value instanceof Cookie)) {
                            cookies.add(new Cookie(name, value.toString()));
                        } else {
                            c = (Cookie) value;
                            if (!name.equals(((Cookie) value).getName())) {
                                // is this the right thing to do? or should I fail? or ignore the difference?
                                cookies.add(new Cookie(name, c.getValue(), c.getPath(), c.getDomain(), c.getVersion()));
                            }
                        }
                    }
                } else if ((ann = anns.get((MatrixParam.class))) != null) {
                    if (value instanceof Collection) {
                        newTarget = newTarget.matrixParam(((MatrixParam) ann).value(), convert((Collection) value));
                    } else {
                        newTarget = newTarget.matrixParam(((MatrixParam) ann).value(), value);
                    }
                } else if ((ann = anns.get((FormParam.class))) != null) {
                    if (value instanceof Collection) {
                        for (final Object v : ((Collection) value)) {
                            form.param(((FormParam) ann).value(), v.toString());
                        }
                    } else {
                        form.param(((FormParam) ann).value(), value.toString());
                    }
                }
            }
        }
    }
    if (httpMethod == null) {
        // the method is a subresource locator
        return WebResourceFactory.newResource(responseType, newTarget, true, headers, cookies, form);
    }
    // accepted media types
    Produces produces = method.getAnnotation(Produces.class);
    if (produces == null) {
        produces = proxyIfc.getAnnotation(Produces.class);
    }
    final String[] accepts = (produces == null) ? EMPTY : produces.value();
    // determine content type
    String contentType = null;
    if (entity != null) {
        final List<Object> contentTypeEntries = headers.get(HttpHeaders.CONTENT_TYPE);
        if ((contentTypeEntries != null) && (!contentTypeEntries.isEmpty())) {
            contentType = contentTypeEntries.get(0).toString();
        } else {
            Consumes consumes = method.getAnnotation(Consumes.class);
            if (consumes == null) {
                consumes = proxyIfc.getAnnotation(Consumes.class);
            }
            if (consumes != null && consumes.value().length > 0) {
                contentType = consumes.value()[0];
            }
        }
    }
    Invocation.Builder builder = newTarget.request().headers(// this resets all headers so do this first
    headers).accept(// if @Produces is defined, propagate values into Accept header; empty array is NO-OP
    accepts);
    for (final Cookie c : cookies) {
        builder = builder.cookie(c);
    }
    final Object result;
    if (entity == null && !form.asMap().isEmpty()) {
        entity = form;
        contentType = MediaType.APPLICATION_FORM_URLENCODED;
    } else {
        if (contentType == null) {
            contentType = MediaType.APPLICATION_OCTET_STREAM;
        }
        if (!form.asMap().isEmpty()) {
            if (entity instanceof Form) {
                ((Form) entity).asMap().putAll(form.asMap());
            } else {
            // TODO: should at least log some warning here
            }
        }
    }
    final GenericType responseGenericType = new GenericType(method.getGenericReturnType());
    if (entity != null) {
        if (entityType instanceof ParameterizedType) {
            entity = new GenericEntity(entity, entityType);
        }
        result = builder.method(httpMethod, Entity.entity(entity, contentType), responseGenericType);
    } else {
        result = builder.method(httpMethod, responseGenericType);
    }
    return result;
}
Also used : MatrixParam(javax.ws.rs.MatrixParam) Invocation(javax.ws.rs.client.Invocation) Form(javax.ws.rs.core.Form) HashMap(java.util.HashMap) MultivaluedHashMap(javax.ws.rs.core.MultivaluedHashMap) MultivaluedHashMap(javax.ws.rs.core.MultivaluedHashMap) ParameterizedType(java.lang.reflect.ParameterizedType) Consumes(javax.ws.rs.Consumes) PathParam(javax.ws.rs.PathParam) Cookie(javax.ws.rs.core.Cookie) GenericType(javax.ws.rs.core.GenericType) Annotation(java.lang.annotation.Annotation) LinkedList(java.util.LinkedList) CookieParam(javax.ws.rs.CookieParam) MediaType(javax.ws.rs.core.MediaType) GenericType(javax.ws.rs.core.GenericType) ParameterizedType(java.lang.reflect.ParameterizedType) Type(java.lang.reflect.Type) QueryParam(javax.ws.rs.QueryParam) Produces(javax.ws.rs.Produces) GenericEntity(javax.ws.rs.core.GenericEntity) Collection(java.util.Collection) WebTarget(javax.ws.rs.client.WebTarget) FormParam(javax.ws.rs.FormParam)

Example 2 with FormParam

use of javax.ws.rs.FormParam in project component-runtime by Talend.

the class ProjectResource method createZip.

@POST
@Path("zip/form")
@Produces("application/zip")
public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) {
    final MessageBodyReader<ProjectModel> jsonReader = providers.getMessageBodyReader(ProjectModel.class, ProjectModel.class, NO_ANNOTATION, APPLICATION_JSON_TYPE);
    final ProjectModel model;
    try (final InputStream gzipInputStream = new ByteArrayInputStream(Base64.getUrlDecoder().decode(compressedModel))) {
        model = jsonReader.readFrom(ProjectModel.class, ProjectModel.class, NO_ANNOTATION, APPLICATION_JSON_TYPE, new MultivaluedHashMap<>(), gzipInputStream);
    } catch (final IOException e) {
        throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(new ErrorMessage(e.getMessage())).type(APPLICATION_JSON_TYPE).build());
    }
    final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip";
    return Response.ok().entity((StreamingOutput) out -> {
        generator.generate(toRequest(model), out);
        out.flush();
    }).header("Content-Disposition", "inline; filename=" + filename).build();
}
Also used : MultivaluedHashMap(javax.ws.rs.core.MultivaluedHashMap) BufferedInputStream(java.io.BufferedInputStream) Produces(javax.ws.rs.Produces) ErrorMessage(org.talend.sdk.component.starter.server.model.ErrorMessage) Path(javax.ws.rs.Path) GithubProject(org.talend.sdk.component.starter.server.model.GithubProject) Collections.singletonList(java.util.Collections.singletonList) MediaType(javax.ws.rs.core.MediaType) Collectors.toMap(java.util.stream.Collectors.toMap) ByteArrayInputStream(java.io.ByteArrayInputStream) Consumes(javax.ws.rs.Consumes) Locale(java.util.Locale) Map(java.util.Map) ENGLISH(java.util.Locale.ENGLISH) ZipEntry(java.util.zip.ZipEntry) ProjectGenerator(org.talend.sdk.component.starter.server.service.ProjectGenerator) Context(javax.ws.rs.core.Context) Providers(javax.ws.rs.ext.Providers) GitAPIException(org.eclipse.jgit.api.errors.GitAPIException) Collections.emptyList(java.util.Collections.emptyList) StandardOpenOption(java.nio.file.StandardOpenOption) StreamingOutput(javax.ws.rs.core.StreamingOutput) NullProgressMonitor(org.eclipse.jgit.lib.NullProgressMonitor) Collectors.joining(java.util.stream.Collectors.joining) StandardCharsets(java.nio.charset.StandardCharsets) Base64(java.util.Base64) List(java.util.List) FileUtils(org.eclipse.jgit.util.FileUtils) Slf4j(lombok.extern.slf4j.Slf4j) Response(javax.ws.rs.core.Response) Writer(java.io.Writer) Annotation(java.lang.annotation.Annotation) PostConstruct(javax.annotation.PostConstruct) WebApplicationException(javax.ws.rs.WebApplicationException) ProjectModel(org.talend.sdk.component.starter.server.model.ProjectModel) ApplicationScoped(javax.enterprise.context.ApplicationScoped) CreateProjectRequest(org.talend.sdk.component.starter.server.model.github.CreateProjectRequest) ZipInputStream(java.util.zip.ZipInputStream) ByteArrayOutputStream(java.io.ByteArrayOutputStream) UsernamePasswordCredentialsProvider(org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider) GET(javax.ws.rs.GET) Client(javax.ws.rs.client.Client) Entity.entity(javax.ws.rs.client.Entity.entity) StandardCopyOption(java.nio.file.StandardCopyOption) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ClientBuilder(javax.ws.rs.client.ClientBuilder) StarterConfiguration(org.talend.sdk.component.starter.server.configuration.StarterConfiguration) FactoryConfiguration(org.talend.sdk.component.starter.server.model.FactoryConfiguration) Collections.emptyMap(java.util.Collections.emptyMap) FormParam(javax.ws.rs.FormParam) POST(javax.ws.rs.POST) Files(java.nio.file.Files) Optional.ofNullable(java.util.Optional.ofNullable) FileWriter(java.io.FileWriter) IOException(java.io.IOException) InputStreamReader(java.io.InputStreamReader) MultivaluedHashMap(javax.ws.rs.core.MultivaluedHashMap) File(java.io.File) CreateProjectResponse(org.talend.sdk.component.starter.server.model.github.CreateProjectResponse) TimeUnit(java.util.concurrent.TimeUnit) Result(org.talend.sdk.component.starter.server.model.Result) Collectors.toList(java.util.stream.Collectors.toList) TreeMap(java.util.TreeMap) APPLICATION_JSON_TYPE(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) BufferedReader(java.io.BufferedReader) Git(org.eclipse.jgit.api.Git) Comparator(java.util.Comparator) ProjectRequest(org.talend.sdk.component.starter.server.service.domain.ProjectRequest) InputStream(java.io.InputStream) MessageBodyReader(javax.ws.rs.ext.MessageBodyReader) WebApplicationException(javax.ws.rs.WebApplicationException) ByteArrayInputStream(java.io.ByteArrayInputStream) BufferedInputStream(java.io.BufferedInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) ZipInputStream(java.util.zip.ZipInputStream) InputStream(java.io.InputStream) IOException(java.io.IOException) ProjectModel(org.talend.sdk.component.starter.server.model.ProjectModel) ErrorMessage(org.talend.sdk.component.starter.server.model.ErrorMessage) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST) Produces(javax.ws.rs.Produces)

Example 3 with FormParam

use of javax.ws.rs.FormParam in project wildfly by wildfly.

the class DeploymentRestResourcesDefintion method addMethodParameters.

private void addMethodParameters(JaxrsResourceMethodDescription jaxrsRes, Method method) {
    for (Parameter param : method.getParameters()) {
        ParamInfo paramInfo = new ParamInfo();
        paramInfo.cls = param.getType();
        paramInfo.defaultValue = null;
        paramInfo.name = null;
        paramInfo.type = null;
        Annotation annotation;
        if ((annotation = param.getAnnotation(PathParam.class)) != null) {
            PathParam pathParam = (PathParam) annotation;
            paramInfo.name = pathParam.value();
            paramInfo.type = "@" + PathParam.class.getSimpleName();
        } else if ((annotation = param.getAnnotation(QueryParam.class)) != null) {
            QueryParam queryParam = (QueryParam) annotation;
            paramInfo.name = queryParam.value();
            paramInfo.type = "@" + QueryParam.class.getSimpleName();
        } else if ((annotation = param.getAnnotation(HeaderParam.class)) != null) {
            HeaderParam headerParam = (HeaderParam) annotation;
            paramInfo.name = headerParam.value();
            paramInfo.type = "@" + HeaderParam.class.getSimpleName();
        } else if ((annotation = param.getAnnotation(CookieParam.class)) != null) {
            CookieParam cookieParam = (CookieParam) annotation;
            paramInfo.name = cookieParam.value();
            paramInfo.type = "@" + CookieParam.class.getSimpleName();
        } else if ((annotation = param.getAnnotation(MatrixParam.class)) != null) {
            MatrixParam matrixParam = (MatrixParam) annotation;
            paramInfo.name = matrixParam.value();
            paramInfo.type = "@" + MatrixParam.class.getSimpleName();
        } else if ((annotation = param.getAnnotation(FormParam.class)) != null) {
            FormParam formParam = (FormParam) annotation;
            paramInfo.name = formParam.value();
            paramInfo.type = "@" + FormParam.class.getSimpleName();
        }
        if (paramInfo.name == null) {
            paramInfo.name = param.getName();
        }
        if ((annotation = param.getAnnotation(DefaultValue.class)) != null) {
            DefaultValue defaultValue = (DefaultValue) annotation;
            paramInfo.defaultValue = defaultValue.value();
        }
        jaxrsRes.parameters.add(paramInfo);
    }
}
Also used : CookieParam(javax.ws.rs.CookieParam) DefaultValue(javax.ws.rs.DefaultValue) HeaderParam(javax.ws.rs.HeaderParam) MatrixParam(javax.ws.rs.MatrixParam) QueryParam(javax.ws.rs.QueryParam) Parameter(java.lang.reflect.Parameter) PathParam(javax.ws.rs.PathParam) FormParam(javax.ws.rs.FormParam) Annotation(java.lang.annotation.Annotation)

Example 4 with FormParam

use of javax.ws.rs.FormParam in project graylog2-server by Graylog2.

the class Generator method determineParameters.

private List<Parameter> determineParameters(Method method) {
    final List<Parameter> params = Lists.newArrayList();
    int i = 0;
    for (Annotation[] annotations : method.getParameterAnnotations()) {
        final Parameter param = new Parameter();
        Parameter.Kind paramKind = Parameter.Kind.BODY;
        for (Annotation annotation : annotations) {
            if (annotation instanceof ApiParam) {
                final ApiParam apiParam = (ApiParam) annotation;
                final String name = Strings.isNullOrEmpty(apiParam.name()) ? Strings.isNullOrEmpty(apiParam.value()) ? "arg" + i : apiParam.value() : apiParam.name();
                param.setName(name);
                param.setDescription(apiParam.value());
                param.setIsRequired(apiParam.required());
                final TypeSchema parameterSchema = typeSchema(method.getGenericParameterTypes()[i]);
                param.setTypeSchema(parameterSchema);
                if (!isNullOrEmpty(apiParam.defaultValue())) {
                    param.setDefaultValue(apiParam.defaultValue());
                }
            }
            if (annotation instanceof DefaultValue) {
                final DefaultValue defaultValueAnnotation = (DefaultValue) annotation;
                // Only set if empty to make sure ApiParam's defaultValue has precedence!
                if (isNullOrEmpty(param.getDefaultValue()) && !isNullOrEmpty(defaultValueAnnotation.value())) {
                    param.setDefaultValue(defaultValueAnnotation.value());
                }
            }
            if (annotation instanceof QueryParam) {
                paramKind = Parameter.Kind.QUERY;
            } else if (annotation instanceof PathParam) {
                paramKind = Parameter.Kind.PATH;
            } else if (annotation instanceof HeaderParam) {
                paramKind = Parameter.Kind.HEADER;
            } else if (annotation instanceof FormParam) {
                paramKind = Parameter.Kind.FORM;
            }
        }
        param.setKind(paramKind);
        if (param.getTypeSchema() != null) {
            params.add(param);
        }
        i++;
    }
    return params;
}
Also used : HeaderParam(javax.ws.rs.HeaderParam) Annotation(java.lang.annotation.Annotation) DefaultValue(javax.ws.rs.DefaultValue) QueryParam(javax.ws.rs.QueryParam) ApiParam(io.swagger.annotations.ApiParam) PathParam(javax.ws.rs.PathParam) FormParam(javax.ws.rs.FormParam)

Example 5 with FormParam

use of javax.ws.rs.FormParam in project jersey by jersey.

the class ResourceMethodValidator method checkMethod.

private void checkMethod(ResourceMethod method) {
    checkValueProviders(method);
    final Invocable invocable = method.getInvocable();
    checkParameters(method);
    if ("GET".equals(method.getHttpMethod())) {
        final long eventSinkCount = invocable.getParameters().stream().filter(parameter -> SseEventSink.class.equals(parameter.getRawType())).count();
        final boolean isSse = eventSinkCount > 0;
        if (eventSinkCount > 1) {
            Errors.warning(method, LocalizationMessages.MULTIPLE_EVENT_SINK_INJECTION(invocable.getHandlingMethod()));
        }
        // ensure GET returns non-void value if not suspendable
        if (void.class == invocable.getHandlingMethod().getReturnType() && !method.isSuspendDeclared() && !isSse) {
            Errors.hint(method, LocalizationMessages.GET_RETURNS_VOID(invocable.getHandlingMethod()));
        }
        // ensure GET does not consume an entity parameter, if not inflector-based
        if (invocable.requiresEntity() && !invocable.isInflector()) {
            Errors.warning(method, LocalizationMessages.GET_CONSUMES_ENTITY(invocable.getHandlingMethod()));
        }
        // ensure GET does not consume any @FormParam annotated parameter
        for (Parameter p : invocable.getParameters()) {
            if (p.isAnnotationPresent(FormParam.class)) {
                Errors.fatal(method, LocalizationMessages.GET_CONSUMES_FORM_PARAM(invocable.getHandlingMethod()));
                break;
            }
        }
        if (isSse && void.class != invocable.getHandlingMethod().getReturnType()) {
            Errors.fatal(method, LocalizationMessages.EVENT_SINK_RETURNS_TYPE(invocable.getHandlingMethod()));
        }
    }
    // ensure there is not multiple HTTP method designators specified on the method
    List<String> httpMethodAnnotations = new LinkedList<>();
    for (Annotation a : invocable.getHandlingMethod().getDeclaredAnnotations()) {
        if (null != a.annotationType().getAnnotation(HttpMethod.class)) {
            httpMethodAnnotations.add(a.toString());
        }
    }
    if (httpMethodAnnotations.size() > 1) {
        Errors.fatal(method, LocalizationMessages.MULTIPLE_HTTP_METHOD_DESIGNATORS(invocable.getHandlingMethod(), httpMethodAnnotations.toString()));
    }
    final Type responseType = invocable.getResponseType();
    if (!isConcreteType(responseType)) {
        Errors.warning(invocable.getHandlingMethod(), LocalizationMessages.TYPE_OF_METHOD_NOT_RESOLVABLE_TO_CONCRETE_TYPE(responseType, invocable.getHandlingMethod().toGenericString()));
    }
    final Path pathAnnotation = invocable.getHandlingMethod().getAnnotation(Path.class);
    if (pathAnnotation != null) {
        final String path = pathAnnotation.value();
        if (path == null || path.isEmpty() || "/".equals(path)) {
            Errors.warning(invocable.getHandlingMethod(), LocalizationMessages.METHOD_EMPTY_PATH_ANNOTATION(invocable.getHandlingMethod().getName(), invocable.getHandler().getHandlerClass().getName()));
        }
    }
}
Also used : FormParam(javax.ws.rs.FormParam) PathParam(javax.ws.rs.PathParam) LocalizationMessages(org.glassfish.jersey.server.internal.LocalizationMessages) SseEventSink(javax.ws.rs.sse.SseEventSink) Path(javax.ws.rs.Path) Set(java.util.Set) Errors(org.glassfish.jersey.internal.Errors) Supplier(java.util.function.Supplier) InjectionManager(org.glassfish.jersey.internal.inject.InjectionManager) BeanParam(javax.ws.rs.BeanParam) HttpMethod(javax.ws.rs.HttpMethod) HashSet(java.util.HashSet) List(java.util.List) QueryParam(javax.ws.rs.QueryParam) ParameterizedType(java.lang.reflect.ParameterizedType) Type(java.lang.reflect.Type) Annotation(java.lang.annotation.Annotation) MatrixParam(javax.ws.rs.MatrixParam) HeaderParam(javax.ws.rs.HeaderParam) CookieParam(javax.ws.rs.CookieParam) LinkedList(java.util.LinkedList) Method(java.lang.reflect.Method) Collections(java.util.Collections) Path(javax.ws.rs.Path) ParameterizedType(java.lang.reflect.ParameterizedType) Type(java.lang.reflect.Type) LinkedList(java.util.LinkedList) Annotation(java.lang.annotation.Annotation) HttpMethod(javax.ws.rs.HttpMethod)

Aggregations

FormParam (javax.ws.rs.FormParam)8 PathParam (javax.ws.rs.PathParam)7 QueryParam (javax.ws.rs.QueryParam)7 Annotation (java.lang.annotation.Annotation)6 CookieParam (javax.ws.rs.CookieParam)6 HeaderParam (javax.ws.rs.HeaderParam)6 MatrixParam (javax.ws.rs.MatrixParam)5 BeanParam (javax.ws.rs.BeanParam)3 ParameterizedType (java.lang.reflect.ParameterizedType)2 Type (java.lang.reflect.Type)2 ArrayList (java.util.ArrayList)2 LinkedList (java.util.LinkedList)2 List (java.util.List)2 Consumes (javax.ws.rs.Consumes)2 DefaultValue (javax.ws.rs.DefaultValue)2 Encoded (javax.ws.rs.Encoded)2 Produces (javax.ws.rs.Produces)2 Context (javax.ws.rs.core.Context)2 MediaType (javax.ws.rs.core.MediaType)2 MultivaluedHashMap (javax.ws.rs.core.MultivaluedHashMap)2