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 org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, IOException
Constructor for SiteStatusViewsFactory.
configFile - a String object.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.IOException - if any.public SiteStatusViewsFactory(InputStream stream) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
Constructor for SiteStatusViewsFactory.
stream - a InputStream object.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.public static void init()
throws IOException,
FileNotFoundException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - if any.FileNotFoundException - if any.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - 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,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
reload
IOException - if any.FileNotFoundException - if any.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.public View getView(String viewName) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
viewName - a String object.View object.IOException - if any.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.protected void updateFromFile()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - if any.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.public static SiteStatusViewConfiguration getConfig()
getConfig
SiteStatusViewConfiguration object.public static void setConfig(SiteStatusViewConfiguration m_config)
setConfig
m_config - a SiteStatusViewConfiguration object.Copyright © 2017. All rights reserved.