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
  • Constructor Details

    • SloThresholdWizardModel

      public SloThresholdWizardModel(SloProvider dataProvider, boolean isEditing)
      Constructor
      Parameters:
      slo - the service level objective to edit
      isEditing - indicates whether we are in edit mode or creation mode
  • Method Details

    • canFinish

      public boolean canFinish()
      This method returns true if the Threshold Selection Page contains all necessary information.
      Specified by:
      canFinish in interface WizardModelSlo
      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 interface WizardModelSlo
      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 interface WizardModelSlo
      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 threshold
      hardUnit - the unit for the hard threshold
      fuzzy - the value for the fuzzy threshold
      fuzzyUnit - the unit for the fuzzy threshold
      type - 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 threshold
      hardUnit - 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 threshold
      hardUnit - the unit for the hard threshold
      fuzzy - the value for the fuzzy threshold
      fuzzyUnit - the unit for the fuzzy threshold
      type - 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 threshold
      hardUnit - 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