Class AbstractDashletFactory
- java.lang.Object
-
- org.opennms.features.vaadin.dashboard.model.AbstractDashletFactory
-
- All Implemented Interfaces:
DashletFactory
- Direct Known Subclasses:
AlarmDetailsDashletFactory,AlarmsDashletFactory,BSMDashletFactory,ChartsDashletFactory,GrafanaDashletFactory,ImageDashletFactory,KscDashletFactory,MapDashletFactory,RrdDashletFactory,RtcDashletFactory,SummaryDashletFactory,SurveillanceDashletFactory,TopologyDashletFactory,UndefinedDashletFactory,UrlDashletFactory
public abstract class AbstractDashletFactory extends java.lang.Object implements DashletFactory
This class represents an abstract factory for instantiatingDashletobjects.- Author:
- Christian Pape
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_boostableboostable flagprotected booleanm_dashboardSuitableAre this dashlet suitable for displaying in the dashboard view.protected java.lang.Stringm_nameThe name of the providedDashletprotected java.util.Map<java.lang.String,java.lang.String>m_requiredParameterDescriptionsA map holding the required parameter descriptions for theDashletprotected java.util.Map<java.lang.String,java.lang.String>m_requiredParametersA map holding the required parameters for theDashlet
-
Constructor Summary
Constructors Constructor Description AbstractDashletFactory()Constructor for instantiating a new factory.AbstractDashletFactory(java.lang.String name)Constructor for instantiating a new factory with the given name.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddRequiredParameter(java.lang.String key, java.lang.String defaultValue)Add a required parameter for this factory.DashletConfigurationWindowconfigurationWindow(DashletSpec dashletSpec)Returns the window used for configuring aDashletSpecinstance.com.vaadin.ui.ComponentgetHelpComponent()Returns the help component for theDashlet.abstract java.lang.StringgetHelpContentHTML()Returns the help contentStringjava.lang.StringgetName()Returns the name of theDashletinstances this object provides.java.util.Map<java.lang.String,java.lang.String>getRequiredParameterDescriptions()Returns theMapwith the required parameter descriptions.java.util.Map<java.lang.String,java.lang.String>getRequiredParameters()Returns theMapwith the required parameters and default values.booleanisBoostable()This method returns whether this dashlet is boostable.booleanisSuitableForDashboard()Returns whether this dashlet is suitable for displaying in the dashboard view.booleanprovidesHelpComponent()Returns true, if the factory provides a help component for theDashlet.voidsetBoostable(boolean boostable)This method sets the boostable flag.voidsetDashboardSuitable(boolean dashletSuitable)This method sets whether this dashlet is suitable for displaying in the dashboard view.voidsetName(java.lang.String name)Sets the name of theDashletinstances this object provides.voidsetRequiredParameterDescriptions(java.util.Map<java.lang.String,java.lang.String> requiredParameterDescriptions)This method sets the required parameter descriptionsMap.voidsetRequiredParameters(java.util.Map<java.lang.String,java.lang.String> requiredParameters)This method sets the required parametersMap.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.features.vaadin.dashboard.model.DashletFactory
newDashletInstance
-
-
-
-
Field Detail
-
m_name
protected java.lang.String m_name
The name of the providedDashlet
-
m_requiredParameters
protected java.util.Map<java.lang.String,java.lang.String> m_requiredParameters
A map holding the required parameters for theDashlet
-
m_requiredParameterDescriptions
protected java.util.Map<java.lang.String,java.lang.String> m_requiredParameterDescriptions
A map holding the required parameter descriptions for theDashlet
-
m_boostable
protected boolean m_boostable
boostable flag
-
m_dashboardSuitable
protected boolean m_dashboardSuitable
Are this dashlet suitable for displaying in the dashboard view.
-
-
Method Detail
-
addRequiredParameter
protected void addRequiredParameter(java.lang.String key, java.lang.String defaultValue)Add a required parameter for this factory.- Parameters:
key- the key to usedefaultValue- the default value for this parameter
-
getName
public java.lang.String getName()
Returns the name of theDashletinstances this object provides.- Specified by:
getNamein interfaceDashletFactory- Returns:
- the name
-
setName
public void setName(java.lang.String name)
Sets the name of theDashletinstances this object provides.- Parameters:
name- the name
-
getRequiredParameters
public java.util.Map<java.lang.String,java.lang.String> getRequiredParameters()
Returns theMapwith the required parameters and default values.- Specified by:
getRequiredParametersin interfaceDashletFactory- Returns:
- the
Mapholding the requires parameters
-
getRequiredParameterDescriptions
public java.util.Map<java.lang.String,java.lang.String> getRequiredParameterDescriptions()
Returns theMapwith the required parameter descriptions.- Returns:
- the
Mapholding the requires parameter descriptions
-
setRequiredParameters
public void setRequiredParameters(java.util.Map<java.lang.String,java.lang.String> requiredParameters)
This method sets the required parametersMap.- Parameters:
requiredParameters- the parameterMapto be set
-
setRequiredParameterDescriptions
public void setRequiredParameterDescriptions(java.util.Map<java.lang.String,java.lang.String> requiredParameterDescriptions)
This method sets the required parameter descriptionsMap.- Parameters:
requiredParameterDescriptions- the parameter descriptionMapto be set
-
setBoostable
public void setBoostable(boolean boostable)
This method sets the boostable flag.
-
setDashboardSuitable
public void setDashboardSuitable(boolean dashletSuitable)
This method sets whether this dashlet is suitable for displaying in the dashboard view.
-
isSuitableForDashboard
public boolean isSuitableForDashboard()
Returns whether this dashlet is suitable for displaying in the dashboard view.- Specified by:
isSuitableForDashboardin interfaceDashletFactory- Returns:
- true if suitable, false otherwise
-
isBoostable
public boolean isBoostable()
This method returns whether this dashlet is boostable.- Specified by:
isBoostablein interfaceDashletFactory
-
providesHelpComponent
public boolean providesHelpComponent()
Returns true, if the factory provides a help component for theDashlet.- Specified by:
providesHelpComponentin interfaceDashletFactory- Returns:
- true, if help component is provided, false otherwise
-
getHelpComponent
public com.vaadin.ui.Component getHelpComponent()
Returns the help component for theDashlet.- Specified by:
getHelpComponentin interfaceDashletFactory- Returns:
- the help component
-
getHelpContentHTML
public abstract java.lang.String getHelpContentHTML()
Returns the help contentString- Returns:
- the help content
-
configurationWindow
public DashletConfigurationWindow configurationWindow(DashletSpec dashletSpec)
Returns the window used for configuring aDashletSpecinstance.- Specified by:
configurationWindowin interfaceDashletFactory- Parameters:
dashletSpec- theDashletSpecinstance- Returns:
- the
DashletConfigurationWindow
-
-