Merge "Bug 499: Added support for old DOM Broker APIs."
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / Actions.java
index 135a67dcd1cbfdd83a00f5695ab2d18e4833fc9d..b3fa45bbc957322d3b0839ac86506d30359def7e 100644 (file)
@@ -9,6 +9,8 @@
 
 package org.opendaylight.controller.sal.core;
 
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
@@ -18,12 +20,14 @@ import javax.xml.bind.annotation.XmlRootElement;
  * @brief  Class representing actions
  *
  * Describes supported actions
+ * @Deprecated This class is OF 1.0 specific. Use SupportedFlowActions instead.
  */
-
+@Deprecated
 @XmlRootElement
+@XmlAccessorType(XmlAccessType.NONE)
 public class Actions extends Property {
         private static final long serialVersionUID = 1L;
-    @XmlElement
+    @XmlElement(name="value")
     private int actionsValue;
 
     public enum ActionType {
@@ -69,6 +73,7 @@ public class Actions extends Property {
         this.actionsValue = 0;
     }
 
+    @Override
     public Actions clone() {
         return new Actions(this.actionsValue);
     }
@@ -88,15 +93,19 @@ public class Actions extends Property {
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (!super.equals(obj))
+        }
+        if (!super.equals(obj)) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         Actions other = (Actions) obj;
-        if (actionsValue != other.actionsValue)
+        if (actionsValue != other.actionsValue) {
             return false;
+        }
         return true;
     }
 
@@ -104,4 +113,9 @@ public class Actions extends Property {
     public String toString() {
         return "Actions[" + actionsValue + "]";
     }
+
+    @Override
+    public String getStringValue() {
+        return Integer.toHexString(actionsValue);
+    }
 }