Class SiteStatusViewsFactory


  • public class SiteStatusViewsFactory
    extends java.lang.Object
    • 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,​View> m_viewsMap
        Map of view objects by name.
    • Constructor Detail

      • SiteStatusViewsFactory

        public SiteStatusViewsFactory​(java.lang.String configFile)
                               throws java.io.IOException

        Constructor for SiteStatusViewsFactory.

        Parameters:
        configFile - a String object.
        Throws:
        java.io.IOException - if any.
      • SiteStatusViewsFactory

        public SiteStatusViewsFactory​(java.io.InputStream stream)
                               throws java.io.IOException

        Constructor for SiteStatusViewsFactory.

        Parameters:
        stream - a InputStream object.
        Throws:
        java.io.IOException
    • Method Detail

      • init

        public static void init()
                         throws java.io.IOException,
                                java.io.FileNotFoundException
        Be sure to call this method before calling getInstance().
        Throws:
        java.io.IOException - if any.
        java.io.FileNotFoundException - if any.
      • 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
      • reload

        public void reload()
                    throws java.io.IOException,
                           java.io.FileNotFoundException

        reload

        Throws:
        java.io.IOException - if any.
        java.io.FileNotFoundException - if any.
      • getView

        public View getView​(java.lang.String viewName)
                     throws java.io.IOException
        Can't be null
        Parameters:
        viewName - a String object.
        Returns:
        a View object.
        Throws:
        java.io.IOException - if any.
      • updateFromFile

        protected void updateFromFile()
                               throws java.io.IOException
        Reload the viewsdisplay.xml file if it has been changed since we last read it.
        Throws:
        java.io.IOException - if any.
      • getViewsMap

        public static java.util.Map<java.lang.String,​View> getViewsMap()

        getViewsMap

        Returns:
        a Map object.
      • setViewsMap

        public static void setViewsMap​(java.util.Map<java.lang.String,​View> map)

        setViewsMap

        Parameters:
        map - a Map object.