Merge "Devices dashlet show port total numbers, modal shows collapsible list Replaced...
[controller.git] / opendaylight / sal / yang-prototype / sal / sal-binding-spi / src / main / java / org / opendaylight / controller / sal / binding / spi / Mapper.java
1 /*
2  * Copyright (c) 2013 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.controller.sal.binding.spi;
9
10 import org.opendaylight.yangtools.yang.binding.DataObject;
11 import org.opendaylight.yangtools.yang.common.QName;
12 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
13 /**
14  * Translator between Binding-Independent format and generated Binding Data Objects
15  * 
16  * 
17  * 
18  * 
19  * @param <T> Result Type 
20  */
21 public interface Mapper<T extends DataObject> {
22
23     QName getQName();
24     Class<T> getDataObjectClass();    
25     T objectFromDom(CompositeNode object);
26     
27     /**
28      * 
29      * @param obj
30      * @return
31      * @throws IllegalArgumentException 
32      */
33     CompositeNode domFromObject(DataObject obj) throws IllegalArgumentException;
34
35 }