b52e9bfd243aef069d2ce3abb6021831e0169921
[openflowplugin.git] / applications / forwardingrules-manager / src / main / java / org / opendaylight / openflowplugin / applications / frm / FlowCapableNodeConnectorCommitter.java
1 /**
2  * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. 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
9 package org.opendaylight.openflowplugin.applications.frm;
10
11 import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15
16 public interface FlowCapableNodeConnectorCommitter<D extends DataObject> extends AutoCloseable,
17         DataTreeChangeListener<D> {
18     /**
19      * Method removes DataObject which is identified by InstanceIdentifier
20      * from device.
21      *
22      * @param identifier - the whole path to DataObject
23      * @param del - DataObject for removing
24      * @param nodeConnIdent NodeConnector InstanceIdentifier
25      */
26     void remove(InstanceIdentifier<D> identifier, D del,
27                 InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent);
28
29     /**
30      * Method updates the original DataObject to the update DataObject
31      * in device. Both are identified by same InstanceIdentifier
32      *
33      * @param identifier - the whole path to DataObject
34      * @param original - original DataObject (for update)
35      * @param update - changed DataObject (contain updates)
36      * @param nodeConnIdent NodeConnector InstanceIdentifier
37      */
38     void update(InstanceIdentifier<D> identifier, D original, D update,
39                 InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent);
40
41     /**
42      * Method adds the DataObject which is identified by InstanceIdentifier
43      * to device.
44      *
45      * @param identifier - the whole path to new DataObject
46      * @param add - new DataObject
47      * @param nodeConnIdent NodeConnector InstanceIdentifier
48      */
49     void add(InstanceIdentifier<D> identifier, D add,
50              InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent);
51
52 }