org.opennms.web.category
Class CategoryList

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

public class CategoryList
extends java.lang.Object


Field Summary
protected  javax.servlet.ServletContext m_context
           
protected  CategoryModel m_model
           
protected  org.opennms.netmgt.config.viewsdisplay.Section[] m_sections
          Display rules from viewsdisplay.xml.
 
Constructor Summary
CategoryList(javax.servlet.ServletContext context)
           
 
Method Summary
 java.util.Map<java.lang.String,java.util.List<Category>> getCategoryData()
           
 long getEarliestUpdate(java.util.Map categoryData)
          Returns the earliest update time for the categories in categoryData.
 java.util.List<org.opennms.netmgt.config.viewsdisplay.Section> getSections(java.util.Map<java.lang.String,Category> categoryMap)
          For the given map of category names to Category objects, organize the categories into the currently active display rules.
 boolean isDisconnected()
           
 boolean isDisconnected(long earliestUpdate)
           
 
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_context

protected javax.servlet.ServletContext m_context

m_sections

protected org.opennms.netmgt.config.viewsdisplay.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(javax.servlet.ServletContext context)
             throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException
Method Detail

getSections

public java.util.List<org.opennms.netmgt.config.viewsdisplay.Section> getSections(java.util.Map<java.lang.String,Category> categoryMap)
                                                                           throws java.io.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.

Throws:
java.io.IOException

getCategoryData

public java.util.Map<java.lang.String,java.util.List<Category>> getCategoryData()
                                                                         throws java.io.IOException,
                                                                                org.exolab.castor.xml.MarshalException,
                                                                                org.exolab.castor.xml.ValidationException
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

getEarliestUpdate

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

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

isDisconnected

public boolean isDisconnected()
                       throws java.io.IOException,
                              org.exolab.castor.xml.MarshalException,
                              org.exolab.castor.xml.ValidationException
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

isDisconnected

public boolean isDisconnected(long earliestUpdate)


Copyright © 2007. All Rights Reserved.