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