Remove unneeded doc dependency
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / impl / SimpleBindingCodecTreeFactory.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 org.kohsuke.MetaInfServices;
11 import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree;
12 import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory;
13 import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext;
14 import org.osgi.service.component.annotations.Activate;
15 import org.osgi.service.component.annotations.Component;
16 import org.osgi.service.component.annotations.Deactivate;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
19
20 @MetaInfServices
21 @Component(immediate = true)
22 public final class SimpleBindingCodecTreeFactory implements BindingCodecTreeFactory {
23     private static final Logger LOG = LoggerFactory.getLogger(SimpleBindingCodecTreeFactory.class);
24
25     @Override
26     public BindingCodecTree create(final BindingRuntimeContext context) {
27         return new BindingCodecContext(context);
28     }
29
30     @Activate
31     @SuppressWarnings("static-method")
32     void activate() {
33         LOG.info("Binding-DOM Codec enabled");
34     }
35
36     @Deactivate
37     @SuppressWarnings("static-method")
38     void deactivate() {
39         LOG.info("Binding-DOM Codec disabled");
40     }
41 }