Bri Prebilic Cole | 468bc1d | 2015-02-12 12:11:13 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Thomas Vachuska | fe8c98a | 2015-02-04 01:24:32 -0800 | [diff] [blame] | 17 | package org.onosproject.ui.impl; |
Bri Prebilic Cole | 468bc1d | 2015-02-12 12:11:13 -0800 | [diff] [blame] | 18 | |
| 19 | |
| 20 | import com.fasterxml.jackson.databind.node.ObjectNode; |
| 21 | |
| 22 | /** |
| 23 | * Defines a table row abstraction to support sortable tables on the GUI. |
| 24 | */ |
| 25 | public interface TableRow { |
| 26 | /** |
| 27 | * Returns the value of the cell for the given column ID. |
| 28 | * |
| 29 | * @param key the column ID |
| 30 | * @return the cell value |
| 31 | */ |
| 32 | String get(String key); |
| 33 | |
| 34 | /** |
| 35 | * Returns this table row in the form of a JSON object. |
| 36 | * |
| 37 | * @return the JSON node |
| 38 | */ |
| 39 | ObjectNode toJsonNode(); |
| 40 | } |