Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.util; |
| 2 | |
Pavlin Radoslavov | ad008e0 | 2013-02-21 18:42:42 -0800 | [diff] [blame] | 3 | import net.floodlightcontroller.util.serializers.CallerIdSerializer; |
| 4 | |
| 5 | import org.codehaus.jackson.annotate.JsonProperty; |
| 6 | import org.codehaus.jackson.map.annotate.JsonSerialize; |
| 7 | |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 8 | /** |
| 9 | * The class representing a Caller ID for an ONOS component. |
| 10 | */ |
Pavlin Radoslavov | ad008e0 | 2013-02-21 18:42:42 -0800 | [diff] [blame] | 11 | @JsonSerialize(using=CallerIdSerializer.class) |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 12 | public class CallerId { |
| 13 | private String value; |
| 14 | |
| 15 | /** |
| 16 | * Default constructor. |
| 17 | */ |
| 18 | public CallerId() {} |
| 19 | |
| 20 | /** |
| 21 | * Constructor from a string value. |
| 22 | * |
| 23 | * @param value the value to use. |
| 24 | */ |
| 25 | public CallerId(String value) { |
| 26 | this.value = value; |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Get the value of the Caller ID. |
| 31 | * |
| 32 | * @return the value of the Caller ID. |
| 33 | */ |
| 34 | public String value() { return value; } |
| 35 | |
| 36 | /** |
| 37 | * Set the value of the Caller ID. |
| 38 | * |
| 39 | * @param value the value to set. |
| 40 | */ |
| 41 | public void setValue(String value) { |
| 42 | this.value = value; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Convert the Caller ID value to a string. |
| 47 | * |
| 48 | * @return the Caller ID value to a string. |
| 49 | */ |
| 50 | @Override |
| 51 | public String toString() { |
| 52 | return value; |
| 53 | } |
| 54 | } |