Merge "Bug 809: Enhancements to the toaster example"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / impl / IdentityValuesDTO.java
index 5fd36cb19681323f695445c43a6542ccc5866826..14a558967d2081a18e045192712ab0988cde6efa 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.sal.restconf.impl;
 
 import java.util.ArrayList;
@@ -7,13 +14,19 @@ import java.util.List;
 public final class IdentityValuesDTO {
 
     private final List<IdentityValue> elementData = new ArrayList<>();
+    private final String originValue;
 
-    public IdentityValuesDTO(String namespace, String value, String prefix) {
+    public IdentityValuesDTO(String namespace, String value, String prefix,String originValue) {
         elementData.add(new IdentityValue(namespace, value, prefix));
+        this.originValue = originValue;
+    }
+    
+    public IdentityValuesDTO(String originValue) {
+        this.originValue = originValue;
     }
     
     public IdentityValuesDTO() {
-        
+        originValue = null;
     }
 
     public void add(String namespace, String value, String prefix) {
@@ -33,6 +46,10 @@ public final class IdentityValuesDTO {
     public String toString() {
         return elementData.toString();
     }
+    
+    public String getOriginValue() {
+        return originValue;
+    }
 
     public static final class IdentityValue {