org.opennms.netmgt.config
Class SiteStatusViewsFactory

java.lang.Object
  extended by org.opennms.netmgt.config.SiteStatusViewsFactory

public class SiteStatusViewsFactory
extends java.lang.Object


Field Summary
protected  boolean initialized
          Boolean indicating if the init() method has been called.
protected static long m_lastModified
          Timestamp of the viewDisplay file, used to know when to reload from disk.
protected static java.util.Map<java.lang.String,org.opennms.netmgt.config.siteStatusViews.View> m_viewsMap
          Map of view objects by name.
 
Constructor Summary
SiteStatusViewsFactory(java.io.Reader rdr)
           
SiteStatusViewsFactory(java.lang.String configFile)
           
 
Method Summary
static org.opennms.netmgt.config.siteStatusViews.SiteStatusViewConfiguration getConfig()
           
static SiteStatusViewsFactory getInstance()
          Singleton static call to get the only instance that should exist for the ViewsDisplayFactory
 org.opennms.netmgt.config.siteStatusViews.View getView(java.lang.String viewName)
          Can't be null
static java.util.Map<java.lang.String,org.opennms.netmgt.config.siteStatusViews.View> getViewsMap()
           
static void init()
          Be sure to call this method before calling getInstance().
 void reload()
           
static void setConfig(org.opennms.netmgt.config.siteStatusViews.SiteStatusViewConfiguration m_config)
           
static void setInstance(SiteStatusViewsFactory instance)
           
static void setViewsMap(java.util.Map<java.lang.String,org.opennms.netmgt.config.siteStatusViews.View> map)
           
protected  void updateFromFile()
          Reload the viewsdisplay.xml file if it has been changed since we last read it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialized

protected boolean initialized
Boolean indicating if the init() method has been called.


m_lastModified

protected static long m_lastModified
Timestamp of the viewDisplay file, used to know when to reload from disk.


m_viewsMap

protected static java.util.Map<java.lang.String,org.opennms.netmgt.config.siteStatusViews.View> m_viewsMap
Map of view objects by name.

Constructor Detail

SiteStatusViewsFactory

public SiteStatusViewsFactory(java.lang.String configFile)
                       throws org.exolab.castor.xml.MarshalException,
                              org.exolab.castor.xml.ValidationException,
                              java.io.IOException
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.io.IOException

SiteStatusViewsFactory

public SiteStatusViewsFactory(java.io.Reader rdr)
                       throws org.exolab.castor.xml.MarshalException,
                              org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
Method Detail

init

public static void init()
                 throws java.io.IOException,
                        java.io.FileNotFoundException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException
Be sure to call this method before calling getInstance().

Throws:
java.io.IOException
java.io.FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

getInstance

public static SiteStatusViewsFactory getInstance()
Singleton static call to get the only instance that should exist for the ViewsDisplayFactory

Returns:
the single views display factory instance
Throws:
java.lang.IllegalStateException - if init has not been called

setInstance

public static void setInstance(SiteStatusViewsFactory instance)

reload

public void reload()
            throws java.io.IOException,
                   java.io.FileNotFoundException,
                   org.exolab.castor.xml.MarshalException,
                   org.exolab.castor.xml.ValidationException
Throws:
java.io.IOException
java.io.FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

getView

public org.opennms.netmgt.config.siteStatusViews.View getView(java.lang.String viewName)
                                                       throws java.io.IOException,
                                                              org.exolab.castor.xml.MarshalException,
                                                              org.exolab.castor.xml.ValidationException
Can't be null

Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

updateFromFile

protected void updateFromFile()
                       throws java.io.IOException,
                              org.exolab.castor.xml.MarshalException,
                              org.exolab.castor.xml.ValidationException
Reload the viewsdisplay.xml file if it has been changed since we last read it.

Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

getConfig

public static org.opennms.netmgt.config.siteStatusViews.SiteStatusViewConfiguration getConfig()

setConfig

public static void setConfig(org.opennms.netmgt.config.siteStatusViews.SiteStatusViewConfiguration m_config)

getViewsMap

public static java.util.Map<java.lang.String,org.opennms.netmgt.config.siteStatusViews.View> getViewsMap()

setViewsMap

public static void setViewsMap(java.util.Map<java.lang.String,org.opennms.netmgt.config.siteStatusViews.View> map)


Copyright © 2007. All Rights Reserved.