Class PCMQueryUtils
java.lang.Object
org.palladiosimulator.dataflow.confidentiality.analysis.utils.pcm.PCMQueryUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<SEFFWithContext>
findCalledSEFF
(org.palladiosimulator.pcm.repository.ProvidedRole providedRole, org.palladiosimulator.pcm.repository.Signature calledSignature, Deque<org.palladiosimulator.pcm.core.composition.AssemblyContext> context) Finds a called SEFF and the corresponding stack of assembly contexts.static Optional<SEFFWithContext>
findCalledSEFF
(org.palladiosimulator.pcm.repository.RequiredRole requiredRole, org.palladiosimulator.pcm.repository.OperationSignature calledSignature, Deque<org.palladiosimulator.pcm.core.composition.AssemblyContext> context) Finds a called SEFF and the corresponding stack of assembly contexts.static <T> Optional<T>
findParentOfType
(EObject object, Class<T> clazz, boolean includeSelf) Finds the parent of a given type starting at the given modeling objectstatic List<org.palladiosimulator.pcm.usagemodel.Start>
findStartActionsForUsageModel
(org.palladiosimulator.pcm.usagemodel.UsageModel usageModel) Returns the List of start actions for a usage modelstatic Optional<org.palladiosimulator.pcm.seff.StartAction>
getFirstStartActionInActionList
(List<org.palladiosimulator.pcm.seff.AbstractAction> actionList) Returns the first start action in the list of actionsstatic Optional<org.palladiosimulator.pcm.usagemodel.Start>
getStartActionOfScenarioBehavior
(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour scenarioBehavior) Finds the start action of a given scenario behaviour
-
Method Details
-
getStartActionOfScenarioBehavior
public static Optional<org.palladiosimulator.pcm.usagemodel.Start> getStartActionOfScenarioBehavior(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour scenarioBehavior) Finds the start action of a given scenario behaviour- Parameters:
scenarioBehavior
- Given scenario behaviour- Returns:
- Returns, if it exists, the single start action of the scenario behaviour
-
getFirstStartActionInActionList
public static Optional<org.palladiosimulator.pcm.seff.StartAction> getFirstStartActionInActionList(List<org.palladiosimulator.pcm.seff.AbstractAction> actionList) Returns the first start action in the list of actions- Parameters:
actionList
- Given list of actions- Returns:
- Returns the first found start action
-
findStartActionsForUsageModel
public static List<org.palladiosimulator.pcm.usagemodel.Start> findStartActionsForUsageModel(org.palladiosimulator.pcm.usagemodel.UsageModel usageModel) Returns the List of start actions for a usage model- Parameters:
usageModel
- Given usage model- Returns:
- List of start actions that are provided by the usage model
-
findParentOfType
Finds the parent of a given type starting at the given modeling object- Type Parameters:
T
- Type of the parent- Parameters:
object
- Modeling object the search should be started atclazz
- Type class of the parentincludeSelf
- Should be true, if the search should include the container itself. Otherwise, this should be set to false- Returns:
- Returns, if found, the parent of the given object with the given type
-
findCalledSEFF
public static Optional<SEFFWithContext> findCalledSEFF(org.palladiosimulator.pcm.repository.ProvidedRole providedRole, org.palladiosimulator.pcm.repository.Signature calledSignature, Deque<org.palladiosimulator.pcm.core.composition.AssemblyContext> context) Finds a called SEFF and the corresponding stack of assembly contexts. It requires the context of the resolution process to be specified as stack of assembly contexts. The resulting stack can be completely different to the stack from which the call originated because composite components do not provide SEFFs but only contribute to the stack.- Parameters:
providedRole
- The provided role that points to the identifying component.calledSignature
- The signature that the SEFF describes.context
- The stack of assembly contexts that identifies the point from which the call shall be resolved. The list starts with the most outer assembly context.- Returns:
- A tuple of the resolved SEFF and the assembly context stack.
-
findCalledSEFF
public static Optional<SEFFWithContext> findCalledSEFF(org.palladiosimulator.pcm.repository.RequiredRole requiredRole, org.palladiosimulator.pcm.repository.OperationSignature calledSignature, Deque<org.palladiosimulator.pcm.core.composition.AssemblyContext> context) Finds a called SEFF and the corresponding stack of assembly contexts. It requires the context of the resolution process to be specified as stack of assembly contexts. The resulting stack can be completely different to the stack from which the call originated because composite components do not provide SEFFs but only contribute to the stack.- Parameters:
requiredRole
- The required role that points to the required component.calledSignature
- The signature that the SEFF describes.context
- The stack of assembly contexts that identifies the point from which the call shall be resolved. The list starts with the most outer assembly context.- Returns:
- A tuple of the resolved SEFF and the assembly context stack.
-