java.lang.Object
edu.kit.ipd.are.dsexplore.featurecompletions.weaver.strategy.behaviour.BehaviourWeavingStrategy
All Implemented Interfaces:
IWeavingStrategy

public class BehaviourWeavingStrategy extends Object implements IWeavingStrategy
This is the central class handling the Behaviour weaving mechanism. It is initialized with the present degrees of freedom and triggers the weaving operations for the PCM submodels (repository/seff, system, usage, allocation). (It is based on the AdapterWeavingStrategy)
  • Constructor Details

    • BehaviourWeavingStrategy

      public BehaviourWeavingStrategy(org.palladiosimulator.solver.models.PCMInstance pcmToAdapt, org.palladiosimulator.pcm.repository.Repository solution, FeatureCompletion fc, InclusionMechanism im)
  • Method Details

    • getPCMToAdapt

      public org.palladiosimulator.solver.models.PCMInstance getPCMToAdapt()
    • getMergedRepoManager

      public SolutionManager getMergedRepoManager()
    • getPCMAllocationManager

      public PcmAllocationManager getPCMAllocationManager()
    • getPCMSEFFManager

      public PcmServiceEffectSpecificationManager getPCMSEFFManager()
    • getPCMSystemManager

      public PcmSystemManager getPCMSystemManager()
    • getPCMUsageModelManager

      public PcmUsageModelManager getPCMUsageModelManager()
    • initialize

      public void initialize(List<Pair<ComplementumVisnetis,WeavingLocation>> locations, Choice solutionChoice, List<Choice> allocationChoices)
      Initializes the Behaviour weaving mechanism.
      Specified by:
      initialize in interface IWeavingStrategy
      Parameters:
      locations - not used in Behaviour mechanism, as locations are determined by dsl.
      solutionChoice - solution choice.
      featureChoices - feature choices.
      allocationChoices - allocation choices for fcc components.
      multipleInclusionChoice - multiple-flag choice.
      advicePlacementChoices - advice placement (mandatory/optional) choices.
    • weave

      public void weave() throws FCCWeaverException
      Applies weaving operations to the PCM submodels.
      Specified by:
      weave in interface IWeavingStrategy
      Throws:
      FCCWeaverException
    • savePcmInstanceToFile

      public static void savePcmInstanceToFile(org.palladiosimulator.solver.models.PCMInstance pcmInstance, String filePath)
      Saves a PCM-instance to file. (Debug purpose only, as PCM-instance is not usable any longer after save operation!)
      Parameters:
      pcmInstance - the PCM-instance to save.
      filePath - the file path.
    • saveToXMIFile

      public static void saveToXMIFile(EObject modelToSave, String fileName)
    • getConvertedFCCClassChoices

      public List<Choice> getConvertedFCCClassChoices()
      Determine the actual allocations of all inserted components and creates corresponding allocation choices.
      Specified by:
      getConvertedFCCClassChoices in interface IWeavingStrategy
      Returns:
      corresponding allocation choices.
    • getSelectedCVs

      public List<ComplementumVisnetis> getSelectedCVs()