Class 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 Detail

      • BehaviourWeavingStrategy

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

      • getPCMToAdapt

        public org.palladiosimulator.solver.models.PCMInstance getPCMToAdapt()
      • 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.
      • 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.