org.opennms.web.category
Class CategoryList

java.lang.Object
  extended by org.opennms.web.category.CategoryList

public class CategoryList
extends Object

CategoryList class.

Version:
$Id: $
Author:
ranger

Field Summary
protected  CategoryModel m_model
           
protected  Section[] m_sections
          Display rules from viewsdisplay.xml.
 
Constructor Summary
CategoryList()
          Constructor for CategoryList.
 
Method Summary
 Map<String,List<Category>> getCategoryData()
          getCategoryData
 long getEarliestUpdate(Map categoryData)
          Returns the earliest update time for the categories in categoryData.
 List<Section> getSections(Map<String,Category> categoryMap)
          For the given map of category names to Category objects, organize the categories into the currently active display rules.
 boolean isDisconnected()
          isDisconnected
 boolean isDisconnected(long earliestUpdate)
          isDisconnected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_model

protected CategoryModel m_model

m_sections

protected Section[] m_sections
Display rules from viewsdisplay.xml. If null, then just show all known categories under the header "Category". (See the getSections method.)

Constructor Detail

CategoryList

public CategoryList()
             throws javax.servlet.ServletException

Constructor for CategoryList.

Throws:
javax.servlet.ServletException - if any.
Method Detail

getSections

public List<Section> getSections(Map<String,Category> categoryMap)
                          throws IOException
For the given map of category names to Category objects, organize the categories into the currently active display rules.

If there are no display rules, a single section named Category will be returned. It will include all the categories in the category map, in alphabetical order by category name.

Parameters:
categoryMap - a Map object.
Returns:
a List object.
Throws:
IOException - if any.

getCategoryData

public Map<String,List<Category>> getCategoryData()
                                           throws IOException,
                                                  org.exolab.castor.xml.MarshalException,
                                                  org.exolab.castor.xml.ValidationException

getCategoryData

Returns:
a Map object.
Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

getEarliestUpdate

public long getEarliestUpdate(Map categoryData)
Returns the earliest update time for the categories in categoryData.

Parameters:
categoryData - category data to evaluate. From getCategoryData().
Returns:
a long.

isDisconnected

public boolean isDisconnected()
                       throws IOException,
                              org.exolab.castor.xml.MarshalException,
                              org.exolab.castor.xml.ValidationException

isDisconnected

Returns:
a boolean.
Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

isDisconnected

public boolean isDisconnected(long earliestUpdate)

isDisconnected

Parameters:
earliestUpdate - a long.
Returns:
a boolean.


Copyright © 2011. All Rights Reserved.