Bug-2827: role switch proposal
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / extension / ExtensionResolvers.java
1 /**
2  * Copyright (c) 2014 Cisco Systems, Inc. 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 package org.opendaylight.openflowplugin.openflow.md.core.extension;
9
10 import org.opendaylight.openflowplugin.extension.api.GroupingLooseResolver;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlow;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchRpcAddFlow;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchRpcRemoveFlow;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchRpcUpdateFlowOriginal;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchRpcUpdateFlowUpdated;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralExtensionListGrouping;
17
18 /**
19  * 
20  */
21 public class ExtensionResolvers {
22     
23     private static GroupingLooseResolver<GeneralExtensionListGrouping> matchExtensionResolver = 
24             new GroupingLooseResolver<>(GeneralExtensionListGrouping.class)
25             .add(GeneralAugMatchRpcAddFlow.class)
26             .add(GeneralAugMatchRpcRemoveFlow.class)
27             .add(GeneralAugMatchRpcUpdateFlowOriginal.class)
28             .add(GeneralAugMatchRpcUpdateFlowUpdated.class)
29             .add(GeneralAugMatchNodesNodeTableFlow.class);
30     
31     /**
32      * @return the matchExtensionResolver (covers match rpcs and inventory augmentations)
33      */
34     public static GroupingLooseResolver<GeneralExtensionListGrouping> getMatchExtensionResolver() {
35         return matchExtensionResolver;
36     }
37
38 }