2 * Copyright (c) 2014, 2015 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.aaa.idm;
11 import java.util.Arrays;
12 import java.util.HashSet;
15 import javax.ws.rs.core.Application;
17 import org.opendaylight.aaa.idm.rest.DomainHandler;
18 import org.opendaylight.aaa.idm.rest.RoleHandler;
19 import org.opendaylight.aaa.idm.rest.UserHandler;
20 import org.opendaylight.aaa.idm.rest.VersionHandler;
23 * A JAX-RS application for IdmLight. The REST endpoints delivered by this
24 * application are in the form:
25 * <code>http://{HOST}:{PORT}/auth/v1/</code>
27 * For example, the users REST endpoint is:
28 * <code>http://{HOST}:{PORT}/auth/v1/users</code>
30 * This application is responsible for interaction with the backing h2
34 * @author Ryan Goulding (ryandgoulding@gmail.com)
35 * @see <code>org.opendaylight.aaa.idm.rest.DomainHandler</code>
36 * @see <code>org.opendaylight.aaa.idm.rest.UserHandler</code>
37 * @see <code>org.opendaylight.aaa.idm.rest.RoleHandler</code>
39 public class IdmLightApplication extends Application {
41 //TODO create a bug to address the fact that the implementation assumes 128
42 // as the max length, even though this claims 256.
44 * The maximum field length for identity fields.
46 public static final int MAX_FIELD_LEN = 256;
47 public IdmLightApplication() {
51 public Set<Class<?>> getClasses() {
52 return new HashSet<Class<?>>(Arrays.asList(VersionHandler.class,