3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.sal.core;
12 import javax.xml.bind.annotation.XmlElement;
13 import javax.xml.bind.annotation.XmlRootElement;
15 import org.apache.commons.lang3.builder.EqualsBuilder;
16 import org.apache.commons.lang3.builder.HashCodeBuilder;
17 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
22 * @brief Class representing actions
24 * Describes supported actions
28 public class Actions extends Property {
29 private static final long serialVersionUID = 1L;
31 private int actionsValue;
33 public enum ActionType {
34 OUTPUT_PORT_ACTION(1<<0),
35 VLAN_VID_ACTION(1<<1),
36 VLAN_PCP_ACTION(1<<2),
37 VLAN_STRIP_ACTION(1<<3),
45 ENQUEUE_ACTION(1<<11),
46 VENDOR_ACTION(0xffff);
51 public int getValue() {
56 public static final String ActionsPropName = "actions";
58 * Construct a actions property
60 * @param actions the actions value
61 * @return Constructed object
63 public Actions(int actions) {
64 super(ActionsPropName);
65 this.actionsValue = actions;
69 * Private constructor used for JAXB mapping
72 super(ActionsPropName);
73 this.actionsValue = 0;
76 public Actions clone() {
77 return new Actions(this.actionsValue);
80 public int getValue() {
81 return this.actionsValue;
86 public int hashCode() {
87 return HashCodeBuilder.reflectionHashCode(this);
91 public boolean equals(Object obj) {
92 return EqualsBuilder.reflectionEquals(this, obj);
96 public String toString() {
97 return "Actions[" + ReflectionToStringBuilder.toString(this) + "]";