Class BehaviourWeavingStrategy
- 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 Summary
Constructors Constructor Description BehaviourWeavingStrategy(org.palladiosimulator.solver.models.PCMInstance pcmToAdapt, org.palladiosimulator.pcm.repository.Repository solution, FeatureCompletion fc, InclusionMechanism im)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Choice>
getConvertedFCCClassChoices()
Determine the actual allocations of all inserted components and creates corresponding allocation choices.SolutionManager
getMergedRepoManager()
PcmAllocationManager
getPCMAllocationManager()
PcmServiceEffectSpecificationManager
getPCMSEFFManager()
PcmSystemManager
getPCMSystemManager()
org.palladiosimulator.solver.models.PCMInstance
getPCMToAdapt()
PcmUsageModelManager
getPCMUsageModelManager()
List<ComplementumVisnetis>
getSelectedCVs()
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 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()
-
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 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
public void weave() throws FCCWeaverException
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.
-
getConvertedFCCClassChoices
public List<Choice> getConvertedFCCClassChoices()
Determine the actual allocations of all inserted components and creates corresponding allocation choices.- Specified by:
getConvertedFCCClassChoices
in interfaceIWeavingStrategy
- Returns:
- corresponding allocation choices.
-
getSelectedCVs
public List<ComplementumVisnetis> getSelectedCVs()
-
-