Remove unneeded doc dependency
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / impl / DefaultBindingCodecTreeFactory.java
1 /*
2  * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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.mdsal.binding.dom.codec.impl;
9
10 import com.google.common.annotations.Beta;
11 import javax.inject.Singleton;
12 import org.kohsuke.MetaInfServices;
13 import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree;
14 import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory;
15 import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext;
16 import org.osgi.service.component.annotations.Activate;
17 import org.osgi.service.component.annotations.Component;
18 import org.osgi.service.component.annotations.Deactivate;
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
21
22 @Beta
23 @MetaInfServices
24 @Singleton
25 @Component(immediate = true)
26 public final class DefaultBindingCodecTreeFactory implements BindingCodecTreeFactory {
27     private static final Logger LOG = LoggerFactory.getLogger(DefaultBindingCodecTreeFactory.class);
28
29     @Override
30     public BindingCodecTree create(final BindingRuntimeContext context) {
31         return new BindingCodecContext(context);
32     }
33
34     @Activate
35     @SuppressWarnings("static-method")
36     void activate() {
37         LOG.info("Binding-DOM Codec enabled");
38     }
39
40
41     @Deactivate
42     @SuppressWarnings("static-method")
43     void deactivate() {
44         LOG.info("Binding-DOM Codec disabled");
45     }
46 }