2 * Copyright (c) 2015 Cisco Systems, Inc. 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.lispflowmapping.implementation.util;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.MappingChange;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.MappingChanged;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.MappingChangedBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.Mapping;
17 * Utility class to convert a mapping change into a notification.
19 * @author Florin Coras
22 public final class MSNotificationInputUtil {
23 // Utility class, should not be instantiated
24 private MSNotificationInputUtil() {
27 public static MappingChanged toMappingChanged(Mapping input, MappingChange change) {
28 return new MappingChangedBuilder().setMappingRecord(input.getMappingRecord())
29 .setChangeType(change).build();