public class SiteStatusViewsFactory extends Object
| Modifier and Type | Field and Description | 
|---|---|
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 Map<String,View> | 
m_viewsMap
Map of view objects by name. 
 | 
| Constructor and Description | 
|---|
SiteStatusViewsFactory(InputStream stream)
Constructor for SiteStatusViewsFactory. 
 | 
SiteStatusViewsFactory(String configFile)
Constructor for SiteStatusViewsFactory. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static SiteStatusViewConfiguration | 
getConfig()
getConfig 
 | 
static SiteStatusViewsFactory | 
getInstance()
Singleton static call to get the only instance that should exist for the
 ViewsDisplayFactory 
 | 
View | 
getView(String viewName)
Can't be null 
 | 
static Map<String,View> | 
getViewsMap()
getViewsMap 
 | 
static void | 
init()
Be sure to call this method before calling getInstance(). 
 | 
void | 
reload()
reload 
 | 
static void | 
setConfig(SiteStatusViewConfiguration m_config)
setConfig 
 | 
static void | 
setInstance(SiteStatusViewsFactory instance)
setInstance 
 | 
static void | 
setViewsMap(Map<String,View> map)
setViewsMap 
 | 
protected void | 
updateFromFile()
Reload the viewsdisplay.xml file if it has been changed since we last
 read it. 
 | 
protected boolean initialized
protected static long m_lastModified
public SiteStatusViewsFactory(String configFile) throws IOException
Constructor for SiteStatusViewsFactory.
configFile - a String object.IOException - if any.public SiteStatusViewsFactory(InputStream stream) throws IOException
Constructor for SiteStatusViewsFactory.
stream - a InputStream object.IOExceptionpublic static void init()
                 throws IOException,
                        FileNotFoundException
IOException - if any.FileNotFoundException - if any.public static SiteStatusViewsFactory getInstance()
IllegalStateException - if init has not been calledpublic static void setInstance(SiteStatusViewsFactory instance)
setInstance
instance - a SiteStatusViewsFactory object.public void reload()
            throws IOException,
                   FileNotFoundException
reload
IOException - if any.FileNotFoundException - if any.public View getView(String viewName) throws IOException
viewName - a String object.View object.IOException - if any.protected void updateFromFile()
                       throws IOException
IOException - if any.public static SiteStatusViewConfiguration getConfig()
getConfig
SiteStatusViewConfiguration object.public static void setConfig(SiteStatusViewConfiguration m_config)
setConfig
m_config - a SiteStatusViewConfiguration object.Copyright © 2020. All rights reserved.