Yuta HIGUCHI | db1b830 | 2014-06-26 10:50:39 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.topology; |
| 2 | |
| 3 | import java.util.Map; |
| 4 | |
Yuta HIGUCHI | bf0a871 | 2014-06-30 18:59:46 -0700 | [diff] [blame] | 5 | // TODO We may want to separate configuration attributes and |
| 6 | // running state attributes. |
Yuta HIGUCHI | db1b830 | 2014-06-26 10:50:39 -0700 | [diff] [blame] | 7 | /** |
| 8 | * Interface for Elements with StringAttributes. |
| 9 | */ |
| 10 | public interface StringAttributes { |
| 11 | /** |
| 12 | * Gets the string attribute. |
| 13 | * |
| 14 | * @param attr attribute name |
| 15 | * @return attribute value or null |
| 16 | */ |
| 17 | public String getStringAttribute(final String attr); |
| 18 | |
| 19 | /** |
| 20 | * Gets the string attribute. |
| 21 | * |
| 22 | * @param attr attribute name |
| 23 | * @param def default value if {@code attr} did not exist |
| 24 | * @return attribute value or null |
| 25 | */ |
| 26 | public String getStringAttribute(final String attr, final String def); |
| 27 | |
| 28 | /** |
| 29 | * Gets all the string attributes. |
| 30 | * |
| 31 | * @return Immutable Map containing all the String attributes. |
| 32 | */ |
| 33 | public Map<String, String> getAllStringAttributes(); |
| 34 | } |