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 * <h5 class='section'>See Also:</h5> 033 * <ul> 034 * <li class='link'>{@doc juneau-rest-server-jaxrs} 035 * </ul> 036 */ 037@Provider 038@Produces({ 039 "application/json", "text/json", // JsonSerializer 040 "application/json+simple", "text/json+simple", // JsonSerializer.Simple 041 "application/json+schema", // JsonSchemaSerializer 042 "text/xml", // XmlDocSerializer.Ns 043 "text/xml+simple", // XmlDocSerializer 044 "text/xml+schema", // XmlSchemaDocSerializer 045 "text/html", // HtmlDocSerializer 046 "application/x-www-form-urlencoded", // UrlEncodingSerializer 047 "text/xml+soap", // SoapXmlSerializer 048 "application/x-java-serialized-object" // JavaSerializedObjectSerializer 049}) 050@Consumes({ 051 "application/json", "text/json", // JsonParser 052 "text/xml", // XmlParser 053 "text/html", // HtmlParser 054 "application/x-www-form-urlencoded", // UrlEncodingParser 055 "application/x-java-serialized-object" // JavaSerializedObjectParser 056}) 057@JuneauProvider( 058 serializers={ 059 JsonSerializer.class, 060 SimpleJsonSerializer.class, 061 JsonSchemaSerializer.class, 062 XmlDocSerializer.Ns.class, 063 XmlDocSerializer.class, 064 XmlSchemaDocSerializer.class, 065 HtmlDocSerializer.class, 066 UrlEncodingSerializer.class, 067 SoapXmlSerializer.class, 068 HtmlSerializer.class, 069 UonSerializer.class, 070 JsoSerializer.class 071 }, 072 parsers={ 073 JsonParser.class, 074 XmlParser.class, 075 HtmlParser.class, 076 UonParser.class, 077 UrlEncodingParser.class, 078 } 079) 080public final class BasicProvider extends BaseProvider {} 081