blob: 81a14bab1354948ecac9b2da46e3f1102b13f74b [file] [log] [blame]
Bri Prebilic Cole468bc1d2015-02-12 12:11:13 -08001/*
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 Vachuskafe8c98a2015-02-04 01:24:32 -080017package org.onosproject.ui.impl;
Bri Prebilic Cole468bc1d2015-02-12 12:11:13 -080018
19
20import com.fasterxml.jackson.databind.node.ObjectNode;
21
22/**
23 * Defines a table row abstraction to support sortable tables on the GUI.
24 */
25public 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}