org.opennms.web.svclayer
Class SurveillanceTable

java.lang.Object
  extended by org.opennms.web.svclayer.SurveillanceTable

public class SurveillanceTable
extends Object

This class manages a table of AggregateStatus values.

Author:
Mathew Brozowski, David Hustace, DJ Gregor

Constructor Summary
SurveillanceTable()
           
SurveillanceTable(int rows, int columns)
           
 
Method Summary
 int getColumnCount()
           
 List getColumnHeaderList()
           
 String[] getColumnHeaders()
           
 Set<OnmsNode>[] getColumnNodes()
           
 List<AggregateStatus> getColumnOrderedRow(AggregateStatus[] row)
          This method returns on ordered list of Aggregate Status columns based on the array argument.
 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.
 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()
           
 Set<OnmsNode> getNodesForColumn(int col)
           
 Set<OnmsNode> getNodesForRow(int row)
           
 List<List<AggregateStatus>> getOrderedRows()
          This method returns an ordered list of Aggregate Status rows and columns the internal table.
 int getRowCount()
           
 String getRowHeader(int row)
           
 List getRowHeaderList()
           
 String[] getRowHeaders()
           
 Set<OnmsNode>[] getRowNodes()
           
 AggregateStatus getStatus(int row, int col)
           
 AggregateStatus[] getStatusRow(int row)
           
 AggregateStatus[][] getStatusTable()
           
 SimpleWebTable getWebTable()
           
 void setColumnHeader(int col, String header)
           
 void setColumnHeaders(String[] columnHeaders)
           
 void setColumnNodes(Set<OnmsNode>[] columnNodes)
           
 void setLabel(String label)
           
 void setNodesForColumn(int col, Collection<OnmsNode> columnNodes)
           
 void setNodesForRow(int row, Collection<OnmsNode> nodes)
           
 void setRowHeader(int row, String header)
           
 void setRowHeaders(String[] rowHeaders)
           
 void setRowNodes(Set<OnmsNode>[] rowNodes)
           
 void setStatus(int row, int col, AggregateStatus status)
           
 void setStatusTable(AggregateStatus[][] statusTable)
           
 void setWebTable(SimpleWebTable webTable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SurveillanceTable

public SurveillanceTable()

SurveillanceTable

public SurveillanceTable(int rows,
                         int columns)
Method Detail

setWebTable

public void setWebTable(SimpleWebTable webTable)

getWebTable

public SimpleWebTable getWebTable()

setStatus

public void setStatus(int row,
                      int col,
                      AggregateStatus status)

getStatus

public AggregateStatus getStatus(int row,
                                 int col)

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getStatusRow

public AggregateStatus[] getStatusRow(int row)

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 -
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 -
Returns:
List orderedRow

getRowHeader

public String getRowHeader(int row)

setRowHeader

public void setRowHeader(int row,
                         String header)

getRowHeaders

public String[] getRowHeaders()

getRowHeaderList

public List getRowHeaderList()

setColumnHeader

public void setColumnHeader(int col,
                            String header)

getColumnHeaders

public String[] getColumnHeaders()

getColumnHeaderList

public List getColumnHeaderList()

getLabel

public String getLabel()

setLabel

public void setLabel(String label)

getStatusTable

public AggregateStatus[][] getStatusTable()

getRowNodes

public Set<OnmsNode>[] getRowNodes()

setRowNodes

public void setRowNodes(Set<OnmsNode>[] rowNodes)

setRowHeaders

public void setRowHeaders(String[] rowHeaders)

getColumnNodes

public Set<OnmsNode>[] getColumnNodes()

setColumnNodes

public void setColumnNodes(Set<OnmsNode>[] columnNodes)

setColumnHeaders

public void setColumnHeaders(String[] columnHeaders)

setStatusTable

public void setStatusTable(AggregateStatus[][] statusTable)

getNodesForRow

public Set<OnmsNode> getNodesForRow(int row)

setNodesForRow

public void setNodesForRow(int row,
                           Collection<OnmsNode> nodes)

getNodesForColumn

public Set<OnmsNode> getNodesForColumn(int col)

setNodesForColumn

public void setNodesForColumn(int col,
                              Collection<OnmsNode> columnNodes)


Copyright © 2009. All Rights Reserved.