Package org.opennms.web.svclayer.model
Class SurveillanceTable
- java.lang.Object
-
- org.opennms.web.svclayer.model.SurveillanceTable
-
public class SurveillanceTable extends java.lang.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()
getColumnCountjava.util.List<java.lang.String>
getColumnHeaderList()
getColumnHeaderListjava.lang.String[]
getColumnHeaders()
getColumnHeadersjava.util.Set<OnmsNode>[]
getColumnNodes()
getColumnNodesjava.util.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.java.util.List<AggregateStatus>
getColumnOrderedRow(AggregateStatus[] row)
This method returns on ordered list of Aggregate Status columns based on the array argument.java.util.Map<java.lang.String,java.util.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.java.lang.String
getLabel()
getLabeljava.util.Set<OnmsNode>
getNodesForColumn(int col)
getNodesForColumnjava.util.Set<OnmsNode>
getNodesForRow(int row)
getNodesForRowjava.util.List<java.util.List<AggregateStatus>>
getOrderedRows()
This method returns an ordered list of Aggregate Status rows and columns the internal table.int
getRowCount()
getRowCountjava.lang.String
getRowHeader(int row)
getRowHeaderjava.util.List<java.lang.String>
getRowHeaderList()
getRowHeaderListjava.lang.String[]
getRowHeaders()
getRowHeadersjava.util.Set<OnmsNode>[]
getRowNodes()
getRowNodesAggregateStatus
getStatus(int row, int col)
getStatusAggregateStatus[]
getStatusRow(int row)
getStatusRowAggregateStatus[][]
getStatusTable()
getStatusTableSimpleWebTable
getWebTable()
getWebTablevoid
setColumnHeader(int col, java.lang.String header)
setColumnHeadervoid
setColumnHeaders(java.lang.String[] columnHeaders)
setColumnHeadersvoid
setColumnNodes(java.util.Set<OnmsNode>[] columnNodes)
setColumnNodesvoid
setLabel(java.lang.String label)
setLabelvoid
setNodesForColumn(int col, java.util.Collection<OnmsNode> columnNodes)
setNodesForColumnvoid
setNodesForRow(int row, java.util.Collection<OnmsNode> nodes)
setNodesForRowvoid
setRowHeader(int row, java.lang.String header)
setRowHeadervoid
setRowHeaders(java.lang.String[] rowHeaders)
setRowHeadersvoid
setRowNodes(java.util.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 java.util.List<java.util.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 java.util.Map<java.lang.String,java.util.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 java.util.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 java.util.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 java.lang.String getRowHeader(int row)
getRowHeader
- Parameters:
row
- a int.- Returns:
- a
String
object.
-
setRowHeader
public void setRowHeader(int row, java.lang.String header)
setRowHeader
- Parameters:
row
- a int.header
- aString
object.
-
getRowHeaders
public java.lang.String[] getRowHeaders()
getRowHeaders
- Returns:
- an array of
String
objects.
-
getRowHeaderList
public java.util.List<java.lang.String> getRowHeaderList()
getRowHeaderList
- Returns:
- a
List
object.
-
setColumnHeader
public void setColumnHeader(int col, java.lang.String header)
setColumnHeader
- Parameters:
col
- a int.header
- aString
object.
-
getColumnHeaders
public java.lang.String[] getColumnHeaders()
getColumnHeaders
- Returns:
- an array of
String
objects.
-
getColumnHeaderList
public java.util.List<java.lang.String> getColumnHeaderList()
getColumnHeaderList
- Returns:
- a
List
object.
-
getLabel
public java.lang.String getLabel()
getLabel
- Returns:
- a
String
object.
-
setLabel
public void setLabel(java.lang.String label)
setLabel
- Parameters:
label
- aString
object.
-
getStatusTable
public AggregateStatus[][] getStatusTable()
getStatusTable
- Returns:
- an array of
AggregateStatus
objects.
-
getRowNodes
public java.util.Set<OnmsNode>[] getRowNodes()
getRowNodes
- Returns:
- an array of
Set
objects.
-
setRowNodes
public void setRowNodes(java.util.Set<OnmsNode>[] rowNodes)
setRowNodes
- Parameters:
rowNodes
- an array ofSet
objects.
-
setRowHeaders
public void setRowHeaders(java.lang.String[] rowHeaders)
setRowHeaders
- Parameters:
rowHeaders
- an array ofString
objects.
-
getColumnNodes
public java.util.Set<OnmsNode>[] getColumnNodes()
getColumnNodes
- Returns:
- an array of
Set
objects.
-
setColumnNodes
public void setColumnNodes(java.util.Set<OnmsNode>[] columnNodes)
setColumnNodes
- Parameters:
columnNodes
- an array ofSet
objects.
-
setColumnHeaders
public void setColumnHeaders(java.lang.String[] columnHeaders)
setColumnHeaders
- Parameters:
columnHeaders
- an array ofString
objects.
-
setStatusTable
public void setStatusTable(AggregateStatus[][] statusTable)
setStatusTable
- Parameters:
statusTable
- an array ofAggregateStatus
objects.
-
getNodesForRow
public java.util.Set<OnmsNode> getNodesForRow(int row)
getNodesForRow
- Parameters:
row
- a int.- Returns:
- a
Set
object.
-
setNodesForRow
public void setNodesForRow(int row, java.util.Collection<OnmsNode> nodes)
setNodesForRow
- Parameters:
row
- a int.nodes
- aCollection
object.
-
getNodesForColumn
public java.util.Set<OnmsNode> getNodesForColumn(int col)
getNodesForColumn
- Parameters:
col
- a int.- Returns:
- a
Set
object.
-
setNodesForColumn
public void setNodesForColumn(int col, java.util.Collection<OnmsNode> columnNodes)
setNodesForColumn
- Parameters:
col
- a int.columnNodes
- aCollection
object.
-
-