|
|||||||||
| 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 File |
m_viewsDisplayFile
File path of groups.xml. |
protected Map<String,View> |
m_viewsMap
Map of view objects by name. |
| Constructor Summary | |
|---|---|
ViewsDisplayFactory(String file)
|
|
| Method Summary | |
|---|---|
View |
getDefaultView()
|
int |
getDisconnectTimeout()
|
static ViewsDisplayFactory |
getInstance()
Singleton static call to get the only instance that should exist for the ViewsDisplayFactory |
View |
getView(String viewName)
Can be null |
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(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 File m_viewsDisplayFile
protected boolean initialized
protected long m_lastModified
protected Map<String,View> m_viewsMap
| Constructor Detail |
|---|
public ViewsDisplayFactory(String file)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
FileNotFoundException,
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
FileNotFoundException
IOException| Method Detail |
|---|
public static void init()
throws IOException,
FileNotFoundException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic static ViewsDisplayFactory getInstance()
IllegalStateException - if init has not been called
public void reload()
throws IOException,
FileNotFoundException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic void setViewsDisplayFile(File viewsDisplayFile)
public File getViewsDisplayFile()
throws IOException
IOException
public View getView(String viewName)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic View getDefaultView()
protected void updateFromFile()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
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 | ||||||||