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 classSloThresholdWizardModel.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 booleancanFinish()This method returns true if the Threshold Selection Page contains all necessary information.voiddeleteLowerThreshold()Deletes the lower threshold in the current Service Level ObjectivevoiddeleteUpperThreshold()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.StringgetInfoText()Returns info text displayed in the WizardPageorg.palladiosimulator.servicelevelobjective.ServiceLevelObjectivegetSlo()Returns the current Service Level Objective from the SloProviderStringgetSpecificationType()StringgetTitleText()Returns title text displayed in the WizardPagevoidsetFinishable(boolean isFinishable)Sets Wizard finishable.voidsetLowerThreshold(Float hard, String hardUnit)Creates and sets a lower hard Threshold to a Service Level Objective.voidsetLowerThreshold(Float hard, String hardUnit, Float fuzzy, String fuzzyUnit, SloThresholdWizardModel.fuzzyThresholdType type)Creates and sets a lower fuzzy Threshold to a Service Level Objective.voidsetUpperThreshold(Float hard, String hardUnit)Creates and sets an upper hard Threshold to a Service Level Objective.voidsetUpperThreshold(Float hard, String hardUnit, Float fuzzy, String fuzzyUnit, SloThresholdWizardModel.fuzzyThresholdType type)Creates and sets an upper fuzzy Threshold to a Service Level Objective.booleansloIsNull()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:
canFinishin 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:WizardModelSloReturns info text displayed in the WizardPage- Specified by:
getInfoTextin interfaceWizardModelSlo- Returns:
- an info text based on the changes made in the model.
-
getTitleText
public String getTitleText()
Description copied from interface:WizardModelSloReturns title text displayed in the WizardPage- Specified by:
getTitleTextin 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
-
-