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