2 * Copyright (c) 2015 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
9 package org.opendaylight.controller.config.yang.config.ui_backend.impl;
11 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
12 import org.opendaylight.groupbasedpolicy.ui.backend.UiBackendServiceImpl;
13 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory;
16 import com.google.common.base.Preconditions;
18 public class UiBackendModule extends org.opendaylight.controller.config.yang.config.ui_backend.impl.AbstractUiBackendModule {
20 private static final Logger LOG = LoggerFactory.getLogger(UiBackendModule.class);
22 public UiBackendModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
23 super(identifier, dependencyResolver);
26 public UiBackendModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.config.ui_backend.impl.UiBackendModule oldModule, java.lang.AutoCloseable oldInstance) {
27 super(identifier, dependencyResolver, oldModule, oldInstance);
31 public void customValidation() {
32 // add custom validation form module attributes here.
36 public java.lang.AutoCloseable createInstance() {
37 DataBroker dataProvider = Preconditions.checkNotNull(getDataBrokerDependency());
38 final UiBackendServiceImpl pgnApplicationService = new UiBackendServiceImpl(dataProvider,
39 getRpcRegistryDependency());
40 LOG.info("ui-backend started.");
42 return new AutoCloseable() {
45 public void close() throws Exception {
46 pgnApplicationService.close();