1 /* 2 * The contents of this file are subject to the terms of the Common Development and 3 * Distribution License (the License). You may not use this file except in compliance with the 4 * License. 5 * 6 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 7 * specific language governing permission and limitations under the License. 8 * 9 * When distributing Covered Software, include this CDDL Header Notice in each file and include 10 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 11 * Header, with the fields enclosed by brackets [] replaced by your own identifying 12 * information: "Portions copyright [year] [name of copyright owner]". 13 * 14 * Copyright 2016 ForgeRock AS. 15 */ 16 17 package org.forgerock.api.annotations; 18 19 /** 20 * Details of a handler. 21 */ 22 public @interface Handler { 23 /** 24 * The service identifier. 25 * <br> 26 * If a value is provided this indicates to the API Descriptor framework that you intend to reuse 27 * the same service definition multiple times, and that it should define the service globally 28 * and bind it to paths by reference instead of by value. 29 * <br> 30 * Example: 31 * 32 * <code> 33 * <pre> 34 * "services": { 35 * "users:1.0": { 36 * "type": "collection", 37 * "resourceSchema": { 38 * "$ref": "#/definitions/user" 39 * }, 40 * ... 41 * } 42 * } 43 * "paths": { 44 * "/users": { 45 * "1.0": { 46 * "$ref": "#/services/users:1.0" 47 * }, 48 * } 49 * } 50 * </pre> 51 * </code> 52 */ 53 String id() default ""; 54 55 /** 56 * The schema for all the standard resource operations (CRUDPQ) on this endpoint. Only required if one or more 57 * of those operations are supported. 58 */ 59 Schema resourceSchema() default @Schema; 60 61 /** Whether MVCC style requests are supported. */ 62 boolean mvccSupported(); 63 64 /** Service title, for documentation purposes. */ 65 String title() default ""; 66 67 /** Service description, for documentation purposes. */ 68 String description() default ""; 69 70 /** Parameters on service paths and/or endpoints. */ 71 Parameter[] parameters() default {}; 72 }