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.examples.rest.dto;
014
015import org.apache.juneau.html.annotation.*;
016import org.apache.juneau.rest.annotation.*;
017import org.apache.juneau.rest.servlet.*;
018import org.apache.juneau.rest.widget.*;
019import org.apache.juneau.serializer.annotation.*;
020
021/**
022 * Sample REST resource showing how to implement a nested "router" resource page.
023 *
024 * <h5 class='section'>See Also:</h5><ul>
025
026 * </ul>
027 *
028 * @serial exclude
029 */
030@Rest(
031   path="/dto",
032   title="DTO examples",
033   description="Example serialization of predefined Data Transfer Objects.",
034   children={
035      AtomFeedResource.class,
036      JsonSchemaResource.class
037   }
038)
039@HtmlDocConfig(
040   widgets={
041      ContentTypeMenuItem.class
042   },
043   navlinks={
044      "up: request:/..",
045      "api: servlet:/api",
046      "$W{ContentTypeMenuItem}",
047      "source: $C{Source/gitHub}/org/apache/juneau/examples/rest/dto/DtoExamples.java"
048   },
049   aside={
050      "<div style='max-width:400px' class='text'>",
051      "  <p>This is an example of a nested 'router' page that serves as a jumping-off point to other child resources.</p>",
052      "</div>"
053   }
054)
055@SerializerConfig(
056   // For testing purposes, we want to use single quotes in all the serializers so it's easier to do simple
057   // String comparisons.
058   // You can apply any of the Serializer/Parser/BeanContext settings this way.
059   quoteChar="'"
060)
061public class DtoExamples extends BasicRestServletGroup {
062   private static final long serialVersionUID = 1L;
063}