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.urlencoding.*;
024import org.apache.juneau.xml.*;
025
026/**
027 * JAX-RS provider for the same serialize/parse support provided by the {@link BasicRestServlet} class.
028 * 
029 * <h5 class='section'>See Also:</h5>
030 * <ul>
031 *    <li class='link'><a class="doclink" href="../../../../../overview-summary.html#juneau-rest-server-jaxrs">Overview &gt; juneau-rest-server-jaxrs</a>
032 * </ul>
033 */
034@Provider
035@Produces({
036   "application/json", "text/json",                 // JsonSerializer
037   "application/json+simple", "text/json+simple",   // JsonSerializer.Simple
038   "application/json+schema",                       // JsonSchemaSerializer
039   "text/xml",                                      // XmlDocSerializer.Ns
040   "text/xml+simple",                               // XmlDocSerializer
041   "text/xml+schema",                               // XmlSchemaDocSerializer
042   "text/html",                                     // HtmlDocSerializer
043   "application/x-www-form-urlencoded",             // UrlEncodingSerializer
044   "text/xml+soap",                                 // SoapXmlSerializer
045   "application/x-java-serialized-object"           // JavaSerializedObjectSerializer
046})
047@Consumes({
048   "application/json", "text/json",                 // JsonParser
049   "text/xml",                                      // XmlParser
050   "text/html",                                     // HtmlParser
051   "application/x-www-form-urlencoded",             // UrlEncodingParser
052   "application/x-java-serialized-object"           // JavaSerializedObjectParser
053})
054@JuneauProvider(
055   serializers={
056      JsonSerializer.class,
057      JsonSerializer.Simple.class,
058      JsonSchemaSerializer.class,
059      XmlDocSerializer.Ns.class,
060      XmlDocSerializer.class,
061      XmlSchemaDocSerializer.class,
062      HtmlDocSerializer.class,
063      UrlEncodingSerializer.class,
064      SoapXmlSerializer.class,
065      JsoSerializer.class
066   },
067   parsers={
068      JsonParser.class,
069      XmlParser.class,
070      HtmlParser.class,
071      UrlEncodingParser.class,
072   }
073)
074public final class BasicProvider extends BaseProvider {}
075