Yuta HIGUCHI | bf0a871 | 2014-06-30 18:59:46 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.topology; |
| 2 | |
| 3 | // TODO Need better name |
| 4 | /** |
| 5 | * Update String Attributes. |
| 6 | */ |
| 7 | public interface UpdateStringAttributes extends StringAttributes { |
| 8 | |
| 9 | /** |
| 10 | * Creates the string attribute. |
| 11 | * |
| 12 | * @param attr attribute name |
| 13 | * @param value new value to replace with |
| 14 | * @return true if success, false if the attribute already exist |
| 15 | */ |
| 16 | public boolean createStringAttribute(final String attr, |
| 17 | final String value); |
| 18 | |
| 19 | /** |
| 20 | * Replaces the existing string attribute. |
| 21 | * |
| 22 | * @param attr attribute name |
| 23 | * @param oldValue old value to replace |
| 24 | * @param value new value to replace with |
| 25 | * @return true if success |
| 26 | */ |
| 27 | public boolean replaceStringAttribute(final String attr, |
| 28 | final String oldValue, final String value); |
| 29 | |
| 30 | /** |
| 31 | * Deletes existing string attribute. |
| 32 | * |
| 33 | * @param attr attribute name |
| 34 | * @param expectedValue value expected to be deleted |
| 35 | * @return true if success, false if an attribute already exist |
| 36 | */ |
| 37 | public boolean deleteStringAttribute(final String attr, |
| 38 | final String expectedValue); |
| 39 | |
| 40 | /** |
| 41 | * Deletes string attribute. |
| 42 | * |
| 43 | * @param attr attribute name |
| 44 | */ |
| 45 | public void deleteStringAttribute(final String attr); |
| 46 | |
| 47 | } |