View Javadoc

1   /*
2    * Copyright (c) 2015 Cisco Systems, Inc.  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   
9   package org.opendaylight.lispflowmapping.implementation.util;
10  
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;
15  
16  /**
17   * @author Florin Coras
18   *
19   */
20  public final class MSNotificationInputUtil {
21      // Utility class, should not be instantiated
22      private MSNotificationInputUtil() {
23      }
24  
25      public static MappingChanged toMappingChanged(Mapping input, MappingChange change) {
26          return new MappingChangedBuilder().setMappingRecord(input.getMappingRecord())
27                  .setChangeType(change).build();
28      }
29  }