Class ResourceEditorImpl

java.lang.Object
org.palladiosimulator.measurementsui.datamanipulation.ResourceEditorImpl
All Implemented Interfaces:
ResourceEditor

public final class ResourceEditorImpl extends Object implements ResourceEditor
Class for editing resources without use of parsley
  • Method Details

    • getInstance

      public static ResourceEditorImpl getInstance()
      Returns the instance of the ResourceEditorImpl
      Returns:
      instance of the ResourceEditorImpl
    • setResourceName

      public void setResourceName(EObject resource, String newName)
      Description copied from interface: ResourceEditor
      Changes the EntityName of a resource through EMF Commands.
      Specified by:
      setResourceName in interface ResourceEditor
      Parameters:
      resource - The resource to change the name
      newName - The new name of the resource
    • changeMonitorActive

      public void changeMonitorActive(EObject monitor, boolean currentBool)
      Description copied from interface: ResourceEditor
      Changes the current status of "activated" to its negative through EMF Commands.
      Specified by:
      changeMonitorActive in interface ResourceEditor
      Parameters:
      monitor - the monitor to change
      currentBool - the value to change
    • changeTriggersSelfAdapting

      public void changeTriggersSelfAdapting(org.palladiosimulator.monitorrepository.MeasurementSpecification mspec)
      Description copied from interface: ResourceEditor
      Changes current bool triggers self adapting to its negative through EMF Commands.
      Specified by:
      changeTriggersSelfAdapting in interface ResourceEditor
      Parameters:
      mspec - the measurement specification to change
    • setMeasuringPointToMonitor

      public void setMeasuringPointToMonitor(EObject monitor, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint mp)
      Description copied from interface: ResourceEditor
      alternative method to set measuring points, if it is not possible with parsley. Current MP is overwritten through new MP.
      Specified by:
      setMeasuringPointToMonitor in interface ResourceEditor
    • setMeasuringPointToMonitor

      public void setMeasuringPointToMonitor(EObject monitor, EObject mp)
      Description copied from interface: ResourceEditor
      Binds a Measuring Point to a Monitor using EMF Command.
      Specified by:
      setMeasuringPointToMonitor in interface ResourceEditor
    • addMeasuringPointToRepository

      public void addMeasuringPointToRepository(EObject mpRep, EObject mp)
      Description copied from interface: ResourceEditor
      alternative method to add measuring points, if it is not possible with parsley. New MP is appended to MPRepository.
      Specified by:
      addMeasuringPointToRepository in interface ResourceEditor
    • addServiceLevelObjectiveToRepository

      public void addServiceLevelObjectiveToRepository(EObject sloRep, EObject slo)
      Description copied from interface: ResourceEditor
      Sets the name of the Service Level Objective using EMF Set Command.
      Specified by:
      addServiceLevelObjectiveToRepository in interface ResourceEditor
    • deleteResource

      public void deleteResource(EObject objToDelete)
      Description copied from interface: ResourceEditor
      Delete the passed EObject.
      Specified by:
      deleteResource in interface ResourceEditor
    • deleteMultipleResources

      public void deleteMultipleResources(EList<org.palladiosimulator.monitorrepository.MeasurementSpecification> objsToDelete)
      Description copied from interface: ResourceEditor
      Delete a List of MeasurementSpecifications, specifically for deleting mspecs out of the wizard monitor in edit mode in the 3rd page.
      Specified by:
      deleteMultipleResources in interface ResourceEditor
    • setMetricDescription

      public void setMetricDescription(EObject aMeasurementSpecification, org.palladiosimulator.metricspec.MetricDescription aMetricDescription)
      Description copied from interface: ResourceEditor
      Sets MetricDescription for a MeasurementSpecification using EMF Commands.
      Specified by:
      setMetricDescription in interface ResourceEditor
    • addMeasurementSpecificationToMonitor

      public void addMeasurementSpecificationToMonitor(EObject monitor, org.palladiosimulator.monitorrepository.MeasurementSpecification mspec)
      Description copied from interface: ResourceEditor
      Appends a new MeasurementSpecification to the list of MeasurementSpecifications for the monitor.
      Specified by:
      addMeasurementSpecificationToMonitor in interface ResourceEditor
      Parameters:
      monitor - The Monitor to which the new specification is added
    • addMeasurementSpecificationsToMonitor

      public void addMeasurementSpecificationsToMonitor(EObject monitor, EList<org.palladiosimulator.monitorrepository.MeasurementSpecification> mSpecList)
      Specified by:
      addMeasurementSpecificationsToMonitor in interface ResourceEditor
    • addMonitorToRepository

      public void addMonitorToRepository(EObject monitorRepository, EObject monitor)
      Description copied from interface: ResourceEditor
      Appends a Monitor to a Monitor Repository through AddCommands.
      Specified by:
      addMonitorToRepository in interface ResourceEditor
    • setProcessingType

      public void setProcessingType(EObject measurementSpecification, EObject processingType)
      Description copied from interface: ResourceEditor
      Sets the Processing Type for a Measurement Specification using EMF Set Command. Used in 4th page of Wizard.
      Specified by:
      setProcessingType in interface ResourceEditor
    • setAProcessingTypeAttribute

      public void setAProcessingTypeAttribute(EObject processingType, String processingTypeAttributeName, Object value)
      Description copied from interface: ResourceEditor
      Sets the PT attribute using EMF Set Command. Value should be either double or int, depending on the attribute.
      Specified by:
      setAProcessingTypeAttribute in interface ResourceEditor
      processingTypeAttributeName - The String name of the PT Attribute that we want to set
    • setServiceLevelObjectiveName

      public void setServiceLevelObjectiveName(EObject slo, String name)
      Description copied from interface: ResourceEditor
      Sets the name of the Service Level Objective using EMF Set Command.
      Specified by:
      setServiceLevelObjectiveName in interface ResourceEditor
    • setServiceLevelObjectiveDescription

      public void setServiceLevelObjectiveDescription(EObject slo, String description)
      Description copied from interface: ResourceEditor
      Sets the description of the Service Level Objective using EMF Set Command.
      Specified by:
      setServiceLevelObjectiveDescription in interface ResourceEditor
    • setMeasurementSpecificationToServiceLevelObjective

      public void setMeasurementSpecificationToServiceLevelObjective(EObject slo, EObject measurementSpec)
      Description copied from interface: ResourceEditor
      Binds a Measurement Specification the Service Level Objective using EMF Set Command.
      Specified by:
      setMeasurementSpecificationToServiceLevelObjective in interface ResourceEditor