Class BehaviourWeavingStrategy
java.lang.Object
edu.kit.ipd.are.dsexplore.featurecompletions.weaver.strategy.behaviour.BehaviourWeavingStrategy
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionBehaviourWeavingStrategy
(org.palladiosimulator.solver.models.PCMInstance pcmToAdapt, org.palladiosimulator.pcm.repository.Repository solution, FeatureCompletion fc, InclusionMechanism im) -
Method Summary
Modifier and TypeMethodDescriptionDetermine the actual allocations of all inserted components and creates corresponding allocation choices.org.palladiosimulator.solver.models.PCMInstance
void
initialize
(List<Pair<ComplementumVisnetis, WeavingLocation>> locations, Choice solutionChoice, List<Choice> allocationChoices) Initializes the Behaviour weaving mechanism.static void
savePcmInstanceToFile
(org.palladiosimulator.solver.models.PCMInstance pcmInstance, String filePath) Saves a PCM-instance to file.static void
saveToXMIFile
(EObject modelToSave, String fileName) void
weave()
Applies weaving operations to the PCM submodels.
-
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
-
getPCMAllocationManager
-
getPCMSEFFManager
-
getPCMSystemManager
-
getPCMUsageModelManager
-
initialize
public void initialize(List<Pair<ComplementumVisnetis, WeavingLocation>> locations, Choice solutionChoice, List<Choice> allocationChoices) Initializes the Behaviour weaving mechanism.- Specified by:
initialize
in interfaceIWeavingStrategy
- 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
Applies weaving operations to the PCM submodels.- Specified by:
weave
in interfaceIWeavingStrategy
- 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
-
getConvertedFCCClassChoices
Determine the actual allocations of all inserted components and creates corresponding allocation choices.- Specified by:
getConvertedFCCClassChoices
in interfaceIWeavingStrategy
- Returns:
- corresponding allocation choices.
-
getSelectedCVs
-