Class MetricDescriptionSelectionWizardModel
- java.lang.Object
-
- org.palladiosimulator.measurementsui.wizardmodel.pages.MetricDescriptionSelectionWizardModel
-
- All Implemented Interfaces:
WizardModel
public class MetricDescriptionSelectionWizardModel extends Object implements WizardModel
Provides all methods to edit the MeasurementSpecifications of a monitor in the wizard
-
-
Constructor Summary
Constructors Constructor Description MetricDescriptionSelectionWizardModel(org.palladiosimulator.monitorrepository.Monitor monitor, boolean isEditing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllMetricDescriptions()
Add all unused MetricDescriptions to the monitorvoid
addMeasurementSpecification(org.palladiosimulator.monitorrepository.MeasurementSpecification selectedMeasurementSpecification)
Adds a MeasurementSpecification with a MetricDescription to the monitorboolean
canFinish()
String
getInfoText()
String
getTextualDescriptionForMetricDescription(org.palladiosimulator.monitorrepository.MeasurementSpecification aMeasurementSpecification)
Provides the textual description for the metric description of a measurement specification.String
getTitleText()
org.palladiosimulator.monitorrepository.Monitor
getUnusedMetricsMonitor()
org.palladiosimulator.monitorrepository.Monitor
getUsedMetricsMonitor()
void
initUnusedMetrics(org.palladiosimulator.monitorrepository.Monitor usedMonitor, boolean expertMode)
unusedMetrics initialized when page is visible, since information from second page is required to correctly initialize the unusedMetrics Monitor.void
moveAllSuggested()
Moves only the suggested Metric Specs to the monitor.void
removeAllMetricDescriptions()
Remove all MetricDescriptions from the monitorvoid
removeMeasurementSpecification(org.palladiosimulator.monitorrepository.MeasurementSpecification selectedMeasurementSpecification)
Removes a MeasurementSpecifcation with a MetricDescription from the monitorvoid
switchTriggerSelfAdapting(org.palladiosimulator.monitorrepository.MeasurementSpecification mspec)
Switches the attribute triggerSelfAdaption of a specific measurementSpecification
-
-
-
Constructor Detail
-
MetricDescriptionSelectionWizardModel
public MetricDescriptionSelectionWizardModel(org.palladiosimulator.monitorrepository.Monitor monitor, boolean isEditing)
- Parameters:
monitor
- the monitor where metricDescriptions will be added or removedisEditing
- states whether the model edits an existing monitor or creates a new one.
-
-
Method Detail
-
initUnusedMetrics
public void initUnusedMetrics(org.palladiosimulator.monitorrepository.Monitor usedMonitor, boolean expertMode)
unusedMetrics initialized when page is visible, since information from second page is required to correctly initialize the unusedMetrics Monitor.- Parameters:
usedMonitor
-
-
canFinish
public boolean canFinish()
- Specified by:
canFinish
in interfaceWizardModel
- Returns:
- true if all necessary attributes are set in order to finish
-
getInfoText
public String getInfoText()
- Specified by:
getInfoText
in interfaceWizardModel
- Returns:
- an info text based on the changes made in the model.
-
getUnusedMetricsMonitor
public org.palladiosimulator.monitorrepository.Monitor getUnusedMetricsMonitor()
- Returns:
- a monitor with all unused metric descriptions
-
getUsedMetricsMonitor
public org.palladiosimulator.monitorrepository.Monitor getUsedMetricsMonitor()
- Returns:
- a monitor with all used metric descriptions
-
addMeasurementSpecification
public void addMeasurementSpecification(org.palladiosimulator.monitorrepository.MeasurementSpecification selectedMeasurementSpecification)
Adds a MeasurementSpecification with a MetricDescription to the monitor- Parameters:
selectedMeasurementSpecification
- the specification which will be added to the monitor
-
removeMeasurementSpecification
public void removeMeasurementSpecification(org.palladiosimulator.monitorrepository.MeasurementSpecification selectedMeasurementSpecification)
Removes a MeasurementSpecifcation with a MetricDescription from the monitor- Parameters:
selectedMeasurementSpecification
- the specification which will be added to the monitor
-
addAllMetricDescriptions
public void addAllMetricDescriptions()
Add all unused MetricDescriptions to the monitor
-
removeAllMetricDescriptions
public void removeAllMetricDescriptions()
Remove all MetricDescriptions from the monitor
-
moveAllSuggested
public void moveAllSuggested()
Moves only the suggested Metric Specs to the monitor.
-
switchTriggerSelfAdapting
public void switchTriggerSelfAdapting(org.palladiosimulator.monitorrepository.MeasurementSpecification mspec)
Switches the attribute triggerSelfAdaption of a specific measurementSpecification- Parameters:
currentValue
-mspec
- the MeasurementSpecification where the triggerSelfAdaptiong attribute will be changed
-
getTitleText
public String getTitleText()
- Specified by:
getTitleText
in interfaceWizardModel
- Returns:
- the title of the wizard page
-
getTextualDescriptionForMetricDescription
public String getTextualDescriptionForMetricDescription(org.palladiosimulator.monitorrepository.MeasurementSpecification aMeasurementSpecification)
Provides the textual description for the metric description of a measurement specification. Used for showing the description of the metric description in the title of the third page.- Parameters:
aMeasurementSpecification
-- Returns:
- The textual Description in String form
-
-