OpenNMS API 1.2.9

## org.opennms.netmgt.config
Class ViewsDisplayFactory

    java.lang.Object
      org.opennms.netmgt.config.ViewsDisplayFactory

public class ViewsDisplayFactory
extends java.lang.Object

Field Summary
`protected boolean` `initialized` Boolean indicating if the init() method has been called.
`private static ViewsDisplayFactory` `instance` The singleton instance.
`protected long` `lastModified` Timestamp of the viewDisplay file, used to know when to reload from disk.
`protected java.io.File` `viewsDisplayFile` File path of groups.xml.
`protected java.util.Map` `viewsMap` Map of view objects by name.

Constructor Summary
`private` `ViewsDisplayFactory()` Empty private constructor so this class cannot be instantiated outside itself.

Method Summary
`static ViewsDisplayFactory` `getInstance()` Singleton static call to get the only instance that should exist for the ViewsDisplayFactory
`View` `getView(java.lang.String viewName)` Can be null
`static void` `init()` Be sure to call this method before calling getInstance().
`void` `reload()` Parses the viewsdisplay.xml via the Castor classes
`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

### instance

    private static ViewsDisplayFactory instance

  The singleton instance.

### viewsDisplayFile

    protected java.io.File viewsDisplayFile

  File path of groups.xml.

### initialized

    protected boolean initialized

  Boolean indicating if the init() method has been called.

### lastModified

    protected long lastModified

  Timestamp of the viewDisplay file, used to know when to reload from disk.

### viewsMap

    protected java.util.Map viewsMap

  Map of view objects by name.

Constructor Detail

### ViewsDisplayFactory

    private ViewsDisplayFactory()

  Empty private constructor so this class cannot be instantiated outside itself.

Method Detail

### init

    public static void init()
                     throws java.io.IOException,
                            java.io.FileNotFoundException,
                            org.exolab.castor.xml.MarshalException,
                            org.exolab.castor.xml.ValidationException

  Be sure to call this method before calling getInstance().

  Throws:
    `java.io.IOException`
    `java.io.FileNotFoundException`
    `org.exolab.castor.xml.MarshalException`
    `org.exolab.castor.xml.ValidationException`

### getInstance

    public static ViewsDisplayFactory 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,
                       org.exolab.castor.xml.MarshalException,
                       org.exolab.castor.xml.ValidationException

  Parses the viewsdisplay.xml via the Castor classes

  Throws:
    `java.io.IOException`
    `java.io.FileNotFoundException`
    `org.exolab.castor.xml.MarshalException`
    `org.exolab.castor.xml.ValidationException`

### getView

    public View getView(java.lang.String viewName)
                 throws java.io.IOException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException

  Can be null

  Throws:
    `java.io.IOException`
    `org.exolab.castor.xml.MarshalException`
    `org.exolab.castor.xml.ValidationException`

### updateFromFile

    protected void updateFromFile()
                           throws java.io.IOException,
                                  org.exolab.castor.xml.MarshalException,
                                  org.exolab.castor.xml.ValidationException

  Reload the viewsdisplay.xml file if it has been changed since we last read it.

  Throws:
    `java.io.IOException`
    `org.exolab.castor.xml.MarshalException`
    `org.exolab.castor.xml.ValidationException`

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.