001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.examples.rest.dto;
018
019import org.apache.juneau.html.annotation.*;
020import org.apache.juneau.rest.annotation.*;
021import org.apache.juneau.rest.servlet.*;
022import org.apache.juneau.rest.widget.*;
023import org.apache.juneau.serializer.annotation.*;
024
025/**
026 * Sample REST resource showing how to implement a nested "router" resource page.
027 *
028 * <h5 class='section'>See Also:</h5><ul>
029
030 * </ul>
031 *
032 * @serial exclude
033 */
034@Rest(
035   path="/dto",
036   title="DTO examples",
037   description="Example serialization of predefined Data Transfer Objects.",
038   children={
039      AtomFeedResource.class,
040      JsonSchemaResource.class
041   }
042)
043@HtmlDocConfig(
044   widgets={
045      ContentTypeMenuItem.class
046   },
047   navlinks={
048      "up: request:/..",
049      "api: servlet:/api",
050      "$W{ContentTypeMenuItem}",
051      "source: $C{Source/gitHub}/org/apache/juneau/examples/rest/dto/DtoExamples.java"
052   },
053   aside={
054      "<div style='max-width:400px' class='text'>",
055      "  <p>This is an example of a nested 'router' page that serves as a jumping-off point to other child resources.</p>",
056      "</div>"
057   }
058)
059@SerializerConfig(
060   // For testing purposes, we want to use single quotes in all the serializers so it's easier to do simple
061   // String comparisons.
062   // You can apply any of the Serializer/Parser/BeanContext settings this way.
063   quoteChar="'"
064)
065public class DtoExamples extends BasicRestServletGroup {
066   private static final long serialVersionUID = 1L;
067}