Class SloThresholdWizardModel
- java.lang.Object
-
- org.palladiosimulator.measurementsui.wizardmodel.pages.SloThresholdWizardModel
-
- All Implemented Interfaces:
WizardModelSlo
public class SloThresholdWizardModel extends Object implements WizardModelSlo
WizardModel for the creating and editing thresholds for service level objectives
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SloThresholdWizardModel.fuzzyThresholdType
-
Constructor Summary
Constructors Constructor Description SloThresholdWizardModel(SloProvider dataProvider, boolean isEditing)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canFinish()
This method returns true if the Threshold Selection Page contains all necessary information.void
deleteLowerThreshold()
Deletes the lower threshold in the current Service Level Objectivevoid
deleteUpperThreshold()
Deletes the upper threshold in the current Service Level Objectivejavax.measure.unit.Unit<?>
getDefaultUnit()
This method returns the default unit for the previous selected measurement specification.String
getInfoText()
Returns info text displayed in the WizardPageorg.palladiosimulator.servicelevelobjective.ServiceLevelObjective
getSlo()
Returns the current Service Level Objective from the SloProviderString
getSpecificationType()
String
getTitleText()
Returns title text displayed in the WizardPagevoid
setFinishable(boolean isFinishable)
Sets Wizard finishable.void
setLowerThreshold(Float hard, String hardUnit)
Creates and sets a lower hard Threshold to a Service Level Objective.void
setLowerThreshold(Float hard, String hardUnit, Float fuzzy, String fuzzyUnit, SloThresholdWizardModel.fuzzyThresholdType type)
Creates and sets a lower fuzzy Threshold to a Service Level Objective.void
setUpperThreshold(Float hard, String hardUnit)
Creates and sets an upper hard Threshold to a Service Level Objective.void
setUpperThreshold(Float hard, String hardUnit, Float fuzzy, String fuzzyUnit, SloThresholdWizardModel.fuzzyThresholdType type)
Creates and sets an upper fuzzy Threshold to a Service Level Objective.boolean
sloIsNull()
This method checks if Service Level Objective is valid
-
-
-
Constructor Detail
-
SloThresholdWizardModel
public SloThresholdWizardModel(SloProvider dataProvider, boolean isEditing)
Constructor- Parameters:
slo
- the service level objective to editisEditing
- indicates whether we are in edit mode or creation mode
-
-
Method Detail
-
canFinish
public boolean canFinish()
This method returns true if the Threshold Selection Page contains all necessary information.- Specified by:
canFinish
in interfaceWizardModelSlo
- Returns:
- true if user has chosen a valid threshold
-
setFinishable
public void setFinishable(boolean isFinishable)
Sets Wizard finishable. Used by the SloThresholdPage if threshold is valid or not
-
getInfoText
public String getInfoText()
Description copied from interface:WizardModelSlo
Returns info text displayed in the WizardPage- Specified by:
getInfoText
in interfaceWizardModelSlo
- Returns:
- an info text based on the changes made in the model.
-
getTitleText
public String getTitleText()
Description copied from interface:WizardModelSlo
Returns title text displayed in the WizardPage- Specified by:
getTitleText
in interfaceWizardModelSlo
- Returns:
- the title of the wizard page
-
getSlo
public org.palladiosimulator.servicelevelobjective.ServiceLevelObjective getSlo()
Returns the current Service Level Objective from the SloProvider
-
setLowerThreshold
public void setLowerThreshold(Float hard, String hardUnit, Float fuzzy, String fuzzyUnit, SloThresholdWizardModel.fuzzyThresholdType type)
Creates and sets a lower fuzzy Threshold to a Service Level Objective.- Parameters:
hard
- the value for the hard thresholdhardUnit
- the unit for the hard thresholdfuzzy
- the value for the fuzzy thresholdfuzzyUnit
- the unit for the fuzzy thresholdtype
- the type of the fuzzy threshold
-
setLowerThreshold
public void setLowerThreshold(Float hard, String hardUnit)
Creates and sets a lower hard Threshold to a Service Level Objective.- Parameters:
hard
- the value for the hard thresholdhardUnit
- the unit for the hard threshold
-
setUpperThreshold
public void setUpperThreshold(Float hard, String hardUnit, Float fuzzy, String fuzzyUnit, SloThresholdWizardModel.fuzzyThresholdType type)
Creates and sets an upper fuzzy Threshold to a Service Level Objective.- Parameters:
hard
- the value for the hard thresholdhardUnit
- the unit for the hard thresholdfuzzy
- the value for the fuzzy thresholdfuzzyUnit
- the unit for the fuzzy thresholdtype
- the type of the fuzzy threshold
-
setUpperThreshold
public void setUpperThreshold(Float hard, String hardUnit)
Creates and sets an upper hard Threshold to a Service Level Objective.- Parameters:
hard
- the value for the hard thresholdhardUnit
- the unit for the hard threshold
-
getDefaultUnit
public javax.measure.unit.Unit<?> getDefaultUnit()
This method returns the default unit for the previous selected measurement specification.- Returns:
- returns the default unit
-
getSpecificationType
public String getSpecificationType()
-
deleteLowerThreshold
public void deleteLowerThreshold()
Deletes the lower threshold in the current Service Level Objective
-
deleteUpperThreshold
public void deleteUpperThreshold()
Deletes the upper threshold in the current Service Level Objective
-
sloIsNull
public boolean sloIsNull()
This method checks if Service Level Objective is valid- Returns:
- returns true if Service Level Objective is null
-
-