|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.ViewsDisplayFactory
public class ViewsDisplayFactory
| Field Summary | |
|---|---|
protected boolean |
initialized
Boolean indicating if the init() method has been called. |
protected long |
m_lastModified
Timestamp of the viewDisplay file, used to know when to reload from disk. |
protected java.io.File |
m_viewsDisplayFile
File path of groups.xml. |
protected java.util.Map<java.lang.String,org.opennms.netmgt.config.viewsdisplay.View> |
m_viewsMap
Map of view objects by name. |
| Constructor Summary | |
|---|---|
ViewsDisplayFactory(java.lang.String file)
|
|
| Method Summary | |
|---|---|
org.opennms.netmgt.config.viewsdisplay.View |
getDefaultView()
|
int |
getDisconnectTimeout()
|
static ViewsDisplayFactory |
getInstance()
Singleton static call to get the only instance that should exist for the ViewsDisplayFactory |
org.opennms.netmgt.config.viewsdisplay.View |
getView(java.lang.String viewName)
Can be null |
java.io.File |
getViewsDisplayFile()
|
static void |
init()
Be sure to call this method before calling getInstance(). |
void |
reload()
Parses the viewsdisplay.xml via the Castor classes |
static void |
setInstance(ViewsDisplayFactory instance)
|
void |
setViewsDisplayFile(java.io.File viewsDisplayFile)
|
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 |
|---|
protected java.io.File m_viewsDisplayFile
protected boolean initialized
protected long m_lastModified
protected java.util.Map<java.lang.String,org.opennms.netmgt.config.viewsdisplay.View> m_viewsMap
| Constructor Detail |
|---|
public ViewsDisplayFactory(java.lang.String file)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
java.io.FileNotFoundException,
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.io.FileNotFoundException
java.io.IOException| Method Detail |
|---|
public static void init()
throws java.io.IOException,
java.io.FileNotFoundException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException
java.io.FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic static ViewsDisplayFactory getInstance()
java.lang.IllegalStateException - if init has not been called
public void reload()
throws java.io.IOException,
java.io.FileNotFoundException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException
java.io.FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic void setViewsDisplayFile(java.io.File viewsDisplayFile)
public java.io.File getViewsDisplayFile()
throws java.io.IOException
java.io.IOException
public org.opennms.netmgt.config.viewsdisplay.View getView(java.lang.String viewName)
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic org.opennms.netmgt.config.viewsdisplay.View getDefaultView()
protected void updateFromFile()
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic static void setInstance(ViewsDisplayFactory instance)
public int getDisconnectTimeout()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||