Package org.opennms.web.svclayer.model
Class SurveillanceTable
- java.lang.Object
-
- org.opennms.web.svclayer.model.SurveillanceTable
-
public class SurveillanceTable extends Object
This class manages a table of AggregateStatus values.- Author:
- Mathew Brozowski, David Hustace, DJ Gregor
-
-
Constructor Summary
Constructors Constructor Description SurveillanceTable()
Constructor for SurveillanceTable.SurveillanceTable(int rows, int columns)
Constructor for SurveillanceTable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnCount()
getColumnCountList<String>
getColumnHeaderList()
getColumnHeaderListString[]
getColumnHeaders()
getColumnHeadersSet<OnmsNode>[]
getColumnNodes()
getColumnNodesList<AggregateStatus>
getColumnOrderedRow(int row)
This method returns on ordered list of Aggregate Status columns based on the row specified from the status internal table.List<AggregateStatus>
getColumnOrderedRow(AggregateStatus[] row)
This method returns on ordered list of Aggregate Status columns based on the array argument.Map<String,List<AggregateStatus>>
getColumnOrderedRowsWithHeaders()
Handy method for return a map with the key being the row header and the value being an ordered collection of aggregate stati.String
getLabel()
getLabelSet<OnmsNode>
getNodesForColumn(int col)
getNodesForColumnSet<OnmsNode>
getNodesForRow(int row)
getNodesForRowList<List<AggregateStatus>>
getOrderedRows()
This method returns an ordered list of Aggregate Status rows and columns the internal table.int
getRowCount()
getRowCountString
getRowHeader(int row)
getRowHeaderList<String>
getRowHeaderList()
getRowHeaderListString[]
getRowHeaders()
getRowHeadersSet<OnmsNode>[]
getRowNodes()
getRowNodesAggregateStatus
getStatus(int row, int col)
getStatusAggregateStatus[]
getStatusRow(int row)
getStatusRowAggregateStatus[][]
getStatusTable()
getStatusTableSimpleWebTable
getWebTable()
getWebTablevoid
setColumnHeader(int col, String header)
setColumnHeadervoid
setColumnHeaders(String[] columnHeaders)
setColumnHeadersvoid
setColumnNodes(Set<OnmsNode>[] columnNodes)
setColumnNodesvoid
setLabel(String label)
setLabelvoid
setNodesForColumn(int col, Collection<OnmsNode> columnNodes)
setNodesForColumnvoid
setNodesForRow(int row, Collection<OnmsNode> nodes)
setNodesForRowvoid
setRowHeader(int row, String header)
setRowHeadervoid
setRowHeaders(String[] rowHeaders)
setRowHeadersvoid
setRowNodes(Set<OnmsNode>[] rowNodes)
setRowNodesvoid
setStatus(int row, int col, AggregateStatus status)
setStatusvoid
setStatusTable(AggregateStatus[][] statusTable)
setStatusTablevoid
setWebTable(SimpleWebTable webTable)
setWebTable
-
-
-
Method Detail
-
setWebTable
public void setWebTable(SimpleWebTable webTable)
setWebTable
- Parameters:
webTable
- aSimpleWebTable
object.
-
getWebTable
public SimpleWebTable getWebTable()
getWebTable
- Returns:
- a
SimpleWebTable
object.
-
setStatus
public void setStatus(int row, int col, AggregateStatus status)
setStatus
- Parameters:
row
- a int.col
- a int.status
- aAggregateStatus
object.
-
getStatus
public AggregateStatus getStatus(int row, int col)
getStatus
- Parameters:
row
- a int.col
- a int.- Returns:
- a
AggregateStatus
object.
-
getRowCount
public int getRowCount()
getRowCount
- Returns:
- a int.
-
getColumnCount
public int getColumnCount()
getColumnCount
- Returns:
- a int.
-
getStatusRow
public AggregateStatus[] getStatusRow(int row)
getStatusRow
- Parameters:
row
- a int.- Returns:
- an array of
AggregateStatus
objects.
-
getOrderedRows
public List<List<AggregateStatus>> getOrderedRows()
This method returns an ordered list of Aggregate Status rows and columns the internal table. Usefull when needing to work with collections and not arrays.- Returns:
- List
-
getColumnOrderedRowsWithHeaders
public Map<String,List<AggregateStatus>> getColumnOrderedRowsWithHeaders()
Handy method for return a map with the key being the row header and the value being an ordered collection of aggregate stati.- Returns:
- Map
> map
-
getColumnOrderedRow
public List<AggregateStatus> getColumnOrderedRow(AggregateStatus[] row)
This method returns on ordered list of Aggregate Status columns based on the array argument.- Parameters:
row
- an array ofAggregateStatus
objects.- Returns:
- List
orderedRow
-
getColumnOrderedRow
public List<AggregateStatus> getColumnOrderedRow(int row)
This method returns on ordered list of Aggregate Status columns based on the row specified from the status internal table.- Parameters:
row
- a int.- Returns:
- List
orderedRow
-
getRowHeader
public String getRowHeader(int row)
getRowHeader
- Parameters:
row
- a int.- Returns:
- a
String
object.
-
setRowHeader
public void setRowHeader(int row, String header)
setRowHeader
- Parameters:
row
- a int.header
- aString
object.
-
setColumnHeader
public void setColumnHeader(int col, String header)
setColumnHeader
- Parameters:
col
- a int.header
- aString
object.
-
getColumnHeaders
public String[] getColumnHeaders()
getColumnHeaders
- Returns:
- an array of
String
objects.
-
getColumnHeaderList
public List<String> getColumnHeaderList()
getColumnHeaderList
- Returns:
- a
List
object.
-
getStatusTable
public AggregateStatus[][] getStatusTable()
getStatusTable
- Returns:
- an array of
AggregateStatus
objects.
-
setRowNodes
public void setRowNodes(Set<OnmsNode>[] rowNodes)
setRowNodes
- Parameters:
rowNodes
- an array ofSet
objects.
-
setRowHeaders
public void setRowHeaders(String[] rowHeaders)
setRowHeaders
- Parameters:
rowHeaders
- an array ofString
objects.
-
getColumnNodes
public Set<OnmsNode>[] getColumnNodes()
getColumnNodes
- Returns:
- an array of
Set
objects.
-
setColumnNodes
public void setColumnNodes(Set<OnmsNode>[] columnNodes)
setColumnNodes
- Parameters:
columnNodes
- an array ofSet
objects.
-
setColumnHeaders
public void setColumnHeaders(String[] columnHeaders)
setColumnHeaders
- Parameters:
columnHeaders
- an array ofString
objects.
-
setStatusTable
public void setStatusTable(AggregateStatus[][] statusTable)
setStatusTable
- Parameters:
statusTable
- an array ofAggregateStatus
objects.
-
getNodesForRow
public Set<OnmsNode> getNodesForRow(int row)
getNodesForRow
- Parameters:
row
- a int.- Returns:
- a
Set
object.
-
setNodesForRow
public void setNodesForRow(int row, Collection<OnmsNode> nodes)
setNodesForRow
- Parameters:
row
- a int.nodes
- aCollection
object.
-
getNodesForColumn
public Set<OnmsNode> getNodesForColumn(int col)
getNodesForColumn
- Parameters:
col
- a int.- Returns:
- a
Set
object.
-
setNodesForColumn
public void setNodesForColumn(int col, Collection<OnmsNode> columnNodes)
setNodesForColumn
- Parameters:
col
- a int.columnNodes
- aCollection
object.
-
-