2 * Copyright © 2021 Orange, 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
8 package org.opendaylight.transportpce.dmaap.client.resource.config;
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.rev201130.PublishNotificationService;
17 import org.opendaylight.yang.gen.v1.nbi.notifications.rev201130.notification.service.ServiceAEnd;
18 import org.opendaylight.yang.gen.v1.nbi.notifications.rev201130.notification.service.ServiceZEnd;
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 PublishNotificationServiceModule extends SimpleModule {
24 private static final long serialVersionUID = 1L;
26 public PublishNotificationServiceModule() {
27 super(PackageVersion.VERSION);
28 addSerializer(PublishNotificationService.class, new PublishNotificationServiceSerializer());
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());