Bulk-add copyright headers to java files
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / rest / impl / RestconfApplication.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.sal.rest.impl;
9
10 import java.util.HashSet;
11 import java.util.Set;
12
13 import javax.ws.rs.core.Application;
14
15 import org.opendaylight.controller.sal.restconf.impl.BrokerFacade;
16 import org.opendaylight.controller.sal.restconf.impl.ControllerContext;
17 import org.opendaylight.controller.sal.restconf.impl.RestconfImpl;
18
19 public class RestconfApplication extends Application {
20
21     @Override
22     public Set<Object> getSingletons() {
23         Set<Object> singletons = new HashSet<>();
24         ControllerContext controllerContext = ControllerContext.getInstance();
25         BrokerFacade brokerFacade = BrokerFacade.getInstance();
26         RestconfImpl restconfImpl = RestconfImpl.getInstance();
27         restconfImpl.setBroker(brokerFacade);
28         restconfImpl.setControllerContext(controllerContext);
29         singletons.add(controllerContext);
30         singletons.add(brokerFacade);
31         singletons.add(restconfImpl);
32         singletons.add(XmlToCompositeNodeProvider.INSTANCE);
33         singletons.add(StructuredDataToXmlProvider.INSTANCE);
34         singletons.add(JsonToCompositeNodeProvider.INSTANCE);
35         singletons.add(StructuredDataToJsonProvider.INSTANCE);
36         return singletons;
37     }
38
39 }