Class SurveillanceViewProvider
- java.lang.Object
-
- org.opennms.features.vaadin.surveillanceviews.config.SurveillanceViewProvider
-
public class SurveillanceViewProvider extends java.lang.ObjectThis class is used for loading, holding and saving ofSurveillanceViewConfigurationdefinitions.- Author:
- Christian Pape
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddView(View view)This method adds aViewto this provider.booleancontainsView(java.lang.String name)Checks whether this object containsViewdata concerning the given title.booleancontainsView(View view)Checks whether this object contains a givenViewinstance.ViewgetDefaultView()Returns the defaultView.static SurveillanceViewProvidergetInstance()Method to return the instance of this singleton.SurveillanceViewConfigurationgetSurveillanceViewConfiguration()Returns the loadedorg.opennms.features.vaadin.surveillanceviews.model.SurveillanceViewConfigurationinstanceViewgetView(java.lang.String name)Returns theViewfor the given title.voidload()This method loads the configuration data from disk.voidremoveView(View view)This method removes aViewfrom this provider.voidreplaceView(View oldView, View newView)Replaces aViewwith a new one.voidsave()This method saves the data represented by this object to disk.
-
-
-
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 containsViewdata concerning the given title.- Parameters:
name- the title to search for- Returns:
- true, if a
Viewwith the given name exists, false otherwise
-
getView
public View getView(java.lang.String name)
Returns theViewfor the given title.- Parameters:
name- the title to search for- Returns:
- the
Viewinstance if found, null otherwise
-
replaceView
public void replaceView(View oldView, View newView)
Replaces aViewwith a new one.- Parameters:
oldView- the old view to be replacednewView- the new view
-
getDefaultView
public View getDefaultView()
Returns the defaultView.- Returns:
- the
Viewinstance if found, null otherwise
-
getSurveillanceViewConfiguration
public SurveillanceViewConfiguration getSurveillanceViewConfiguration()
Returns the loadedorg.opennms.features.vaadin.surveillanceviews.model.SurveillanceViewConfigurationinstance- Returns:
- the loaded config instance
-
containsView
public boolean containsView(View view)
Checks whether this object contains a givenViewinstance.
-
addView
public void addView(View view)
This method adds aViewto this provider.- Parameters:
view- theViewinstance to be added
-
-