Refactor NBINotifications and serviceHandlerImpl
[transportpce.git] / dmaap-client / src / main / java / org / opendaylight / transportpce / dmaap / client / resource / config / PublishNotificationProcessServiceModule.java
1 /*
2  * Copyright © 2021 Orange, 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.transportpce.dmaap.client.resource.config;
9
10 import com.fasterxml.jackson.databind.module.SimpleModule;
11 import com.fasterxml.jackson.datatype.jsr310.PackageVersion;
12 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection;
13 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection;
14 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.Lgx;
15 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.Port;
16 import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationProcessService;
17 import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceAEnd;
18 import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceZEnd;
19
20 //This class is a temporary workaround while waiting jackson
21 //support in yang tools https://git.opendaylight.org/gerrit/c/yangtools/+/94852
22 public class PublishNotificationProcessServiceModule extends SimpleModule {
23
24     private static final long serialVersionUID = 1L;
25
26     public PublishNotificationProcessServiceModule() {
27         super(PackageVersion.VERSION);
28         addSerializer(PublishNotificationProcessService.class, new PublishNotificationProcessServiceSerializer());
29         addSerializer(Lgx.class, new LgxSerializer());
30         addSerializer(Port.class, new PortSerializer());
31         addSerializer(RxDirection.class, new RxDirectionSerializer());
32         addSerializer(TxDirection.class, new TxDirectionSerializer());
33         addSerializer(ServiceAEnd.class, new ServiceAEndSerializer());
34         addSerializer(ServiceZEnd.class, new ServiceZEndSerializer());
35     }
36
37 }