001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.rest.jaxrs; 014 015import javax.ws.rs.*; 016import javax.ws.rs.ext.*; 017 018import org.apache.juneau.html.*; 019import org.apache.juneau.jso.*; 020import org.apache.juneau.json.*; 021import org.apache.juneau.rest.*; 022import org.apache.juneau.soap.*; 023import org.apache.juneau.uon.UonParser; 024import org.apache.juneau.uon.UonSerializer; 025import org.apache.juneau.urlencoding.*; 026import org.apache.juneau.xml.*; 027import org.apache.juneau.xmlschema.XmlSchemaDocSerializer; 028 029/** 030 * JAX-RS provider for the same serialize/parse support provided by the {@link BasicRestServlet} class. 031 * 032 * <ul class='seealso'> 033 * <li class='link'>{@doc juneau-rest-server-jaxrs} 034 * </ul> 035 */ 036@Provider 037@Produces({ 038 "application/json", "text/json", // JsonSerializer 039 "application/json+simple", "text/json+simple", // JsonSerializer.Simple 040 "application/json+schema", // JsonSchemaSerializer 041 "text/xml", // XmlDocSerializer.Ns 042 "text/xml+simple", // XmlDocSerializer 043 "text/xml+schema", // XmlSchemaDocSerializer 044 "text/html", // HtmlDocSerializer 045 "application/x-www-form-urlencoded", // UrlEncodingSerializer 046 "text/xml+soap", // SoapXmlSerializer 047 "application/x-java-serialized-object" // JavaSerializedObjectSerializer 048}) 049@Consumes({ 050 "application/json", "text/json", // JsonParser 051 "text/xml", // XmlParser 052 "text/html", // HtmlParser 053 "application/x-www-form-urlencoded", // UrlEncodingParser 054 "application/x-java-serialized-object" // JavaSerializedObjectParser 055}) 056@JuneauProvider( 057 serializers={ 058 JsonSerializer.class, 059 SimpleJsonSerializer.class, 060 JsonSchemaSerializer.class, 061 XmlDocSerializer.Ns.class, 062 XmlDocSerializer.class, 063 XmlSchemaDocSerializer.class, 064 HtmlDocSerializer.class, 065 UrlEncodingSerializer.class, 066 SoapXmlSerializer.class, 067 HtmlSerializer.class, 068 UonSerializer.class, 069 JsoSerializer.class 070 }, 071 parsers={ 072 JsonParser.class, 073 XmlParser.class, 074 HtmlParser.class, 075 UonParser.class, 076 UrlEncodingParser.class, 077 } 078) 079public final class BasicProvider extends BaseProvider {} 080