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.springboot;
018
019import org.apache.juneau.examples.rest.*;
020import org.apache.juneau.examples.rest.dto.*;
021import org.apache.juneau.html.annotation.*;
022import org.apache.juneau.microservice.resources.*;
023import org.apache.juneau.rest.annotation.*;
024import org.apache.juneau.rest.springboot.*;
025import org.apache.juneau.rest.widget.*;
026import org.apache.juneau.serializer.annotation.*;
027
028/**
029 * Sample REST resource showing how to implement a "router" resource page.
030 *
031 * <h5 class='section'>See Also:</h5><ul>
032 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauRestServerSpringbootBasics">juneau-rest-server-springboot Basics</a>
033
034 * </ul>
035 *
036 * @serial exclude
037 */
038@Rest(
039   title="Root resources",
040   description="Example of a router resource page.",
041   children={
042      HelloWorldResource.class,
043      DtoExamples.class,
044      UtilityBeansResource.class,
045      HtmlBeansResource.class,
046      ConfigResource.class,
047      ShutdownResource.class
048   }
049)
050@HtmlDocConfig(
051   widgets={
052      ContentTypeMenuItem.class
053   },
054   navlinks={
055      "api: servlet:/api",
056      "stats: servlet:/stats",
057      "$W{ContentTypeMenuItem}",
058      "source: $C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"
059   },
060   aside={
061      "<div class='text'>",
062      "  <p>This is an example of a 'router' page that serves as a jumping-off point to child resources.</p>",
063      "  <p>Resources can be nested arbitrarily deep through router pages.</p>",
064      "  <p>Note the <span class='link'>API</span> link provided that lets you see the generated swagger doc for this page.</p>",
065      "  <p>Also note the <span class='link'>STATS</span> link that provides basic usage statistics.</p>",
066      "  <p>Also note the <span class='link'>SOURCE</span> link on these pages to view the source code for the page.</p>",
067      "  <p>All content on pages in the UI are serialized POJOs.  In this case, it's a serialized array of beans with 2 properties, 'name' and 'description'.</p>",
068      "  <p>Other features (such as this aside) are added through annotations.</p>",
069      "</div>"
070   },
071   asideFloat="RIGHT"
072)
073@SerializerConfig(
074   // For testing purposes, we want to use single quotes in all the serializers so it's easier to do simple
075   // String comparisons.
076   // You can apply any of the Serializer/Parser/BeanContext settings this way.
077   quoteChar="'"
078)
079public class RootResources extends BasicSpringRestServletGroup {
080   private static final long serialVersionUID = 1L;
081}