2 * Copyright (c) 2014 Cisco Systems, Inc. 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
8 package org.opendaylight.restconf.nb.rfc8040;
11 import javax.ws.rs.core.Application;
12 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
13 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
14 import org.opendaylight.restconf.nb.rfc8040.databind.DatabindProvider;
15 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonNormalizedNodeBodyWriter;
16 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonPatchStatusBodyWriter;
17 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.XmlNormalizedNodeBodyWriter;
18 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.XmlPatchStatusBodyWriter;
19 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.YangSchemaExportBodyWriter;
20 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.YinSchemaExportBodyWriter;
21 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.errors.RestconfDocumentedExceptionMapper;
22 import org.opendaylight.restconf.nb.rfc8040.rests.services.impl.RestconfImpl;
23 import org.opendaylight.restconf.nb.rfc8040.rests.services.impl.RestconfSchemaServiceImpl;
24 import org.opendaylight.restconf.server.api.RestconfServer;
26 final class RestconfApplication extends Application {
27 private final Set<Object> singletons;
29 RestconfApplication(final DatabindProvider databindProvider, final RestconfServer server,
30 final DOMMountPointService mountPointService, final DOMSchemaService domSchemaService) {
32 new RestconfDocumentedExceptionMapper(databindProvider),
33 new RestconfImpl(server),
34 new RestconfSchemaServiceImpl(domSchemaService, mountPointService));
38 public Set<Class<?>> getClasses() {
40 JsonNormalizedNodeBodyWriter.class, XmlNormalizedNodeBodyWriter.class,
41 YinSchemaExportBodyWriter.class, YangSchemaExportBodyWriter.class,
42 JsonPatchStatusBodyWriter.class, XmlPatchStatusBodyWriter.class);
46 public Set<Object> getSingletons() {