2 * Copyright (c) 2015 Cisco Systems, 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
9 package org.opendaylight.openflowplugin.applications.notification.supplier;
11 import org.opendaylight.yangtools.yang.binding.DataObject;
12 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
13 import org.opendaylight.yangtools.yang.binding.Notification;
16 * Supplier Item contracts definition for every Notification. All items are described
17 * by three notifications. Notification for Create, Update and Delete. So interface
18 * has to contain three methods for every Notification.
20 * @param <O> - data tree item Object
21 * @param <C> - Create notification
22 * @param <U> - Update notification
23 * @param <D> - Delete notification
25 public interface NotificationSupplierForItem<O extends DataObject,
26 C extends Notification,
27 U extends Notification,
28 D extends Notification>
29 extends NotificationSupplierDefinition<O> {
32 * Method produces relevant addItem kind of {@link Notification} from
33 * data tree item identified by {@link InstanceIdentifier} path.
35 * @param o - Data Tree Item object
36 * @param path - Identifier of Data Tree Item
37 * @return {@link Notification} - relevant API contract Notification
39 C createNotification(O o, InstanceIdentifier<O> path);
42 * Method produces relevant updateItem kind of {@link Notification} from
43 * data tree item identified by {@link InstanceIdentifier} path.
45 * @param o - Data Tree Item object
46 * @param path - Identifier of Data Tree Item
47 * @return {@link Notification} - relevant API contract Notification
49 U updateNotification(O o, InstanceIdentifier<O> path);
52 * Method produces relevant deleteItem kind of {@link Notification} from
53 * path {@link InstanceIdentifier} to deleted item.
55 * @param path - Identifier of Data Tree Item
56 * @return {@link Notification} - relevant API contract Notification
58 D deleteNotification(InstanceIdentifier<O> path);