Class SurveillanceViewProvider


  • public class SurveillanceViewProvider
    extends java.lang.Object
    This class is used for loading, holding and saving of SurveillanceViewConfiguration definitions.
    Author:
    Christian Pape
    • Method Detail

      • getInstance

        public static SurveillanceViewProvider getInstance()
        Method to return the instance of this singleton.
        Returns:
        the singleton instance
      • save

        public void save()
        This method saves the data represented by this object to disk.
      • load

        public void load()
        This method loads the configuration data from disk.
      • containsView

        public boolean containsView​(java.lang.String name)
        Checks whether this object contains View data concerning the given title.
        Parameters:
        name - the title to search for
        Returns:
        true, if a View with the given name exists, false otherwise
      • getView

        public View getView​(java.lang.String name)
        Returns the View for the given title.
        Parameters:
        name - the title to search for
        Returns:
        the View instance if found, null otherwise
      • replaceView

        public void replaceView​(View oldView,
                                View newView)
        Replaces a View with a new one.
        Parameters:
        oldView - the old view to be replaced
        newView - the new view
      • getDefaultView

        public View getDefaultView()
        Returns the default View.
        Returns:
        the View instance if found, null otherwise
      • getSurveillanceViewConfiguration

        public SurveillanceViewConfiguration getSurveillanceViewConfiguration()
        Returns the loaded org.opennms.features.vaadin.surveillanceviews.model.SurveillanceViewConfiguration instance
        Returns:
        the loaded config instance
      • containsView

        public boolean containsView​(View view)
        Checks whether this object contains a given View instance.
        Parameters:
        view - the View instance to search for
        Returns:
        true, if the View exists, false otherwise
      • addView

        public void addView​(View view)
        This method adds a View to this provider.
        Parameters:
        view - the View instance to be added
      • removeView

        public void removeView​(View view)
        This method removes a View from this provider.
        Parameters:
        view - the View instance to be removed